Преглед изворни кода

Merge remote-tracking branch 'origin/master' into referMaster

# Conflicts:
#	src/api/cdss.js
#	src/api/config.js
zhouna пре 4 година
родитељ
комит
28f735a55c
64 измењених фајлова са 15695 додато и 473 уклоњено
  1. 1 1
      src/App.vue
  2. 198 1
      src/api/cdss.js
  3. 125 25
      src/api/config.js
  4. 1 1
      src/api/index.js
  5. 36 0
      src/api/knowledgeLib.js
  6. 129 0
      src/api/knowledgeTree.js
  7. 14 2
      src/api/utils.js
  8. 49 0
      src/api/zskDiagBase.js
  9. 419 0
      src/components/autoTest/AutoBillCommonTest.vue
  10. 335 0
      src/components/autoTest/AutoKnowledgeMapRuleTest.vue
  11. 1174 0
      src/components/basicKnow/AddTerm.vue
  12. 264 0
      src/components/basicKnow/BasicPartOfSpeech.vue
  13. 326 0
      src/components/basicKnow/BasicRelationship.vue
  14. 396 0
      src/components/basicKnow/BasicTermsMaintenance.vue
  15. 126 0
      src/components/basicKnow/SearchList.vue
  16. 116 0
      src/components/basicKnow/SimilarListDrag.vue
  17. 77 0
      src/components/basicKnow/TreeTab.vue
  18. 48 14
      src/components/cdssManage/AddMedicinePrompt.vue
  19. 16 0
      src/components/cdssManage/MedicalTerm.vue
  20. 23 5
      src/components/cdssManage/MedicineInfoPg.vue
  21. 3 4
      src/components/cdssManage/MedicinePrompt.vue
  22. 427 0
      src/components/cdssManage/nursing/Addnursing.vue
  23. 529 0
      src/components/cdssManage/nursing/nursing.vue
  24. 192 55
      src/components/cdssManage/plan/AddPlan.vue
  25. 411 0
      src/components/cdssManage/scale/AddScale.vue
  26. 513 0
      src/components/cdssManage/scale/ScaleManage.vue
  27. 3 3
      src/components/common/Crumbs.vue
  28. 1 0
      src/components/icss/AddMedicinePrompt.vue
  29. 328 0
      src/components/knowledgeExtra/AboutDisease.vue
  30. 886 0
      src/components/knowledgeExtra/AddDevKnow.vue
  31. 405 0
      src/components/knowledgeExtra/AddDiagBase.vue
  32. 496 0
      src/components/knowledgeExtra/AddNewRule.vue
  33. 297 0
      src/components/knowledgeExtra/DevInfo.vue
  34. 398 0
      src/components/knowledgeExtra/DiagBase.vue
  35. 181 0
      src/components/knowledgeExtra/DiagBaseGroup.vue
  36. 385 0
      src/components/knowledgeExtra/DiagBaseItem.vue
  37. 148 0
      src/components/knowledgeExtra/DiagBaseType.vue
  38. 544 0
      src/components/knowledgeExtra/DiseaseTree.vue
  39. 480 0
      src/components/knowledgeExtra/KnowledgeAll.vue
  40. 329 0
      src/components/knowledgeExtra/KnowledgeBaseType.vue
  41. 450 0
      src/components/knowledgeExtra/RuleManager.vue
  42. 334 0
      src/components/knowledgeExtra/StaticInfo.vue
  43. 449 0
      src/components/knowledgeExtra/SubConditions.vue
  44. 117 0
      src/components/knowledgeExtra/SubRulesGroup.vue
  45. 8 1
      src/components/qualityControl/QualityControlTemp.vue
  46. 236 0
      src/components/testManager/knowledgeMapRule/BillCommonTest.vue
  47. 236 0
      src/components/testManager/knowledgeMapRule/BillFusionTest.vue
  48. 211 0
      src/components/testManager/knowledgeMapRule/CriticalAuxTest.vue
  49. 198 0
      src/components/testManager/knowledgeMapRule/CriticalLabTest.vue
  50. 214 0
      src/components/testManager/knowledgeMapRule/HighRiskDrugTest.vue
  51. 232 0
      src/components/testManager/knowledgeMapRule/HighRiskOperationTest.vue
  52. 360 0
      src/components/testManager/knowledgeMapRule/KnowledgeMapRuleTest.vue
  53. 226 0
      src/components/testManager/knowledgeMapRule/OtherAssayRuleTest.vue
  54. 227 0
      src/components/testManager/knowledgeMapRule/OtherAuxRuleTest.vue
  55. 226 0
      src/components/testManager/knowledgeMapRule/OtherFusionRuleTest.vue
  56. 231 0
      src/components/testManager/staticKnowledgeMap/LessStaticOrNoMap.vue
  57. 316 0
      src/components/testManager/staticKnowledgeMap/StaticKnowledgeMapTest.vue
  58. BIN
      src/images/add.png
  59. BIN
      src/images/copy.png
  60. BIN
      src/images/search.png
  61. 1 1
      src/less/admin.less
  62. 8 0
      src/less/common.less
  63. 563 337
      src/routes.js
  64. 23 23
      vue.config.js

+ 1 - 1
src/App.vue

@@ -54,7 +54,7 @@
                 return;
               case 500:
                 // 返回 500
-                this.message({
+                this.$message({
                   message:'该服务正在升级,请稍后再试',
                   type:'warning'
                 });

+ 198 - 1
src/api/cdss.js

@@ -144,6 +144,41 @@ export default {
   importDrugRecord(param) {
     return axios.post(urls.importDrugRecordCDSS, param);
   },
+  getScalePage(param) {
+    //量表列表-列表
+    return axios.post(urls.getScalePageCDSS, param);
+  },
+  scaleIsExistRecord(param) {
+    return axios.post(urls.scaleIsExistRecordCDSS, param);
+  },
+  saveOrUpdateScaleRecord(param) {
+    return axios.post(urls.saveOrUpdateScaleRecordCDSS, param);
+  },
+  deleteScaleRecord(param) {
+    return axios.post(urls.deleteScaleRecordCDSS, param);
+  },
+  exportScaleRecord(param) {
+    return axios.post(urls.exportScaleRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importScaleRecord(param) {
+    return axios.post(urls.importScaleRecordCDSS, param);
+  },
+  exportScaleModule(param) {
+    return axios.post(urls.exportScaleModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  dataScaleVerify(param) {
+    return axios.post(urls.dataScaleVerify, param);
+  },
+  precScaleDataMatch(param) {
+    return axios.post(urls.precScaleDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+
   getOperationPage(param) {
     //手术/操作列表-列表
     return axios.post(urls.getOperationPageCDSS, param);
@@ -244,7 +279,50 @@ export default {
     });
   },
 
-
+  getNursePage(param) {
+    //输血列表-列表
+    return axios.post(urls.getNursePage, param);
+  },
+  getNursePage(param) {
+    //护理列表-列表
+    return axios.post(urls.getNursePage, param);
+  },
+  saveOrUpdateRecord(param) {
+    //护理列表添加
+    return axios.post(urls.saveOrUpdateRecord, param);
+  },
+  nurseIsExistRecord(param) {
+    //护理-映射关系是否已存在
+    return axios.post(urls.nurseIsExistRecord, param);
+  },
+  deleteNurseRecord(param) {
+    //护理-删除
+    return axios.post(urls.deleteNurseRecord, param);
+  },
+  exportNurseRecord(param) {
+    //护理-数据导出
+    return axios.post(urls.exportNurseRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importNurseRecord(param) {
+    //护理-数据导入
+    return axios.post(urls.importNurseRecord, param);
+  },
+  exportNurseModule(param) {
+    //护理-数据导入模板导出
+    return axios.post(urls.exportNurseModule, param, {
+      responseType: 'blob',
+    });
+  },
+  dataNurseVerify(param) {
+    return axios.post(urls.dataNurseVerify, param);
+  },
+  precNurseDataMatch(param) {
+    return axios.post(urls.precNurseDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
 
   getHospitalInfo(param) {
     return axios.post(urls.getHospitalInfoCDSS, param);
@@ -430,4 +508,123 @@ export default {
   BatchUpdateHasInfoStatus(param) {
     return request({ method: 'post', url: urls.BatchUpdateHasInfoStatus, data: param });
   },
+
+  getCaseResultList(param) {
+    return axios.post(urls.getCaseResultList, param);
+  },
+  billRuleTest(param) {
+    return axios.post(urls.billRuleTest, param, { timeout: 30 * 60 * 1000 });
+  },
+  getResultBillPage(param) {
+    return axios.post(urls.getResultBillPage, param);
+  },
+  ruleAllTest(param) {
+    return axios.post(urls.ruleAllTest, param);
+  },
+  exportRuleExcel(param) {
+    return axios.post(urls.exportRuleExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  criticalRuleTest(param) {
+    return axios.post(urls.criticalRuleTest, param, { timeout: 30 * 60 * 1000 });
+  },
+  getResultCriticalPage(param) {
+    return axios.post(urls.getResultCriticalPage, param);
+  },
+  highRiskRuleTest(param) {
+    return axios.post(urls.highRiskRuleTest, param, { timeout: 30 * 60 * 1000 });
+  },
+  getResultHighriskDrugPage(param) {
+    return axios.post(urls.getResultHighriskDrugPage, param);
+  },
+  otherRuleTest(param) {
+    return axios.post(urls.otherRuleTest, param, { timeout: 30 * 60 * 1000 });
+  },
+  getResultHighriskOperationPage(param) {
+    return axios.post(urls.getResultHighriskOperationPage, param);
+  },
+  getResultOtherLisPage(param) {
+    return axios.post(urls.getResultOtherLisPage, param);
+  },
+  getResultOtherPacsPage(param) {
+    return axios.post(urls.getResultOtherPacsPage, param);
+  },
+  getResultOtherTransfusionPage(param) {
+    return axios.post(urls.getResultOtherTransfusionPage, param);
+  },
+  billExportExcel(param) {
+    return axios.post(urls.billExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  criticalExportExcel(param) {
+    return axios.post(urls.criticalExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  highriskDrugExportExcel(param) {
+    return axios.post(urls.highriskDrugExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  highriskOperationExportExcel(param) {
+    return axios.post(urls.highriskOperationExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  otherLisExportExcel(param) {
+    return axios.post(urls.otherLisExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  otherPacsExportExcel(param) {
+    return axios.post(urls.otherPacsExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  otherTransfusionExportExcel(param) {
+    return axios.post(urls.otherTransfusionExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  exportStaticCommonExcel(param) {
+    return axios.post(urls.exportStaticCommonExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  exportStaticCommonStaticExcel(param) {
+    return axios.post(urls.exportStaticCommonStaticExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  exportStaticLisExcel(param) {
+    return axios.post(urls.exportStaticLisExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  exportStaticLisStaticExcel(param) {
+    return axios.post(urls.exportStaticLisStaticExcel, param, {
+      responseType: 'blob',
+    });
+  },
+
+  getStaticCaseResultList(param) {
+    return axios.post(urls.getStaticCaseResultList, param);
+  },
+  getStaticPage(param) {
+    return axios.post(urls.getStaticPage, param);
+  },
+  staticKnowledgeTest(param) {
+    return axios.post(urls.staticKnowledgeTest, param, { timeout: 30 * 60 * 1000 });
+  },
+  getRunningStatus(param) {
+    return axios.post(urls.getRunningStatus, param);
+  },
+  getRunningStatusByHospitalId(param) {
+    return axios.post(urls.getRunningStatusByHospitalId, param);
+  },
+  updateRunningStatus(param) {
+    return axios.post(urls.updateRunningStatus, param);
+  },
 };

+ 125 - 25
src/api/config.js

@@ -151,7 +151,7 @@ export default {
     'addVersionInfo': 'api/knowledgeman/versionDetail/addVersionDetails', //版本信息-添加版本说明
     'modiVersionInfo': 'api/knowledgeman/versionDetail/updateVersionDetails', //版本信息-修改版本说明
     'getVersionDetlInfo': 'api/knowledgeman/versionDetail/getDetailById', //版本信息-版本说明列表获取
-    'promptServer': '/api/knowledgeman/file/uploadImage',    //静态知识富文本图片上传
+    'promptServer': '/api/cdssman/file/uploadImage',    //静态知识富文本图片上传
     /**************医学术语维护****************/
     'getKnowledgeEnums': testUrl + '/api/knowledgeman/getKlmEnumsData', //术语库枚举
     'saveConceptInfo': '/api/knowledgeman/conceptDetail/insertOrUpdate',   //保存术语静态知识
@@ -295,7 +295,7 @@ export default {
     'getQCTemplist': testUrl + '/api/mrman/qc/qcModuleInfo/page', // 获取模板列表
     'saveOrUpdateQCTemp': '/api/mrman/qc/qcModuleInfo/saveOrUpdateModuleInfo', //新增或修改模板
     'delQCTemp': '/api/mrman/qc/qcModuleInfo/delete', //删除模板
-    'getQCTempDetail':testUrl +  '/api/mrman/qc/qcModuleInfo/getById', //获取模板详情
+    'getQCTempDetail': testUrl + '/api/mrman/qc/qcModuleInfo/getById', //获取模板详情
     'getQCName': '/api/mrman/qc/qcQuestionInfo/index', //获取字段名称
     'getQcFlawList': '/api/mrman/qcCasesEntry/indexCaseEntry',   //获取缺陷列表
     'getModuleTypeList': '/api/mrman/qc/qcModuleInfo/index', //获取模块类型列表
@@ -323,8 +323,8 @@ export default {
     'getQcEntryTypeDetail': testUrl + '/api/mrman/qc/qcEntryType/getById', //质控条目与质控类型关系--根据entryId和医院id返回内容
     'getQcEntryTypeByHospital': testUrl + '/api/mrman/qc/qcEntryType/getTypeByHospital', //质控条目与质控类型关系--根据医院获取质控类型列表
     'getQcEntryTypeIndex': testUrl + '/api/mrman/qc/qcEntryType/index', //质控条目与质控类型关系--根据医院和条目检索未被选择的质控类型
-    'ifNeedUnbind':testUrl + '/api/mrman/qc/qcType/getOrCancel',   //判断质控类型是否已被绑定、解除绑定
-    'qcTypeList':testUrl + '/api/mrman/qc/qcType/indexData',    //其他质控类型列表
+    'ifNeedUnbind': testUrl + '/api/mrman/qc/qcType/getOrCancel',   //判断质控类型是否已被绑定、解除绑定
+    'qcTypeList': testUrl + '/api/mrman/qc/qcType/indexData',    //其他质控类型列表
     'saveQcEntryType': '/api/mrman/qc/qcEntryType/saveOrUpdate', //质控条目与质控类型关系--保存
     'getStdList': '/api/mrman/stdBehospitalInfo/getSthospitalInfoPage',//标准病例列表
     'delStdRecord': '/api/mrman/stdBehospitalInfo/clearSthospitalInfo',//删除标准病例
@@ -369,9 +369,9 @@ export default {
     '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',   
+    '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',   //检验-映射关系是否已存在
@@ -379,9 +379,9 @@ export default {
     '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',   
+    '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',   //检查-映射关系是否已存在
@@ -389,9 +389,9 @@ export default {
     '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', 
+    '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',   //药品-映射关系是否已存在
@@ -399,9 +399,19 @@ export default {
     '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',  
+    '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',   //手术/操作-映射关系是否已存在
@@ -409,9 +419,9 @@ export default {
     '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', 
+    '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',   //输血-映射关系是否已存在
@@ -419,9 +429,9 @@ export default {
     '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',  
+    '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',   //科室-映射关系是否已存在
@@ -430,9 +440,19 @@ export default {
     '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',   
-   
+    'precDeptDataMatch': '/api/cdssman/tran/deptConfig/precDataMatch',
+    'dataDeptVerify': '/api/cdssman/tran/deptConfig/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',
+
     // 'saveHospitalInfoRecordCDSS': '/api/cdssman/tran/hospitalInfo/saveRecord',   //医院信息——修改医院信息
 
     'modifyConnectStatusCDSS': '/api/cdssman/hospitalInfo/modifyConnectStatus',   //医院信息——修改医院信息 
@@ -479,10 +499,90 @@ export default {
     'updateDisclaimerInformationsCDSS': '/api/cdssman/disclaimerInfo/updateDisclaimerInformations',   //修改免责申明详情
 
     'getListDicCDSS': '/api/cdssman/sys/dictionaryInfo/getList',   //返回字典信息(界面返回)
+    'getListBack': '/api/cdssman/sys/dictionaryInfo/getListBack',   //返回字典信息(后台返回)
 
     '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',
+    'getResultCriticalPage': '/api/cdssman/test/rule/getResultCriticalPage',   //危急值测试列表
+    'criticalRuleTest': '/api/cdssman/test/rule/criticalRuleTest',   //危急值规则测试
+    'getResultHighriskDrugPage': '/api/cdssman/test/rule/getResultHighriskDrugPage',   //高危药品测试列表
+    'highRiskRuleTest': '/api/cdssman/test/rule/highRiskRuleTest',   //高危药品、手术规则测试
+    'getResultHighriskOperationPage': '/api/cdssman/test/rule/getResultHighriskOperationPage',   //高危手术测试列表
+    'getResultOtherLisPage': '/api/cdssman/test/rule/getResultOtherLisPage',   //其他值提醒(化验)测试列表
+    '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',   //高危药品规则测试结果导出
+    'highriskOperationExportExcel': '/api/cdssman/test/rule/highriskOperationExportExcel',   //高危手术规则测试结果导出
+    'otherLisExportExcel': '/api/cdssman/test/rule/otherLisExportExcel',   //化验其他提醒规则测试结果导出
+    'otherPacsExportExcel': '/api/cdssman/test/rule/otherPacsExportExcel',   //辅检其他提醒规则测试结果导出
+    'otherTransfusionExportExcel': '/api/cdssman/test/rule/otherTransfusionExportExcel',   //输血其他提醒规则测试结果导出
+
+    'exportStaticCommonExcel': '/api/cdssman/test/staticKnowledge/exportCommonExcel',   //通用未映射到标准术语测试结果导出
+    'exportStaticCommonStaticExcel': '/api/cdssman/test/staticKnowledge/exportCommonStaticExcel',   //通用缺少静态知识测试结果导出
+    'exportStaticLisExcel': '/api/cdssman/test/staticKnowledge/exportLisExcel',   //检验未映射到标准术语测试结果导出
+    'exportStaticLisStaticExcel': '/api/cdssman/test/staticKnowledge/exportLisStaticExcel',   //检验缺少静态知识测试结果导出
+    'getStaticCaseResultList': '/api/cdssman/test/staticKnowledge/getCaseResultList',   //静态知识测试总览列表
+    'getStaticPage': '/api/cdssman/test/staticKnowledge/getPage',   //静态知识测试结果明细列表
+    'staticKnowledgeTest': '/api/cdssman/test/staticKnowledge/staticKnowledgeTest',   //静态知识测试
+    'getRunningStatus': '/api/cdssman/test/running/getStatus',   //查看测试用例运行状态
+    'getRunningStatusByHospitalId': '/api/cdssman/test/running/getStatusByHospitalId',   //查拉面所有测试用例运行状态
+    'updateRunningStatus': '/api/cdssman/test/running/updateStatus',   //更新测试用例运行状态
+      //知识库规则维护
+      'zskRuleList':'/api/cdssman/klRule/getKlRuleInfoPage',//规则列表
+      'zskAddRule':'/api/cdssman//klRule/saveRuleInfo',//添加规则
+      'zskActiveRule':'/api/cdssman/klRule/startRuleInfo',//启用规则
+      'zskDisableRule':'/api/cdssman/klRule/disableRuleInfo',//禁用规则
+      'zskDelRule':'/api/cdssman/klRule/clearRuleInfo',//删除规则
+      'zskRuleDetail':'/api/cdssman/klRule/getByIdRuleInfo',//规则详情
+      'zskTypeList':'/api/cdssman/klRulePlan/getMenu',//类型列表
+      'zskSearchConcept':'/api/cdssman/klDisease/searchConcept',//知识库搜索术语
+      'zskUpdateAll':'/api/cdssman/cache/clearRuleAll',//更新数据
+      'zskgetDict':'/api/cdssman/kl/dictionary/getDictionarys',//
+    //知识库树形图
+    'getTree':'/api/cdssman/multContact/getTree',//获取当前type数据
+    'searchTreeItem':'/api/cdssman/multContact/getAllForRelation',//检索树元素
+    'addTreeRelation':'/api/cdssman/multContact/addRelation',//保存树元素
+    //知识库基础维护
+    'getBaseConceptInfoPage':'/api/cdssman/graph/klConcept/getConceptInfoPage',
+    'startConcept':'/api/cdssman/graph/klConcept/startConcept',
+    'disableConcept':'/api/cdssman/graph/klConcept/disableConcept',
+    'baseTypeGetPage':'/api/cdssman/kl/lexicon/getPage',
+    'baseRelationTypeGetPage':'/api/cdssman/kl/lexiconRelationship/getPage',
+    'clearStandRuleDrug':'/api/cdssman/cache/clearStandRuleDrug',
+    'saveBaseConceptInfo':'/api/cdssman/graph/klConcept/saveConceptInfo',
+    'getBaseConceptAll':'/api/cdssman/graph/klConcept/getConceptAll',
+    'clearConceptInfo':'/api/cdssman/graph/klConcept/clearConceptInfo',
+    //疾病相关维护
+    'getDiseasePage':'/api/cdssman/klDisease/getDiseasePage',
+    'diseaseDelete':'/api/cdssman/klDisease/delete',
+    'getBaseDetail':'/api/cdssman/klDisease/getDetail',
+    'searchConcept':'/api/cdssman/klDisease/searchConcept',
+    'findDisName':'/api/cdssman/klDisease/findDisName',
+    'diseaseBaseSave':'/api/cdssman/klDisease/save',
+    //静态知识术语
+    'staticBaseKnowledge':'/api/cdssman/kl/conceptInfo/getPage',
+    'changeBaseStatus':'/api/cdssman/kl/conceptInfo/changeStatus',
+    'getBaseRecordById':'/api/cdssman/kl/conceptInfo/getRecordById',
+    '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',
   },
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',

+ 1 - 1
src/api/index.js

@@ -3,7 +3,7 @@ import config from './config.js';
 
 axios.default.timeout = 500000;
 axios.defaults.headers.post['Content-Type'] = "application/json;charset=utf-8";
-// axios.defaults.baseURL = 'http://192.168.2.236';
+ //axios.defaults.baseURL = 'http://192.168.2.236:5050';
 // axios.defaults.baseURL = 'http://192.168.2.241';
 // axios.defaults.baseURL = 'http://192.168.3.117:5050';
 

+ 36 - 0
src/api/knowledgeLib.js

@@ -0,0 +1,36 @@
+import axios from 'axios';
+import config from '@api/config.js';
+
+const urls = config.urls;
+export default {
+    getRulesList(param){
+        return axios.post(urls.zskRuleList,param);
+    },
+    getTypesList(param){
+        return axios.post(urls.zskTypeList,param);
+    },
+    deleteRule(param){
+        return axios.post(urls.zskDelRule,param);
+    },
+    deleteRuleApply(param){
+        return axios.post(urls.zskDisableRule,param);
+    },
+    ruleDetail(param){
+        return axios.post(urls.zskRuleDetail,param);
+    },
+    searchConcept(param){
+        return axios.post(urls.zskSearchConcept,param);
+    },
+    saveRule(param){
+        return axios.post(urls.zskAddRule,param);
+    },
+    saveRuleApply(param){
+        return axios.post(urls.zskActiveRule,param);
+    },
+    zskUpdateAll() {    //更新数据
+        return axios.post(urls.zskUpdateAll)
+    },
+    zskgetDict(){
+        return axios.post(urls.zskgetDict)
+    }
+}

+ 129 - 0
src/api/knowledgeTree.js

@@ -0,0 +1,129 @@
+import axios from 'axios';
+import config from '@api/config.js';
+const urls = config.urls;
+
+export default {
+  addTreeRelation(param) {
+    return axios.post(urls.addTreeRelation, param);
+  },
+  getTreeSearchList(param) {
+    return axios.post(urls.searchTreeItem, param);
+  },
+  getlistTree(param) {
+    return axios.post(urls.getTree, param);
+  },
+  getBaseConceptInfoPage(param) {
+    return axios.post(urls.getBaseConceptInfoPage, param);
+  },
+  disableConcept(param) {
+    return axios.post(urls.disableConcept, param);
+  },
+  startConcept(param) {
+    return axios.post(urls.startConcept, param);
+  },
+  baseTypeGetPage(param) {
+    return axios.post(urls.baseTypeGetPage, param);
+  },
+  clearStandRuleDrug(param) {
+    return axios.post(urls.clearStandRuleDrug, param);
+  },
+  saveBaseConceptInfo(param) {
+    return axios.post(urls.saveBaseConceptInfo, param);
+  },
+  getBaseConceptAll(param) {
+    return axios.post(urls.getBaseConceptAll, param);
+  },
+  baseRelationTypeGetPage(param) {
+    return axios.post(urls.baseRelationTypeGetPage, param);
+  },
+  getDiseasePage(param) {
+    return axios.post(urls.getDiseasePage, param);
+  },
+  staticBaseKnowledge(param) {
+    return axios.post(urls.staticBaseKnowledge, param);
+  },
+  getListBack(param) {//字典信息
+    return axios.post(urls.getListBack, param);
+  },
+  changeBaseStatus(param) {//字典信息
+    return axios.post(urls.changeBaseStatus, param);
+  },
+  getBaseRecordById(param) {//获取静态知识详情
+    return axios.post(urls.getBaseRecordById, param);
+  },
+  saveBaseOrUpdateRecord(param) {//保存静态知识
+    return axios.post(urls.saveBaseOrUpdateRecord, param);
+  },
+  staticKnowledgeBaseInfo(param) {//搜索静态知识
+    return axios.post(urls.staticKnowledgeBaseInfo, param);
+  },
+  diseaseDelete(param) {//删除诊断依据
+    return axios.post(urls.diseaseDelete, param);
+  },
+  getBaseDetail(param) {//获取疾病详情
+    return axios.post(urls.getBaseDetail, param);
+  },
+  searchConcept(param) {//查询疾病
+    return axios.post(urls.searchConcept, param);
+  },
+  diseaseBaseSave(param) {//保存疾病
+    return axios.post(urls.diseaseBaseSave, param);
+  },
+  clearConceptInfo(param) {//删除同义词
+    return axios.post(urls.clearConceptInfo, param);
+  },
+  allRuleTest(param) {
+    return axios.post(urls.allRuleTest, param);
+  },
+  autoExportExcel(param) {
+      return axios({
+          method:'post',
+          url:urls.exportRuleExcel,
+          data: param,
+          contentType: "application/vnd.ms-excel" ,
+          responseType: 'blob'//必须添加,否则会乱码
+      })
+  },
+  autoGetCaseResultList(param) {
+    return axios.post(urls.autoGetCaseResultList, param);
+  },
+  getDroplistData(param) {
+    return axios.post(urls.getDroplistData, param);
+  },
+  getResultRulePage(param) {
+    return axios.post(urls.getResultRulePage, param);
+  },
+  ruleExportExcel(param) {     
+    return axios({
+      method:'post',
+      url:urls.ruleExportExcel,
+      data: param,
+      contentType: "application/vnd.ms-excel" ,
+      responseType: 'blob'//必须添加,否则会乱码
+  })
+  },
+  autoRuleTest(param) {
+    return axios.post(urls.autoRuleTest, param);
+  },
+  getRecordHopitalList(param) {
+    return axios.post(urls.getHospitalInfoCDSS, param);
+  },
+  getRunningStatusByHospitalId(param) {
+    return axios.post(urls.getRunningStatusByHospitalId, param);
+  },
+  updateRunningStatus(param) {
+    return axios.post(urls.updateRunningStatus, param);
+  },
+  getTypesList(param) {
+    return axios.post(urls.zskTypeList, param);
+  },
+  zskgetDict(param) {
+    return axios.post(urls.zskgetDict, param);
+  },
+  clearDrug(param) {//清除药品缓存
+    return axios.post(urls.clearDrug, param);
+  },
+  findDisName(param) {
+    return axios.post(urls.findDisName, param);
+  },
+};

+ 14 - 2
src/api/utils.js

@@ -132,7 +132,9 @@ export default {
   },
   //导出接口返回流下载
   downloadExportedData(data, fileName) {
-    var blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}); //application/vnd.openxmlformats-officedocument.spreadsheetml.sheet这里表示xlsx类型
+    var blob = new Blob([data], 
+      {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}
+    ); //application/vnd.openxmlformats-officedocument.spreadsheetml.sheet这里表示xlsx类型
     var downloadElement = document.createElement('a');
     var href = window.URL.createObjectURL(blob); //创建下载的链接
     downloadElement.href = href;
@@ -436,5 +438,15 @@ export default {
   getCurrentPage(currentChange, total, pageSize) {
     const currentPage =  currentChange > Math.ceil(total/pageSize) ? Math.ceil(total/pageSize) : currentChange
     return currentPage;
-  }
+  },
+  formatObj(data,key){
+        let obj={};
+        data.map((it)=>{
+            obj[it[key]]=it.subMenuList;
+        });
+        return obj;
+    },
+    delNullObj(arr){
+      return arr.filter((it)=>it!==null);
+    }
 }

+ 49 - 0
src/api/zskDiagBase.js

@@ -0,0 +1,49 @@
+import axios from 'axios';
+const urls = {
+    'zskDiagBase':'/api/cdssman/klDiagnose/getDiagnosePage',    //知识库诊断依据维护
+    'zskAddDiagBase':'/api/cdssman/klDiagnose/saveDiagnoseAll',
+    'zskDelDiagBase':'/api/cdssman/klDiagnose/clearDiagnoseAll',
+    'zskStrDiagBase':'/api/cdssman/klDiagnose/startDiagnose',   //启用
+    'zskStopDiagBase':'/api/cdssman/klDiagnose/disableDiagnose',    //禁用
+    'zskDiagBaseDetail':'/api/cdssman/klDiagnose/getByIdDiagnoseAll',
+    'zskTypeList':'/api/cdssman/klRulePlan/getMenu',//类型列表
+    'searchDiag':'/api/cdssman/klDiagnose/findDiaName',
+    'zskSearchConcept':'/api/cdssman/klDisease/searchConcept',//知识库搜索术语
+    'zskgetDict':'/api/cdssman/kl/dictionary/getDictionarys',//获取枚举
+    'updateDiagBase':'/api/cdssman/cache/reloadDiagnose'
+};
+export default {
+    zskgetDict(){
+        return axios.post(urls.zskgetDict)
+    },
+    getTypesList(param){
+        return axios.post(urls.zskTypeList,param);
+    },
+    diagBasePage(param){
+        return axios.post(urls.zskDiagBase, param)
+    },
+    diagBaseApply(param){ //诊断依据--启用
+        return axios.post(urls.zskStrDiagBase, param)
+    },
+    diagBaseStop(param){ //诊断依据--禁用
+        return axios.post(urls.zskStopDiagBase, param)
+    },
+    diagBaseDelete(param){ //诊断依据--删除
+        return axios.post(urls.zskDelDiagBase, param)
+    },
+    diagBaseGetDetail(param){ //诊断依据--获取详情
+        return axios.post(urls.zskDiagBaseDetail, param)
+    },
+    saveDiagBase(param){
+        return axios.post(urls.zskAddDiagBase, param)
+    },
+    searchDiag(param){
+        return axios.post(urls.searchDiag, param)
+    },
+    searchConcept(param){
+        return axios.post(urls.zskSearchConcept,param);
+    },
+    updateDiagBase(param={}){
+        return axios.post(urls.updateDiagBase,param);
+    },
+}

+ 419 - 0
src/components/autoTest/AutoBillCommonTest.vue

@@ -0,0 +1,419 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? `${titleName}-成功条数`
+          : `${titleName}-失败条数`
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="AutoKnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="规则术语类型:">
+          <el-select v-model="autoType" clearable filterable placeholder="请选择" size="mini">
+            <el-option
+              v-for="item in typeAutoList"
+              :key="item.libType"
+              :label="item.libTypeName"
+              :value="item.libType"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="规则医学标准术语:">
+          <el-input size="mini" v-model="autoRule" placeholder="请输入"></el-input>
+        </el-form-item>
+        <el-form-item label="基础规则术语类型:">
+          <el-select v-model="baseType" clearable filterable placeholder="请选择" size="mini">
+            <el-option
+              v-for="item in typeBaseList"
+              :key="item.libType"
+              :label="item.libTypeName"
+              :value="item.libType"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline btmAction">
+        <el-form-item label="基础规则医学标准术语:">
+          <el-input size="mini" v-model="baseHosTxt" placeholder="请输入"></el-input>
+        </el-form-item>
+        <el-form-item label="失败原因:">
+          <el-input size="mini" v-model="whyTxt" placeholder="请输入"></el-input>
+        </el-form-item>
+         <el-form-item>
+          <el-button size="mini" @click="filterDatas">确认</el-button>
+        </el-form-item>
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 100px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleLibTypeName"
+          label="规则术语类型"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleLibName"
+          label="规则医学标准术语"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleHisName"
+          label="规则医院术语"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleHisDetailName"
+          label="规则医院术语细项"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="groupType"
+          label="规则组别"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleBaseType"
+          className="collectTwo"
+          :show-overflow-tooltip="true"
+          label="基础规则类型"
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseType')"></div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleBaseLibTypeName"
+          label="基础规则术语类型"
+          :show-overflow-tooltip="true"
+          className="collectTwo"
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseLibTypeName')"></div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleBaseLibName"
+          label="基础规则医学标准术语"
+          :show-overflow-tooltip="true"
+          className="collectTwo"
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseLibName')"></div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleBaseHisName"
+          label="基础规则医院术语"
+          :show-overflow-tooltip="true"
+          className="collectTwo"
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseHisName')"></div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleBaseHisDetailName"
+          label="基础规则医院术语细项"
+          :show-overflow-tooltip="true"
+          className="collectTwo"
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseHisDetailName')"></div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="ruleBaseInputValue"
+          label="基础规则输入值"
+          :show-overflow-tooltip="true"
+          className="collectTwo"
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseInputValue','ruleBaseUnit')"></div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="referenceValue"
+          label="基础规则参考值"
+          :show-overflow-tooltip="true"
+          className="collectTwo"
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'referenceValue')"></div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">
+            {{ scope.row.success === 1 ? '成功' : '失败' }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/knowledgeTree.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  name:'AutoBillCommonTest',
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+      autoType:'',//规则术语类型
+      typeAutoList:[],
+      autoRule:'',//规则医学标准术语
+      baseType:'',
+      typeBaseList:[],
+      baseHosTxt:'',
+      whyTxt:'',
+      titleName:''
+    };
+  },
+  created() {
+    let params = this.handleInitData();;
+    // if(localAuto&&!this.$route.param){
+    //   params = JSON.parse(localAuto);
+    // }else{
+    //   alert(999)
+    //   params = this.handleInitData();
+    //   localStorage.setItem('localAuto',JSON.stringify(params))
+    // }
+    this.getDataList();
+    this.getDroplistData(params);
+  },
+  methods: {
+    returnDom(list,name,unit){
+      let str = ''
+      if(name === 'ruleBaseType'){
+        const params = JSON.parse(localStorage.getItem("zskDicts"));
+        for(let i = 0;i < list.length;i++){
+          for(let j = 0;j < params.length;j++){
+            if(list[i].ruleBaseType == params[j].val){
+              // if(params[j].name){
+                str += `<p style="border-bottom:${i == list.length-1?'0':'1px solid #EBEEF5'};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" class="collTxt">
+                      ${params[j].name||'&nbsp;'}
+                  </p>`
+              // }
+            }
+          }
+        }
+      }else{
+        for(let i = 0;i < list.length;i++){
+          // if(list[i][name]){
+            str += `<p style="border-bottom:${i == list.length-1?'0':'1px solid #EBEEF5'};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" class="collTxt">
+                  ${list[i][name]?list[i][unit]?(list[i][name]+list[i][unit]):list[i][name]:'&nbsp;'}
+              </p>`
+          // }
+        }
+      }
+      //  str += `<p style="padding:0 10px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;border-bottom:${i == list.length-1?'0':'1px solid #EBEEF5'};" class="collTxt">
+      return str
+    },
+    getDroplistData(params){
+      let param = {
+        success:params.success,
+        resultId:params.resultId
+      }
+      api.getDroplistData(param).then((res)=>{
+        const result = res.data
+        if(result.code == 0){
+          this.typeAutoList = result.data.ruleLibType||[]
+          this.typeBaseList = result.data.ruleBaseLibType||[]
+        }
+      })
+    },
+    filterDatas(){
+      this.getDataList();
+    },
+    handleInitData() {
+      const localAuto = JSON.parse(localStorage.getItem('localAuto'));
+      const { data, type,hospitalName } = this.$route.params;
+      this.type = type||localAuto.type;
+      this.titleName = localAuto.caseName||data.caseName.replace(/\_/,'-')
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        resultId: data && data.resultId||localAuto.resultId,
+        success: type === 'success' ? 1 : type === 'failed'? 0 : localAuto.type === 'success' ? 1 : 0,
+        ruleLibType:this.autoType||null,//规则术语类型
+        ruleLibName:this.autoRule,//规则医学标准术语(模糊查询)
+        hospitalName:hospitalName||localAuto.hospitalName,
+        ruleBaseLibType:this.baseType,//基础规则术语类型
+        ruleBaseLibName:this.baseHosTxt,//基础规则医学标准术语(模糊查询)
+        message:this.whyTxt,//失败原因(模糊查询
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultRulePage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      let parm = this.handleInitData();
+      // let params = {
+      //   success: parm.success,
+      //   resultId: parm.resultId,
+      //   billType: 1, //1:通用,2:输血
+      // };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.ruleExportExcel(parm).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${parm.hospitalName}-${this.titleName}测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less">
+.collectTwo .cell {
+  padding:0 8px;
+}
+</style>
+<style lang="less" scoped>
+@import '../../less/admin.less';
+.topBack {
+  height:80px !important;
+  .el-form-item {
+    margin-bottom:0;
+  }
+}
+.contents {
+  display:inline-block !important;
+}
+.btmAction {
+  position:relative;
+  bottom:12px;
+  float:right;
+}
+.collectTwo {
+  .cell {
+    padding:0 !important;
+    .collTxt {
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      border-bottom:1px solid #EBEEF5;
+      &:last-child{
+        border-bottom:0;
+      }
+    }
+  }
+}
+</style>

+ 335 - 0
src/components/autoTest/AutoKnowledgeMapRuleTest.vue

@@ -0,0 +1,335 @@
+<template>
+  <div>
+    <crumbs title="规则测试" class="topBack">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label class="selectMedicine" style="marginbottom: -1px">
+          <el-select size="mini" v-model="hospitalId" placeholder="选择医院" @change="handleChange">
+            <el-option
+              v-for="item in hospitalData"
+              :label="item.name"
+              :value="item.id"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item style="marginbottom: 0px">
+          <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">所有规则测试</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="caseName" label="规则类型" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
+
+        <el-table-column :resizable="false" prop="ruleNum" label="总条数" show-overflow-tooltip></el-table-column>
+        <el-table-column label="成功条数">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="goToFailedOrSuccessPage(scope.row, 'success')"
+              :disabled="runningStatusArr[scope.$index] === 1"
+            >{{ scope.row.ruleSuccessNum }}</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="失败条数">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="goToFailedOrSuccessPage(scope.row, 'failed')"
+              :disabled="runningStatusArr[scope.$index] === 1"
+            >{{ scope.row.ruleFailedNum }}</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="handleTest(scope.row, scope.$index)"
+              :disabled="!runningStatus"
+            >
+              {{
+              runningStatusArr[scope.$index] === 1
+              ? '执行测试中'
+              : '执行测试'
+              }}
+            </el-button>
+            <span v-if="runningStatusArr[scope.$index] === 1">|</span>
+            <el-button
+              v-if="runningStatusArr[scope.$index] === 1"
+              type="text"
+              size="small"
+              @click="handleUpdateStatus(scope.row, scope.$index)"
+            >重置</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/knowledgeTree.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  name: 'AutoKnowledgeMapRuleTest',
+  data() {
+    return {
+      list: [],
+      hospitalData: [],
+      hospitalId: '', //选中医院
+      runningStatusArr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //知识图谱规则 测试状态
+    };
+  },
+  computed: {
+    runningStatus() {
+      return this.runningStatusArr.every(item => {
+        return item === 0;
+      });
+    }
+  },
+  created() {
+    this._getHospitalInfoCDSS();
+    this.zskgetDict()
+    // this._getRunningStatus()   // 进入页面立即确认状态
+    this.timer = setInterval(this._getRunningStatus, 20 * 1000);
+  },
+  beforeDestroy() {
+    clearInterval(this.timer);
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      Object.assign(vm, to.params);
+      if (Object.keys(to.params).length === 0) return;
+      vm.getDataList(to.params.hospitalId);
+      // vm.hospitalId = to.params.hospitalId;
+      vm._getRunningStatus();
+    });
+  },
+  methods: {
+    zskgetDict(){
+        api.zskgetDict().then((res) => {
+            if (res.data.code == '0') {
+                const data = res.data.data;
+                const arr =data['31'];
+                localStorage.setItem("zskDicts",JSON.stringify(arr));
+            }
+        }).catch((error) => {
+            console.log(error);
+        });
+    },
+    _getRunningStatus() {
+      const { hospitalId } = this;
+      if (this.hospitalId === '') return;
+      api.getRunningStatusByHospitalId({ hospitalId }).then(res => {
+        if (res.data.code === '0' && res.data.data) {
+          this.runningStatusArr = Object.values(res.data.data).slice(0, 15);
+        }
+      });
+    },
+    // 重置状态
+    handleUpdateStatus(row, index) {
+      const { caseId } = row;
+      // console.log(index,'index');
+      let statusTempArr = [...this.runningStatusArr];
+      statusTempArr[index] = 0;
+      api
+        .updateRunningStatus({
+          hospitalId: this.hospitalId,
+          caseId,
+          status: 0
+        })
+        .then(res => {
+          if (res.data.code === '0' && res.data.data) {
+            this.$message({
+              message: '重置成功',
+              type: 'success'
+            });
+            this.getDataList(this.hospitalId); // 重新获取列表
+          } else {
+            this.$message.error(res.data.msg || '重置失败');
+            this.getDataList(this.hospitalId); // 重新获取列表
+          }
+          this.runningStatusArr = statusTempArr;
+        });
+    },
+
+    indexMethod(index) {
+      return index + 1;
+    },
+    // 执行测试
+    handleTest(row, index) {
+      this.runningStatusArr = this.runningStatusArr.map((item, idx) => {
+        if (idx === index) {
+          return 1;
+        } else {
+          return 0;
+        }
+      });
+      const { caseName, caseId } = row;
+      let params = {
+        caseId,
+        hospitalId: this.hospitalId
+      };
+
+      api.autoRuleTest(params).then(res => {
+        if (res.data.code === '0' && res.data.data) {
+          this.getDataList(this.hospitalId);
+          this.$message({
+            message: '测试成功',
+            type: 'success'
+          });
+        } else {
+          this.$message.error('测试失败');
+          this.getDataList(this.hospitalId);
+        }
+        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+      });
+    },
+    // 所有规则测试
+    handleAllTest() {
+      if (this.hospitalId === '') {
+        this.$message({
+          message: '请先选择医院',
+          type: 'warning'
+        });
+        return;
+      }
+      this.runningStatusArr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
+      api.allRuleTest({ hospitalId: this.hospitalId }).then(res => {
+        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        if (res.data.code === '0' && res.data.data) {
+          this.getDataList(this.hospitalId);
+          this.$message({
+            message: '所有规则测试成功',
+            type: 'success'
+          });
+        } else {
+          this.$message.error('所有规则测试失败');
+          this.getDataList(this.hospitalId);
+        }
+      });
+    },
+
+    // 跳转至失败/成功条数页面
+    goToFailedOrSuccessPage(row, type) {
+      const page = this.handleGoPage(row.caseName);
+      let hospital = this.hospitalData.find(item => item.id === this.hospitalId);
+      let hospitalName = hospital.name;
+      let localAuto = {
+        resultId:row.resultId,
+        type,
+        hospitalName,
+        caseName:row.caseName.replace(/\_/,'-')
+      }
+      localStorage.setItem('localAuto',JSON.stringify(localAuto))
+      this.$router.push({
+        name: 'AutoBillCommonTest',
+        params: {
+          data: { ...row },
+          type,
+          hospitalId: this.hospitalId,
+          hospitalName
+        }
+      });
+    },
+    // 处理跳转到的页面
+    handleGoPage(caseName) {
+      switch (caseName) {
+        case '开单合理性提醒_通用规则':
+          return 'BillCommonTest';
+        case '开单类型提醒_输血规则':
+          return 'BillFusionTest';
+        case '危机值提醒_实验室检查规则':
+          return 'CriticalLabTest';
+        case '危机值提醒_辅助检查规则':
+          return 'CriticalAuxTest';
+        case '高风险提醒_高危药品规则':
+          return 'HighRiskDrugTest';
+        case '高风险提醒_高危手术规则':
+          return 'HighRiskOperationTest';
+        case '其他提醒_化验规则':
+          return 'OtherAssayRuleTest';
+        case '其他提醒_输血规则':
+          return 'OtherFusionRuleTest';
+        case '其他提醒_辅检规则':
+          return 'OtherAuxRuleTest';
+        default:
+          return null;
+      }
+    },
+
+    // 获取医院信息
+    _getHospitalInfoCDSS() {
+      api.getRecordHopitalList().then(res => {
+        if (res.data.code === '0') {
+          this.hospitalData = res.data && res.data.data;
+        }
+      });
+    },
+
+    // 选中医院
+    handleChange(val) {
+      if (val === '') return;
+      this.getDataList(val);
+      this._getRunningStatus(); // 选中后立即请求状态
+    },
+
+    // 获取列表数据
+    getDataList(id) {
+      const params = {
+        hospitalId: id
+      };
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.autoGetCaseResultList(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data && res.data.data;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      if (this.hospitalId === '') {
+        this.$message({
+          message: '请先选择医院',
+          type: 'warning'
+        });
+        return;
+      }
+      this.$alert('确定要导出规则未使用映射关系吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning'
+      })
+        .then(() => {
+          api.autoExportExcel({ hospitalId: this.hospitalId }).then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '规则未使用映射关系.xls');
+            }
+          });
+        })
+        .catch(() => {});
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+@import '../../less/admin.less';
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 1174 - 0
src/components/basicKnow/AddTerm.vue


+ 264 - 0
src/components/basicKnow/BasicPartOfSpeech.vue

@@ -0,0 +1,264 @@
+<template>
+  <div>
+    <crumbs title="基础词性类型维护" style="min-width: 980px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="关系名称:">
+          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="数字编码:">
+          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="状态:" class="selectMedicine">
+          <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+            <el-option v-for="item in stateList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item class="dododo">
+          <el-button size="mini" @click="filterDatas">确认</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="contents">
+      <el-table :data="list" border style="width: 100%">
+  <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></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="uniqueName"
+          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="uniqueName" 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="uniqueName" 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">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'Fusion', //化验大小项和公表维护
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '', //标准诊断名称
+        status: ''
+      },
+      stateList: [
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' }
+      ],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      uploadInfo: '导入'
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.clearFilter();
+      // that.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  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: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(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.getFusionPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: ''
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+
+    // 跳转至编辑页面
+    modifyRelation(row) {
+      // const item = Object.assign({}, row);
+      // const pam = this.searched
+      //   ? {
+      //       currentPage: this.currentPage,
+      //       pageSize: this.pageSize,
+      //       filter: this.filter
+      //     }
+      //   : { currentPage: this.currentPage, pageSize: this.pageSize };
+      // this.$router.push({
+      //   name: 'AddFusion',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+
+
+<style lang="less">
+@import '../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+</style>

+ 326 - 0
src/components/basicKnow/BasicRelationship.vue

@@ -0,0 +1,326 @@
+<template>
+  <div>
+    <crumbs title="基础关系类型维护" minWidth="995px" class="knowledgeTitle">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="关系类型名称:">
+          <el-select v-model="filter.type" clearable filterable placeholder="请选择" size="mini">
+            <el-option
+              v-for="item in typeList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="数字编码:">
+          <el-input size="mini" type="number" v-model="filter.term" placeholder="请输入编码"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">确认</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="name" label="关系类型名称" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="code" label="数字编码" show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column prop="operName" label="操作人" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column prop="gmtModified" label="操作时间" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column label="操作" width="160">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              :disabled="true"
+            >修改</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/knowledgeTree.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'BasicTermsMaintenance',
+  data: function() {
+    return {
+      list: [],
+      stateSelect:[
+          {id:'N',name:'启用'},
+          {id:'Y',name:'禁用'},
+      ],
+      // isState:'',
+      cacheData: {}, //因为删除和恢复要及时更新,所以不做缓存
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      searched: false,
+      filter: {
+        term: '',
+        type: '',
+        libName: '',
+      },
+      typeList: [],
+      reloadFlag: true
+    };
+  },
+  created() {
+    // this.getDataList();
+    this.getTypeList();
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+    });
+    this.$nextTick(()=>{
+      that.getDataList();
+    })
+  },
+  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: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+    reloadLib() {
+      if (this.reloadFlag) {
+        this.reloadFlag = false;
+        api.clearStandRuleDrug().then(res => {
+          if (res.data.code == 0) {
+            this.reloadFlag = true;
+          }
+        });
+      }
+    },
+    addMedicalName() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddTerm', params: pam });
+    },
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    getDataList(isTurnPage) {
+      const param = 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.baseRelationTypeGetPage(param)
+        .then(res => {
+          // loading.close();
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            const templis = data.records;
+            for(let i = 0;i < templis.length;i++){
+              templis[i].isDeleted = templis[i].status=='1'?'N':'Y'
+            }
+            this.list = templis;
+            // this.cacheData[param.current] = data.records;
+            this.total = data.total;
+            if (this.inCurrentPage !== undefined) {
+              this.currentPage = this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    getTypeList() {
+      api
+        .baseRelationTypeGetPage({ name: '',size: 1000 })
+        .then(res => {
+          const data = res.data;
+          if (data.code == 0) {
+            this.typeList = data.data.records||[];
+          } else {
+            console.log(res.msg);
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    /*getDetailList(id) {
+        this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+      },*/
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        "code": this.filter.term.trim(),
+        "name": this.filter.type,
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+      };
+      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(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(() => {});
+    },
+    showDelDialog(item) {
+      /*const param = {
+          term:item.term,
+          type:item.type,
+          id:item.id
+        }*/
+      const param = {
+        conceptId: item.conceptId
+      };
+      let url = item.isDeleted === 'N'?'disableConcept':'startConcept'
+      let waringTxt =
+        item.isDeleted === 'N'
+          ? '是否禁用该标准术语?'
+          : '是否重新启用该条数据?';
+      this.showConfirmDialog(waringTxt, () => {
+        api[url](param)
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (item.isDeleted !== 'N') {
+                //恢复成功后跳转到筛选条件的首页
+                this.currentPage = 1;
+              } else {
+                if (this.filter.isState !== '' && 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 = {
+        term: '',
+        type: '',
+        libName: '',
+        isState: ''
+      };
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+@import '../../less/admin.less';
+
+/deep/ .container.knowledgeTitle {
+  height: 40px;
+}
+/deep/ .contents.knowledgeContents {
+  padding: 64px 20px 0;
+}
+/deep/ .secLine.el-form {
+  float: right;
+  display: block;
+  position: relative;
+  top: -5px;
+}
+.delete {
+  color: red;
+}
+.review {
+  color: #22ccc8;
+}
+.deletes {
+  cursor: default;
+  color: red;
+}
+.reviews {
+  color: #606266;
+  cursor: default;
+}
+.el-table .cell {
+  overflow: hidden;
+  white-space: nowrap;
+}
+#upFile {
+  display: none !important;
+}
+</style>

+ 396 - 0
src/components/basicKnow/BasicTermsMaintenance.vue

@@ -0,0 +1,396 @@
+<template>
+  <div>
+    <crumbs title="基础术语维护" minWidth="995px" class="knowledgeTitle">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="医学标准术语:">
+          <el-input size="mini" v-model="filter.term" placeholder="请输入术语"></el-input>
+        </el-form-item>
+        <el-form-item label="术语类型:">
+          <el-select v-model="filter.type" clearable filterable placeholder="请选择" size="mini">
+            <el-option
+              v-for="item in typeList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.code"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="同义词:">
+          <el-input size="mini" v-model="filter.libName" placeholder="输入同义词"></el-input>
+        </el-form-item>
+                <el-form-item label="状态:">
+                    <el-select v-model="filter.isState" 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" type="warning" @click="addMedicalName" style="margin:0 10px">+ 新增术语</el-button>
+          <el-button
+            size="mini"
+            @click="reloadLib"
+          >更新数据</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="libName" label="医学标准术语" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="typeName" label="术语类型"></el-table-column>
+        <el-table-column prop="synonymName" label="同义词" show-overflow-tooltip></el-table-column>
+        <el-table-column label="状态" width="100">
+          <template slot-scope="scope">
+            <span>{{scope.row.isDeleted == 'N'?'启用':'禁用'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="modifierName" label="操作人"></el-table-column>
+        <el-table-column prop="gmtModified" label="操作时间" :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column label="操作" width="160">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="toEditProduct(scope.row)"
+            >修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              @click="toEditProduct(scope.row,true)"
+            >复制</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              :class="scope.row.isDeleted == 'N'?'delete':'review'"
+              @click="showDelDialog(scope.row)"
+            >{{scope.row.isDeleted == 'Y'?'启用':'禁用'}}</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/knowledgeTree.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'BasicTermsMaintenance',
+  data: function() {
+    return {
+      list: [],
+      stateSelect:[
+          {id:'N',name:'启用'},
+          {id:'Y',name:'禁用'},
+      ],
+      // isState:'',
+      cacheData: {}, //因为删除和恢复要及时更新,所以不做缓存
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      searched: false,
+      filter: {
+        term: '',
+        type: '',
+        libName: '',
+      },
+      typeList: [],
+      reloadFlag: true
+    };
+  },
+  created() {
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
+    
+    this.getTypeList();
+    //返回时避免参数未赋值就获取列表
+    this.$nextTick(()=>{
+      this.getDataList();
+    })
+  },
+  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: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+    reloadLib() {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      if (this.reloadFlag) {
+        this.reloadFlag = false;
+        api.clearStandRuleDrug().then(res => {
+          this.getDataList();
+          if (res.data.code == 0) {
+            this.reloadFlag = true;
+              this.warning('更新成功','success');
+          }else{
+              this.warning(res.data.msg||'更新失败,请重试');
+          }
+        });
+      }
+    },
+    addMedicalName() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddTerm', params: pam });
+    },
+    toEditProduct(row, copy) {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({
+        name: 'AddTerm',
+        // params: {info:row}
+        params: Object.assign(pam, { id: row.conceptId, copy: copy })
+      });
+    },
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    getDataList(isTurnPage) {
+      const param = 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.getBaseConceptInfoPage(param)
+        .then(res => {
+          loading.close();
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            const templis = data.records;
+            for(let i = 0;i < templis.length;i++){
+              templis[i].isDeleted = templis[i].status=='1'?'N':'Y'
+            }
+            this.list = templis;
+            // this.cacheData[param.current] = data.records;
+            this.total = data.total;
+            if (this.inCurrentPage !== undefined) {
+              this.currentPage = this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    getTypeList() {
+      api
+        .baseTypeGetPage({ name: '',size: 1000 })
+        .then(res => {
+          const data = res.data;
+          if (data.code == 0) {
+            this.typeList = data.data.records||[];
+          } else {
+            console.log(res.msg);
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    /*getDetailList(id) {
+        this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+      },*/
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        "libName": this.filter.term.trim(),
+        "libType": this.filter.type,
+        "status": this.filter.isState=='N'?'1':this.filter.isState=='Y'?'0':'',
+        "synonymName": this.filter.libName.trim(),
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        isDeleted: this.filter.isState
+      };
+      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(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(() => {});
+    },
+    showDelDialog(item) {
+      /*const param = {
+          term:item.term,
+          type:item.type,
+          id:item.id
+        }*/
+      const param = {
+        conceptId: item.conceptId
+      };
+      let url = item.isDeleted === 'N'?'disableConcept':'startConcept'
+      let waringTxt =
+        item.isDeleted === 'N'
+          ? '是否禁用该标准术语?'
+          : '是否重新启用该条数据?';
+      this.showConfirmDialog(waringTxt, () => {
+        api[url](param)
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (item.isDeleted !== 'N') {
+                //恢复成功后跳转到筛选条件的首页
+                this.currentPage = 1;
+              } else {
+                if (this.filter.isState !== '' && 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 = {
+        term: '',
+        type: '',
+        libName: '',
+        isState: ''
+      };
+    }
+  }
+};
+</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;
+}
+.deletes {
+  cursor: default;
+  color: red;
+}
+.reviews {
+  color: #606266;
+  cursor: default;
+}
+.el-table .cell {
+  overflow: hidden;
+  white-space: nowrap;
+}
+#upFile {
+  display: none !important;
+}
+</style>

+ 126 - 0
src/components/basicKnow/SearchList.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="conceptSearch" :style="{'top':top?top:'200px'}" ref="conceptSearch">
+    <h4  class="conceptTitle">{{title||'术语(概念ID)搜索'}}</h4>
+    <img class="closeSearch" src="../../images/close-icon.png" @click="closeSearch" alt="">
+    <p class="searchWrap">
+      <img class="search" src="../../images/search.png" alt="搜索">
+      <input v-model.trim="conceptText" @input="searchConcept" type="text" ref="conceptInput" class="searchText" :placeholder="placeTxt||'请输入关键词搜索'">
+    </p>
+    <ul class="conceptList" ref="conceptList">
+      <li 
+        v-for="item in conceptList" 
+        class="conceptItem ellipsis"
+        :title="item.conceptName"
+        @click="selectConcept(item)"
+        :key="item.conceptId">
+        {{item.conceptName}}
+      </li>
+      <li class="noresult" v-if="conceptList.length==0">暂无结果~</li>
+    </ul>
+  </div>
+</template>
+<script>
+import api from '@api/knowledgeTree.js';
+export default {
+  props:['conceptList','addLevel','top','title','placeTxt'],
+  data(){
+    return {
+      conceptText: '',
+      list: [], //概念列表
+      timer:null
+    }
+  },
+  watch:{
+    addLevel:{
+      handler(newName, oldName) {
+        this.conceptText = ''
+        this.list = []
+      },
+      deep: true
+    }
+  },
+  destroyed(){
+    this.$emit('searchConcept','')
+  },
+  methods:{
+    closeSearch() {
+      this.$emit('closeSearch')
+    },
+    selectConcept(item) {
+      this.$emit('selectConcept',{item,txt:this.conceptText})
+      // this.$emit('closeSearch')
+    },
+    searchConcept() {
+      if(this.timer) {
+        clearTimeout(this.timer)
+      }
+      this.timer = setTimeout(()=>{
+        this.$emit('searchConcept',this.conceptText)
+      },300)
+    },
+  }
+}
+</script>
+<style lang="less" scoped>
+.conceptSearch {
+  position: fixed;
+  right: 20px;
+  top: 200px;
+  bottom: 10px;
+  width: 300px;
+  background: #fff;
+  border: 1px solid #C9C9C9;
+  text-align: center;
+  z-index: 2;
+  padding: 30px;
+  box-sizing: border-box;
+  .conceptTitle {
+    width: 100%;
+    text-align: center;
+    padding: 20px 0;
+  }
+  .searchText {
+    padding: 0 35px 0 15px;
+    width: 100%;
+    height: 34px;
+    border: 1px solid #C9C9C9;
+    box-sizing: border-box;
+  }
+  .conceptList {
+    min-height: 200px;
+    max-height:300px;
+    margin: -2px auto 0;
+    border: 1px solid #E1DFDF;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+  .conceptItem {
+    height: 34px;
+    line-height: 34px;
+    text-align: left;
+    padding: 0 15px;
+    cursor: pointer;
+  }
+  .conceptItem:hover {
+    background: #f5f7fa;
+  }
+  .closeSearch {
+    position: absolute;
+    width: 30px;
+    right: 0;
+    top: 0;
+  }
+  .searchWrap {
+    position: relative;
+    .search {
+      position: absolute;
+      right: 7px;
+      top:8px;
+    }
+  }
+}
+.noresult {
+  padding: 20px 0;
+  color: #ccc;
+}
+</style>

+ 116 - 0
src/components/basicKnow/SimilarListDrag.vue

@@ -0,0 +1,116 @@
+<template>
+    <div  
+    v-if="searchType ==='standard'&& similarList.length > 0&&isShow" 
+    class="similarBox clearfix"
+        id="dragModalWrap"
+    > 
+        <div class="tabTitle"  id="dragModalTitle" @mousedown="dragAdd($event)" @mouseup="dragDel">
+            相似词数据
+        </div>
+    
+        <div class="tableBox">
+            
+            <table class="similarTable">
+            <tr>
+                <td>序号</td>
+                <td>术语</td>
+                <td>归属</td>
+            </tr>
+            <tr v-for="(item,index) in similarList" :key="item.conceptId">
+                <td>{{index+1}}</td>
+                <td>{{item.name}}</td>
+                <td>({{item.libType}}){{item.isConceptRemark}}</td>
+            </tr>
+            </table>
+        </div>
+        <div class="closeTableBox"
+        >
+            <span class="closeTable"  @click="closeTable">关闭</span>
+        </div>
+    </div>
+</template>
+<script>
+import utils from '@api/utils.js';
+export default {
+    name: "SimilarListDrag",
+    props: ["searchType","similarList","isShow"],
+    data() {
+        return{
+
+        }
+    },
+    methods: {
+        dragAdd(ev){
+            utils.dragBox('dragModalWrap','dragModalTitle','add')
+        },
+        dragDel(){
+            utils.dragBox('dragModalWrap','dragModalTitle','del')
+        },
+        closeTable(){
+            this.$emit("closeTable")
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+.similarBox {
+    position: fixed;
+    background: #fff;
+    width: 400px;
+    max-height: 280px;
+    top: 350px;
+    // border: 1px solid #000;
+   
+     z-index: 10;
+     left: 660px;
+    //  top: 0;
+     box-shadow:0 0 12px #ccc;
+  }
+  .tabTitle {
+    width: 100%;
+    height: 40px;
+    line-height: 40px;
+    font-size: 16px;
+    font-weight: bold;
+    cursor: move;
+  }
+  .closeTableBox{
+    position: relative;
+    height: 35px;
+  }
+  .closeTable {
+    position: absolute;
+    display: inline-block;
+    width: 40px;
+    height: 24px;
+    line-height: 24px;
+    border-radius: 5px;
+    cursor: pointer;
+    border: 1px solid #000;
+    box-sizing: border-box;
+    right: 30px;
+    top: 5px;
+  }
+  .tableBox {
+    max-height: 200px;
+    overflow: auto;
+    padding: 0 30px;
+  }
+  .similarTable{
+          
+    width: 100%;
+    border-collapse: collapse;
+   
+    >tr{
+        height: 30px;
+    text-align: center;
+       border: 1px solid #000;
+      td{
+        border: 1px solid #000;
+        width: 135px;
+        position: relative;
+      }
+    }
+    
+  }
+</style>

+ 77 - 0
src/components/basicKnow/TreeTab.vue

@@ -0,0 +1,77 @@
+<template>
+  <div class="tabList">
+    <ul class="clearfix">
+      <li :class="{'curTab':curId==item.id}" 
+        @click="()=>handleTabClick(item.id)" 
+        v-for="item in tab" :key="item.id"
+      >{{item.name}}<span v-if="curId==item.id"></span></li>
+    </ul>
+  </div>
+</template>
+
+<script>
+export default {
+  data(){
+    return {
+      curId:'1',
+        tab:[
+          {name:'化学物质类别',id:'1'},
+          {name:'治疗学类别',id:'2'},
+          {name:'药理学类别',id:'3'},
+          {name:'解剖学类别',id:'4'},
+          {name:'实验室检查类别',id:'7'},
+          {name:'辅助检查类别',id:'8'},
+        ],
+    }
+  },
+  mounted(){
+    let elSide = document.querySelector('.el-aside'),tabWidth = document.querySelector('.tabList');
+    // window.onresize = function(){
+    //   tabWidth = document.querySelector('.tabList')
+    //   tabWidth.style.left = elSide.offsetWidth+20+'px'
+    // }
+    tabWidth.style.left = elSide.offsetWidth+20+'px'
+  },
+  methods:{
+      handleTabClick(id){
+        this.curId = id
+        this.$emit('getTreeList',id)
+      },
+  }
+}
+</script>
+<style lang="less" scoped>
+.tabList {
+  position: fixed;
+  top: 100px;
+  right: 20px;
+  left: 270px;
+  z-index: 10;
+  border-top: 28px solid #dee2ea;
+  border-bottom: 10px solid #dee2ea;
+  box-sizing: border-box;
+  ul {
+      background-color: #fff;
+    li {
+      float: left;
+      height: 60px;
+      line-height: 60px;
+      margin: 0 15px;
+      box-sizing: border-box;
+      cursor: pointer;
+      position: relative;
+      span {
+        position: absolute;
+        bottom: 10px;
+        left: 0;
+        width: 100%;
+        height: 2px;
+        background-color: #21CBC7;
+      }
+    }
+    .curTab {
+        color: #48C5D7;
+    }
+  }
+}
+</style>

+ 48 - 14
src/components/cdssManage/AddMedicinePrompt.vue

@@ -36,7 +36,7 @@
           </el-form-item>
           <el-form-item label="已选择标准术语:" label-width="160px">{{form.selectedTermName}}</el-form-item>
           <el-form-item
-            v-if="form.selectedTerm&&(form.typeId==1||form.typeId==3||form.typeId==4||form.typeId==5)"
+            v-if="form.selectedTerm&&(form.typeId==1||form.typeId==3||form.typeId==4||form.typeId==5||form.typeId==6)"
             :label="titleChange"
             prop="titleChange"
             label-width="160px"
@@ -52,6 +52,7 @@
             :index="i"
             :total="form.prags.length"
             :isEdit="isEdit"
+            :isCopy="isCopy"
             ref="subForm"
             @add="addParagraph(i)"
             @del="delParagraph"
@@ -109,6 +110,7 @@
 import api from '@api/cdss.js';
 import InfoParagraph from './MedicineInfoPg';
 import config from '@api/config';
+import $ from 'jquery';
 
 export default {
   name: 'AddMedicinePrompt',
@@ -150,13 +152,13 @@ export default {
       },
       rules: {
         selectedTerm: [
-          { required: true, message: '请选择术语标签', trigger: 'change' }
+          { required: true, message: '请选择标准术语', trigger: 'change' }
         ],
         fileTitle: [
           { required: true, message: '请输入标题名称', trigger: 'change' },
           {
             validator: (rule, value, callback) => {
-              if (value.length > 30) {
+              if (value.trim().length > 30) {
                 callback(new Error('标题名称不能超过30字'));
               } else {
                 callback();
@@ -168,7 +170,21 @@ export default {
         fileList: [
           { required: true, message: '请上传文件', trigger: 'change' }
         ],
-        titleChange: [{ max: 30, message: '标题最多30字', trigger: 'change' }]
+        titleChange: [
+          // {
+          //   validator: (rule, value, callback) => {
+          //     if (!value.trim()) {
+          //       callback(
+          //         new Error('请输入' + this.titleChange.replace(':', ''))
+          //       );
+          //     } else {
+          //       callback();
+          //     }
+          //   },
+          //   trigger: 'change'
+          // },
+          { max: 30, message: '标题最多30字', trigger: 'change' }
+        ]
       },
       saveDisable: false, //保存按钮禁止点击
       showDrop: false, //下拉框显示文字bug1774
@@ -179,7 +195,7 @@ export default {
       showConfirm: true,
       isSuccessUpload: 0, //是否上传成功  0: 不在上传  1: 上传过程中  2: 上传成功
       isShowTip: false,
-      showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查 6手术和操作
+      showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查 6检查子   7手术和操作
       editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
       startCount: -1,
       isSaveSuccess: false // 是否保存成功
@@ -211,7 +227,13 @@ export default {
       this.isEdit = isEdit;
       this.isCopy = isCopy;
       this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
-      isEdit && this.changeWord(data);
+      (isEdit || isCopy) && this.changeWord(data);
+      if (isCopy) {
+        const _this = this;
+        setTimeout(() => {
+          _this.handleClear();
+        }, 300);
+      }
       api
         .getTremList({ id: data.id })
         .then(res => {
@@ -233,7 +255,10 @@ export default {
               this.form.titleChange =
                 data.type == 1
                   ? data.clinicalPathwayName
-                  : data.type == 3 || data.type == 4 || data.type == 5
+                  : data.type == 3 ||
+                    data.type == 4 ||
+                    data.type == 5 ||
+                    data.type == 6
                   ? data.noticeName
                   : '';
               this.form.selectedTermName =
@@ -347,7 +372,7 @@ export default {
       this.titleChange =
         type == 1
           ? '临床路径标题:'
-          : type == 3 || type == 4 || type == 5
+          : type == 3 || type == 4 || type == 5 || type == 6
           ? '注意事项标题:'
           : '';
       this.form.fileTitle = '';
@@ -377,7 +402,7 @@ export default {
         it = Object.assign(this.form.prags[i]);
         this.form.prags.splice(i - 1, 2, it, temp);
         this.$nextTick(() => {
-          div.scrollTop = this.$refs.subForm[i-1].$el.offsetTop -48;
+          div.scrollTop = this.$refs.subForm[i - 1].$el.offsetTop - 48;
         });
       } else {
         if (i === this.form.prags.length - 1) {
@@ -446,15 +471,19 @@ export default {
       let positionArr = positiontemp.reduce(function(a, b) {
         return a.concat(b);
       }); // 所有被选中的值集合
-      // console.log(positionArr, 'positionArr');
-      // console.log(this.showType, '当前页的显示类型');
+      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(isVisFlag, 'isVisFlag是否显示');
       if (
-        (this.showType == 3 || this.showType == 4 || this.showType == 5) &&
+        (this.showType == 3 ||
+          this.showType == 4 ||
+          this.showType == 5 ||
+          this.showType == 6) &&
         isVisFlag
       ) {
+        console.log('进入校验');
         //若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
         this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
@@ -463,6 +492,7 @@ export default {
           trigger: 'change'
         });
         this.$refs.groups.validateField('titleChange');
+        this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
         if (this.form.titleChange.trim() !== '') {
@@ -485,6 +515,7 @@ export default {
           trigger: 'change'
         });
         this.$refs.groups.validateField('titleChange');
+        this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
         if (this.form.titleChange.trim() !== '') {
@@ -588,7 +619,9 @@ export default {
         paramsAll.id = this.conceptId;
         paramsAll.name = this.form.name;
         paramsAll.noticeName =
-          types == 3 || types == 4 || types == 5 ? this.form.titleChange : '';
+          types == 3 || types == 4 || types == 5 || types == 6
+            ? this.form.titleChange
+            : '';
         paramsAll.type = this.form.typeId;
         paramsAll.details = tempArr;
         param = paramsAll;
@@ -615,6 +648,7 @@ export default {
 
     //保存编辑 接口
     sendSaveOrEdit(param) {
+      this.isCopy && (param.id = undefined);
       api
         .saveTermPrompts(param)
         .then(res => {

+ 16 - 0
src/components/cdssManage/MedicalTerm.vue

@@ -54,6 +54,14 @@
             >{{scope.row.drugNum}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="scaleNum" label="量表关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('ScaleManage',scope.row)"
+            >{{scope.row.scaleNum}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operationNum" label="手术/操作关联">
           <template slot-scope="scope">
             <span
@@ -78,6 +86,14 @@
             >{{scope.row.deptNum}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="nurseNum" label="护理关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('Nursing',scope.row)"
+            >{{scope.row.nurseNum}}</span>
+          </template>
+        </el-table-column>
       </el-table>
       <div class="pagination">
         <el-pagination

+ 23 - 5
src/components/cdssManage/MedicineInfoPg.vue

@@ -13,7 +13,7 @@
                 <el-option label="是" :value="1"></el-option>
             </el-select>
     </el-form-item>-->
-    <el-form-item label="段落标题:" prop="title" label-width="160px">
+    <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">
@@ -49,7 +49,7 @@ 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', 'total', 'showType'],
+  props: ['data', 'index', 'isEdit', 'isCopy', 'total', 'showType'],
   name: 'MedicineInfoParagraph',
   components: {
     quillEditor
@@ -129,14 +129,23 @@ export default {
       this.toolbarMode
     ];
     this.renderPositions();
-    if (this.isEdit) {
+    if (this.isEdit||this.isCopy) {
       setTimeout(() => {
         this.rules = {
           position: [
             { required: true, message: '请选择内容类型', trigger: 'change' }
           ],
           title: [
-            { required: true, message: '请输入段落标题', trigger: 'change' },
+            {
+              validator: (rule, value, callback) => {
+                if (!value.trim()) {
+                  callback(new Error('请输入段落标题'));
+                } else {
+                  callback();
+                }
+              },
+              trigger: 'change'
+            },
             { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
           ],
           content: [
@@ -150,7 +159,16 @@ export default {
           { required: true, message: '请选择内容类型', trigger: 'change' }
         ],
         title: [
-          { required: true, message: '请输入段落标题', trigger: 'change' },
+          {
+            validator: (rule, value, callback) => {
+              if (!value.trim()) {
+                callback(new Error('请输入段落内容'));
+              } else {
+                callback();
+              }
+            },
+            trigger: 'change'
+          },
           { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
         ],
         content: [

+ 3 - 4
src/components/cdssManage/MedicinePrompt.vue

@@ -53,9 +53,8 @@
               size="small"
               @click="toEditProduct(scope.row)"
             >修改</el-button>
-            <!-- <span style="margin:0 3px;">|</span>
-                        <el-button v-if="scope.row.isDeleted=='Y' || scope.row.typeId === 82 || scope.row.typeId === 83" type="text" size="small" class="is-disabled">复制</el-button>
-            <el-button v-if="scope.row.isDeleted=='N'&&scope.row.typeId !== 82 && scope.row.typeId !== 83" type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>-->
+             <span style="margin:0 3px;">|</span>
+             <el-button type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
             <span style="margin:0 3px;">|</span>
             <el-button
               v-if="scope.row.status===0"
@@ -214,7 +213,7 @@ export default {
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
       this.$router.push({
-        name: 'AddMedicinePrompt',
+        name: 'AddMedicinePromptCDSS',
         params: Object.assign(pam, { data: row, isCopy: true })
       });
     },

+ 427 - 0
src/components/cdssManage/nursing/Addnursing.vue

@@ -0,0 +1,427 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '护理关联维护--修改关联' : '护理关联维护--添加关联'"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Nursing"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="120px"
+      ref="relationForm"
+    >
+      <div class="AddChemicalAndCommonMappingBox clearfix">
+        <div class="titleBox clearfix">
+          <p class="title">医院术语</p>
+          <p class="title">标准术语</p>
+        </div>
+        <div class="leftBox clearfix">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="护理名称:" prop="hisName">
+                <el-input v-model="form.hisName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="护理名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="midBox">
+          <img class="midLogo" src="../../../images/relation.png" alt />
+          <p class="midTitle">相互关联</p>
+        </div>
+        <div class="rightBox">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="护理名称:" prop="searchText">
+                <el-select
+                  style="width:100%; minWidth: 240px"
+                  v-model="form.searchText"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @visible-change="handleVisible"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                  reserve-keyword
+                >
+                  <el-option
+                    v-for="(item,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="item.name"
+                    :value="item.name"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="护理名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="btn">
+        <el-form-item>
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/cdss.js';
+export default {
+  name: 'AddNursing',
+  data() {
+    return {
+      isEdit: false,
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入护理名称', trigger: 'change' },
+          { max: 80, message: '护理名称最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择护理名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      searchInfo: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data, hospitaiName } = this.$route.params;
+    this.hospitaiName = hospitaiName;
+    this.hospitalId = data && data.hospitalId;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.searchInfo = query;
+      this.showDrop = true;
+      let params = {
+        type: 11, //科室
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.nursenames;
+        }
+      });
+    },
+    changeWord(newVal) {
+      console.log(newVal);
+    },
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            hospitalId: this.hospitalId
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .nurseIsExistRecord(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);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Nursing',
+            params: Object.assign({}, this.$route.params, {
+              currentPage: 1
+            })
+          });
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(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'
+      });
+    }
+  }
+};
+</script>
+<style lang="less">
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    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 20px;
+  }
+  .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;
+  }
+  // .selectItemName {
+  //   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;
+  // }
+  .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;
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .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;
+    }
+  }
+}
+body {
+  .el-select-dropdown {
+    /deep/ .el-select-dropdown__item {
+      span {
+        color: #333;
+      }
+    }
+    ul {
+      max-width: 300px;
+    }
+
+    /deep/ .el-scrollbar {
+      border: 1px solid #dcdfe6;
+    }
+    /deep/ .popper__arrow {
+      border-bottom-color: #a5a5a5 !important;
+    }
+  }
+  /deep/ .el-popper[x-placement^='bottom'] {
+    margin-top: 8px !important;
+  }
+}
+</style>

+ 529 - 0
src/components/cdssManage/nursing/nursing.vue

@@ -0,0 +1,529 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <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="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="searchBar">
+      <div class="searchContent">
+        <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label="医院护理名称:">
+            <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="标准护理名称:">
+            <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+          <el-form-item class="dododo">
+            <el-button size="mini" @click="filterDatas">检索</el-button>
+            <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <div class="contentsOther">
+      <el-table :data="list" border style="width: 100%">
+        <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="uniqueName" label="标准护理名称" show-overflow-tooltip></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>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'Nursing', //化验大小项和公表维护
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      uploadInfo: '导入',
+      title: '护理关联维护 | ',
+      hospitaiName: '',
+      hospitalId: ''
+    };
+  },
+  created() {
+    const { data } = this.$route.params;
+    this.hospitaiName = (data && data.name) || '';
+    this.hospitalId = data && data.hospitalId;
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  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: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataNurseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precNurseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '护理关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(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.getNursePage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      const { data } = this.$route.params;
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: '',
+        hospitalId: data && data.hospitalId
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            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
+        })
+      });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    modifyRelation(row) {
+      const item = Object.assign({}, row);
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            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
+        })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '删除',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'cancelBtn',
+        // confirmButtonClass: 'confirmC',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteNurseRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$alert('确定要导出全部护理关联数据吗?', '', {
+        confirmButtonText: '确定',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'leftbtn',
+        // customClass: 'exportBox6',
+        title: '提示',
+        type: 'warning'
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     instance.confirmButtonText = '导出中...';
+        //     api.exportFusionRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '输血关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportNurseRecord({ hospitalId: this.hospitalId }).then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '护理关联数据.xls');
+            }
+          });
+        })
+        .catch(() => {
+          // this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+    // 导入模板
+    exportModule() {
+      api.exportNurseModule().then(res => {
+        if (res.status === 200) {
+          setTimeout(() => {
+            utils.downloadExportedData(res.data, '护理导入模板.xls');
+          }, 1500);
+        }
+      });
+    },
+
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('hospitalId', this.hospitalId);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      this.uploadInfo = '导入中...';
+      api.importNurseRecord(formData, header).then(res => {
+        if (res.data.code === '00000001') {
+          this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
+          this.$alert(`导入成功`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        }
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    }
+  }
+};
+</script>
+
+
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+#upFileMatch {
+  display: none;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.searchBar {
+  min-width: 980px;
+  height: 60px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: #dee2ea;
+  z-index: 9999;
+  padding: 40px 20px 0;
+  .searchContent {
+    height: 40px;
+    flex: 1;
+    background-color: #fff;
+    display: flex;
+    justify-content: flex-end;
+    float: right;
+  }
+}
+.contentsOther {
+  padding: 0 20px;
+}
+</style>

+ 192 - 55
src/components/cdssManage/plan/AddPlan.vue

@@ -33,7 +33,7 @@
                 <el-input v-model="form.planName" placeholder="2-30位,可输入汉字、字母、数字和下划线"></el-input>
               </el-form-item>
               <el-form-item label="方案编码" prop="planCode">
-                <el-input v-model="form.planCode" placeholder="4-15位,可输入字母、数字和下划线"></el-input>
+                <el-input v-model="form.planCode" placeholder="可输入字母、数字和下划线"></el-input>
               </el-form-item>
               <el-form-item label="方案配置">
                 <ul>
@@ -62,7 +62,7 @@
                       <div v-if="isOpenCloseItems">
                         <ul class="sub" v-for="(item,index) in  planDefaultList" :key="item.id">
                           <li class="planItem">
-                            <div class="sort">
+                            <div class="sort" v-if="item.ismove">
                               <div class="top">
                                 <img
                                   :src="isTopLight !== index ? require('../../../images/icon_default_top.png') : require('../../../images/icon_hover_top.png')"
@@ -84,8 +84,10 @@
                                 />
                               </div>
                             </div>
+                            <div class="sort" v-else></div>
                             <div class="openOrClose">
                               <span class="planInfo">{{item.name}}</span>
+                              <!-- <span class="planInfo">{{i.name}}</span> -->
                               <div class="switch">
                                 <el-switch
                                   v-model="item.status"
@@ -114,6 +116,43 @@
                               </el-select>
                             </div>
                           </li>
+                          <li
+                            class="planItem"
+                            v-if="item.arr.length>0"
+                            v-for="i in  item.arr"
+                            :key="i.id"
+                          >
+                            <div class="sort"></div>
+                            <div class="openOrClose">
+                              <span class="planInfo">{{i.name}}</span>
+                              <div class="switch">
+                                <el-switch
+                                  v-model="i.status"
+                                  :active-value="1"
+                                  :inactive-value="0"
+                                  active-color="#4BC4D7"
+                                  inactive-color="#BBBBBB"
+                                ></el-switch>
+                              </div>
+                              <span class="planStatus">{{i.status === 1 ? '启用中' : '未启用'}}</span>
+                            </div>
+                            <div class="showNum" v-if="item.number">
+                              <span style="marginRight:8px;">默认显示个数</span>
+                              <el-select
+                                v-model="item.number"
+                                placeholder="请选择"
+                                size="small"
+                                :disabled="item.status !== 1 ? true: false"
+                              >
+                                <el-option label="1" value="1"></el-option>
+                                <el-option label="2" value="2"></el-option>
+                                <el-option label="3" value="3"></el-option>
+                                <el-option label="4" value="4"></el-option>
+                                <el-option label="5" value="5"></el-option>
+                                <el-option label="6" value="6"></el-option>
+                              </el-select>
+                            </div>
+                          </li>
                         </ul>
                       </div>
                     </transition>
@@ -208,7 +247,6 @@ export default {
         ],
         planCode: [
           { required: true, message: '方案编码不能为空', trigger: 'change' },
-          { min: 4, max: 15, message: '长度4-15位', trigger: 'blur' },
           { required: true, validator: validatePass1, trigger: 'blur' }
         ]
       },
@@ -228,7 +266,7 @@ export default {
     };
   },
   beforeRouteLeave(to, from, next) {
-    console.log(this.editCount,'this.editCount');
+    console.log(this.editCount, 'this.editCount');
     if (
       (this.editCount > 3 && !this.isSaveSuccess && this.isEdit) ||
       (this.editCount > 1 && !this.isSaveSuccess && !this.isEdit)
@@ -276,7 +314,7 @@ export default {
     if (isEdit) {
       // 编辑页面
       this.isEdit = true;
-      this.form.hospitalId = data.hospitalId
+      this.form.hospitalId = data.hospitalId;
       let params = {
         hospitalId: data.hospitalId,
         id: data.id
@@ -299,56 +337,72 @@ export default {
     },
     // 方案配置排序
     sortPlan(item, index, type) {
-      // console.log('排序', item, index, type);
+      console.log('排序', item, index, type);
       let tempList = [...this.planDefaultList];
       if (type === 'down') {
+        tempList.splice(index + 2, 0, item);
+        tempList.splice(index, 1);
+        [tempList[index + 1].orderNo, tempList[index].orderNo] = [
+          tempList[index].orderNo,
+          tempList[index + 1].orderNo
+        ];
+        this.planDefaultList = tempList;
         // 降序
-        let plan = tempList.find(item => {
-          return item.orderNo === index + 1;
-        });
-        let tempPlan = { ...plan };
-        let planNext = tempList.find(item => {
-          return item.orderNo === index + 2;
-        });
-        let tempPlanNext = { ...planNext };
-        plan = tempPlanNext;
-        plan.orderNo -= 1;
-        planNext = tempPlan;
-        planNext.orderNo += 1;
-        let arr = tempList.map((i, idx) => {
-          if (idx === index) {
-            return { ...plan };
-          } else if (idx === index + 1) {
-            return { ...planNext };
-          } else {
-            return i;
-          }
-        });
-        this.planDefaultList = [...arr];
+        // let plan = tempList.find(item => {
+        //   console.log(item)
+        //   return item.orderNo === index + 1;
+        // });
+        // console.log(item);
+        // let tempPlan = { ...plan };
+        // let planNext = tempList.find(item => {
+        //   return item.orderNo === index + 2;
+        // });
+        // let tempPlanNext = { ...planNext };
+        // plan = tempPlanNext;
+        // plan.orderNo -= 1;
+        // planNext = tempPlan;
+        // planNext.orderNo += 1;
+        // let arr = tempList.map((i, idx) => {
+        //   if (idx === index) {
+        //     return { ...plan };
+        //   } else if (idx === index + 1) {
+        //     return { ...planNext };
+        //   } else {
+        //     return i;
+        //   }
+        // });
+        // this.planDefaultList = [...arr];
       } else {
+         tempList.splice(index - 1, 0, item);
+        tempList.splice(index+1, 1);
+        [tempList[index - 1].orderNo, tempList[index].orderNo] = [
+          tempList[index].orderNo,
+          tempList[index - 1].orderNo
+        ];
+        this.planDefaultList = tempList;
         // 升序
-        let plan = tempList.find(item => {
-          return item.orderNo === index + 1;
-        });
-        let tempPlan = { ...plan };
-        let planPre = tempList.find(item => {
-          return item.orderNo === index;
-        });
-        let tempPlanPre = { ...planPre };
-        plan = tempPlanPre;
-        plan.orderNo += 1;
-        planPre = tempPlan;
-        planPre.orderNo -= 1;
-        let arr = tempList.map((i, idx) => {
-          if (idx === index) {
-            return { ...plan };
-          } else if (idx === index - 1) {
-            return { ...planPre };
-          } else {
-            return i;
-          }
-        });
-        this.planDefaultList = [...arr];
+        // let plan = tempList.find(item => {
+        //   return item.orderNo === index + 1;
+        // });
+        // let tempPlan = { ...plan };
+        // let planPre = tempList.find(item => {
+        //   return item.orderNo === index;
+        // });
+        // let tempPlanPre = { ...planPre };
+        // plan = tempPlanPre;
+        // plan.orderNo += 1;
+        // planPre = tempPlan;
+        // planPre.orderNo -= 1;
+        // let arr = tempList.map((i, idx) => {
+        //   if (idx === index) {
+        //     return { ...plan };
+        //   } else if (idx === index - 1) {
+        //     return { ...planPre };
+        //   } else {
+        //     return i;
+        //   }
+        // });
+        // this.planDefaultList = [...arr];
       }
     },
 
@@ -377,15 +431,52 @@ export default {
       this.isTopLight = -1;
     },
 
-    // 获取默认方案配置
+    // 添加 获取默认方案配置
     _getDefaultPlans() {
       api.getDefaultPlans().then(res => {
-        console.log(res, '获取默认的方案配置');
+        // console.log(res, '获取默认的方案配置');
         if (res.data.code === '0') {
           this.planDefaultList =
             res.data.data &&
             res.data.data.planDetailDefault.length !== 0 &&
             res.data.data.planDetailDefault[0].planDetails;
+          let planDefaultList = this.planDefaultList.map((item, index) => {
+            if (
+              item.name == '高危' ||
+              item.name == '危急值提醒' ||
+              item.name == '其他提醒'
+            ) {
+              return {
+                ismove: false,
+                ...item
+              };
+            } else {
+              return {
+                arr: [],
+                ismove: true,
+                ...item
+              };
+            }
+          });
+          // this.planDefaultList = JSON.parse(JSON.stringify(planDefaultList)) ;
+          planDefaultList
+            .slice()
+            .reverse()
+            .forEach((item, i, arr) => {
+              if (
+                item.name == '高危' ||
+                item.name == '危急值提醒' ||
+                item.name == '其他提醒'
+              ) {
+                planDefaultList.splice(arr.length - 1 - i, 1);
+                planDefaultList
+                  .find(items => {
+                    return items.name == '开单合理性';
+                  })
+                  .arr.unshift(item);
+              }
+            });
+          this.planDefaultList = planDefaultList;
           this.switchSubStatus =
             res.data.data &&
             res.data.data.planDetailDefault.length !== 0 &&
@@ -415,7 +506,6 @@ export default {
           res.data.data.planDetailDefault[0].planDetails;
       }
       let res1 = await api.getPlanInfoIds(params);
-      console.log(res1, '==================');
       if (res1.data.code === '0') {
         newPlan = res1.data.data[0].sysSetInfo[0].planDetails;
         this.form.planName = res1.data.data[0].planName;
@@ -450,16 +540,63 @@ export default {
       }
       // console.log(endArr,'-=-=-=-=-=');
       this.planDefaultList = endArr;
+      let planDefaultList = this.planDefaultList.map((item, index) => {
+        if (
+          item.name == '高危' ||
+          item.name == '危急值提醒' ||
+          item.name == '其他提醒'
+        ) {
+          return {
+            ismove: false,
+            ...item
+          };
+        } else {
+          return {
+            arr: [],
+            ismove: true,
+            ...item
+          };
+        }
+      });
+      planDefaultList
+            .slice()
+            .reverse()
+            .forEach((item, i, arr) => {
+              if (
+                item.name == '高危' ||
+                item.name == '危急值提醒' ||
+                item.name == '其他提醒'
+              ) {
+                planDefaultList.splice(arr.length - 1 - i, 1);
+                planDefaultList
+                  .find(items => {
+                    return items.name == '开单合理性';
+                  })
+                  .arr.unshift(item);
+              }
+            });
+      this.planDefaultList = planDefaultList;
     },
 
     // format处理细项数据
     handleSendData() {
+      this.planDefaultList.forEach((item, i) => {
+        if(item.name == '开单合理性'){
+          item.arr.slice().reverse().forEach(items => {
+            if (items.name == '高危' ||items.name == '危急值提醒' ||items.name == '其他提醒') {
+              console.log(i)
+              this.planDefaultList.splice(i+1, 0, items);
+            }
+          })
+          item.arr = []
+        }
+      })
+      console.log(this.planDefaultList)
       let TempPlanDetail = [];
       TempPlanDetail = this.planDefaultList.map((item, index) => {
         return {
           code: item.code,
           hospitalId: this.form.hospitalId,
-          // hospitalId: this.hospitalId,
           name: item.name,
           number: item.number,
           orderNo: item.orderNo,
@@ -470,7 +607,7 @@ export default {
         };
       });
       return TempPlanDetail;
-      // console.log(TempPlanDetail, 'TempPlanDetail');
+      console.log(TempPlanDetail, 'TempPlanDetail');
     },
 
     // 处理保存活动信息参数

+ 411 - 0
src/components/cdssManage/scale/AddScale.vue

@@ -0,0 +1,411 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '量表关联维护--修改关联 | '+ hospitaiName : '量表关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="ScaleManage"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="120px"
+      ref="relationForm"
+    >
+      <div class="AddChemicalAndCommonMappingBox clearfix">
+        <div class="titleBox clearfix">
+          <p class="title">医院术语</p>
+          <p class="title">标准术语</p>
+        </div>
+        <div class="leftBox clearfix">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="量表名称:" prop="hisName">
+                <el-input v-model.trim="form.hisName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="量表名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="midBox">
+          <img class="midLogo" src="../../../images/relation.png" alt />
+          <p class="midTitle">相互关联</p>
+        </div>
+        <div class="rightBox">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="量表名称:" 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,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="item.name"
+                    :value="item.name"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="量表名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="btn">
+        <el-form-item>
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config';
+export default {
+  name: 'AddScale',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+        form: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入量表名称', trigger: 'change' },
+          { max: 80, message: '量表名称最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择量表名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      hospitalId: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data, hospitaiName } = this.$route.params;
+    this.hospitaiName = hospitaiName;
+    this.hospitalId = data && data.hospitalId;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+      this.form.form = data.form;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 10, //量表
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.scalenames;
+        }
+      });
+    },
+    changeWord() {},
+    // 获取焦点
+    handleFocus() {},
+
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName, form } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            form: form,
+            hospitalId: this.hospitalId
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .scaleIsExistRecord(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);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateScaleRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'ScaleManage',
+            params: Object.assign({}, this.$route.params, {
+              currentPage: 1
+            })
+          });
+        } 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'
+      });
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    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 20px;
+  }
+  .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;
+  }
+  // .selectItemName {
+  //   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;
+  // }
+  .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;
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .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>

+ 513 - 0
src/components/cdssManage/scale/ScaleManage.vue

@@ -0,0 +1,513 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <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="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="searchBar">
+      <div class="searchContent">
+        <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label="医院量表名称:">
+            <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="标准量表名称:">
+            <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+          <el-form-item class="dododo">
+            <el-button size="mini" @click="filterDatas">检索</el-button>
+            <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <div class="contentsOther">
+      <el-table :data="list" border style="width: 100%">
+        <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="uniqueName" label="标准量表名称" show-overflow-tooltip></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>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'ScaleManage', //化验大小项和公表维护
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      uploadInfo: '导入',
+      title: '量表关联维护 | ',
+      hospitaiName: '',
+      hospitalId: ''
+    };
+  },
+  created() {
+    const { data } = this.$route.params;
+    this.hospitaiName = (data && data.name) || '';
+    this.hospitalId = data && data.hospitalId;
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  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: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataScaleVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precScaleDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '量表关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
+
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(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.getScalePage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      const { data } = this.$route.params;
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: '',
+        hospitalId: data && data.hospitalId
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            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
+        })
+      });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    modifyRelation(row) {
+      const item = Object.assign({}, row);
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            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
+        })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '删除',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'cancelBtn',
+        // confirmButtonClass: 'confirmC',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteScaleRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$alert('确定要导出全部量表关联数据吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning'
+      })
+        .then(() => {
+          api.exportScaleRecord({ hospitalId: this.hospitalId }).then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '量表关联数据.xls');
+            }
+          });
+        })
+        .catch(() => {
+          // this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+
+    // 导入模板
+    exportModule() {
+      api.exportScaleModule().then(res => {
+        if (res.status === 200) {
+          setTimeout(() => {
+            utils.downloadExportedData(res.data, '量表导入模板.xls');
+          }, 1500);
+        }
+      });
+    },
+
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('hospitalId', this.hospitalId);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      this.uploadInfo = '导入中...';
+      api.importScaleRecord(formData, header).then(res => {
+        // console.log(res, '======================res导入结果');
+        if (res.data.code === '00000001') {
+          this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
+          this.$alert(`导入成功`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        }
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    }
+  }
+};
+</script>
+
+
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+#upFileMatch {
+  display: none;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.searchBar {
+  min-width: 980px;
+  height: 60px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: #dee2ea;
+  z-index: 9999;
+  padding: 40px 20px 0;
+  .searchContent {
+    height: 40px;
+    flex: 1;
+    background-color: #fff;
+    display: flex;
+    justify-content: flex-end;
+    float: right;
+  }
+}
+.contentsOther {
+  padding: 0 20px;
+}
+</style>

+ 3 - 3
src/components/common/Crumbs.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="container clearfix" :style="{'minWidth':minWidth?minWidth:'980px'}">
+  <div class="container clearfix" :style="{'minWidth':minWidth?minWidth:'980px',position:fix?fix:'absolute'}">
     <img
       v-if="linkTo"
       class="return-btn fl"
@@ -17,7 +17,7 @@
 <script>
 export default {
   name: 'crumbs',
-  props: ['title', 'linkTo', 'minWidth', 'param'], //minWidth-有些头部选项比较多,最小宽度需要调整
+  props: ['title', 'linkTo', 'minWidth', 'param','fix'], //minWidth-有些头部选项比较多,最小宽度需要调整
   data: function() {
     return {
       isShowEllipsis: false // 是否显示文字省略号
@@ -65,7 +65,7 @@ div.container {
 
 h4 {
   font-size: 15px;
-  width: 280px;
+  width: auto;
   overflow: hidden; /*超出部分隐藏*/
   white-space: nowrap; /*不换行*/
   text-overflow: ellipsis; /*超出部分文字以...显示*/

+ 1 - 0
src/components/icss/AddMedicinePrompt.vue

@@ -35,6 +35,7 @@
                
                 <InfoParagraph v-for="(f,i) in form.prags"
                                 v-if="!upload"
+                               :key="i"
                                :data="f"
                                :index="i"
                                :total="form.prags.length"

+ 328 - 0
src/components/knowledgeExtra/AboutDisease.vue

@@ -0,0 +1,328 @@
+<template>
+    <div>
+        <crumbs title="疾病相关维护" minWidth="995px">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="疾病名称:">
+                    <el-input size="mini" v-model.trim="filter.term" placeholder="请输入名称"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" style="margin:0 10px"  @click="addMedicalMultR">新增疾病</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <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="disName"
+                        label="疾病名称"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="modifierName"
+                        label="操作人">
+                </el-table-column>
+                <el-table-column
+                        prop="gmtModified"
+                        label="操作时间"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                
+                <el-table-column
+                        label="操作" width="160">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row)">删除</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/knowledgeTree.js';
+  import config from '@api/config.js';
+  import utils from '@api/utils.js';
+  
+  export default {
+    name: 'AboutDisease',
+    data: function () {
+      return {
+        list: [],
+        stateSelect:[
+          {id:'N',name:'启用中'},
+          {id:'Y',name:'已删除'},
+        ],
+        isState:'',
+        cacheData: {},
+        currentPage: 1,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
+        total: 0,
+        searched: false,
+        filter: {
+          term:'',
+          type:''
+        },
+        typeList:[]
+      }
+    },
+    created() {
+      const param = this.$route.params;
+      if(param.currentPage&&param.filter){
+        this.inCurrentPage = param.currentPage
+        this.filter = param.filter
+      }
+      //返回时避免参数未赋值就获取列表
+      this.$nextTick(()=>{
+        this.getDataList();
+      });
+    },
+    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: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
+        this.getDataList();
+      },
+      addMedicalMultR(){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({name:'DiseaseTree',
+          params:pam});
+      },
+      toEditProduct(row){
+        const param = {
+          disName: row.disName,
+        };
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        api.getBaseDetail(param).then((res) => {
+          const {code,data,msg} = res.data;
+          if(code=='0'){
+              const item = Object.assign({},row,data);
+              this.$router.push({name:'DiseaseTree',params:Object.assign(pam, {isEdit: true, data: item})});
+          }else{
+              this.$message({
+              message: msg,
+              type: 'warning'
+              });
+          }
+        })
+      },
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getDataList(isTurnPage) {
+        const param = 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.getDiseasePage(param).then((res) => {
+          loading.close()
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.list = data.records;
+            this.cacheData[param.current] = data.records;
+            this.total = data.total;
+            if(this.inCurrentPage!==undefined){
+              this.currentPage=this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      getTypeList(){
+        api.allKnowledgeType({'name':''}).then((res)=>{
+          const data = res.data;
+          if(data.code==0){
+            this.typeList = data.data;
+          }else{
+            console.log(res.msg);
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      /*getDetailList(id) {
+        this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+      },*/
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
+        const param = {
+          disName: this.filter.term,
+          current: this.inCurrentPage||this.currentPage,
+          size: this.pageSize
+        };
+        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(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(() => {});
+      },
+      showDelDialog(item){
+        /*const param = {
+          term:item.term,
+          type:item.type,
+          id:item.id
+        }*/
+        const param = {
+          disName:item.disName
+        }
+        let waringTxt = '是否删除该关系,可能对现有系统造成影响'
+        this.showConfirmDialog(waringTxt,()=>{
+          api.diseaseDelete(param).then((res)=>{
+            if(res.data.code=='0'){
+              if(!this.searched){
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if(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={
+          term:'',
+          type:''
+        };
+      },
+      uploadClick(){
+        let inp = document.getElementById("upFile");
+        inp.click();
+      },
+      uploadFile(e){
+        let fileInfo = e.target.files[0];
+        e.preventDefault();
+        let formData = new FormData();
+        formData.append('uploadfile', fileInfo);
+        const header = {
+          headers:{
+            'Content-Type': 'multipart/form-data'
+          }
+        }
+        api.knowledgeUpload(formData,header).then((res)=>{
+          if(res.data.code==0){
+            this.$message({
+              message: '上传成功',
+              type: 'success',
+            });
+            this.getDataList();
+          }else{
+            this.$message({
+              dangerouslyUseHTMLString: true,
+              message:res.data.msg,
+              type:'warning'
+            });
+          }
+        })
+        
+        //解决上传相同文件不触发change
+        let inp = document.getElementById("upFile");
+        inp.value = "";   
+      },
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+    @import "../../less/admin.less";
+    .delete{
+        color: red;
+    }
+    .review{
+      color: #22ccc8;
+    }
+    .el-table .cell{
+      overflow: hidden;
+      white-space: nowrap;
+    }
+    #upFile{
+      display: none !important;
+    }
+</style>

+ 886 - 0
src/components/knowledgeExtra/AddDevKnow.vue

@@ -0,0 +1,886 @@
+<template>
+  <el-scrollbar style="height: 100%" ref="elscrollbar" id="message-container">
+    <div class="NoiseTemplateWrapper TemplateWrapper knowledgeWrapper">
+      <crumbs
+        :title="'医学术语静态知识维护-'+title"
+        class="topBack"
+        :param="$route.params"
+        linkTo="StaticInfo"
+      ></crumbs>
+      <div class="info-container">
+        <el-form :rules="rules" :model="form" label-width="160px" ref="groups">
+          <el-form-item v-if="!isEdit" label="选择标准术语:" prop="selectedTerm">
+            <el-select
+              v-model="form.selectedTerm"
+              filterable
+              remote
+              clearable
+              :loading="showDrop"
+              loading-text="加载中..."
+              @change="changeWord"
+              @visible-change="handleVisible"
+              value-key="id"
+              @clear="handleClear"
+              ref="termName"
+              placeholder="搜索"
+              :remote-method="searchTerms"
+            >
+              <el-option
+                v-for="(term,idx) in terms"
+                :key="idx"
+                :label="term.name+(term.typeName?'('+term.typeName+')':'')"
+                :value="term"
+                :title="term.name+(term.typeName?'('+term.typeName+')':'')"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="已选择标准术语:" label-width="160px">{{form.selectedTermName}}</el-form-item>
+          <el-form-item
+            v-if="form.selectedTerm&&(form.typeId==1||form.typeId==3||form.typeId==4||form.typeId==5||form.typeId==6)"
+            :label="titleChange"
+            prop="titleChange"
+            label-width="160px"
+          >
+            <el-input v-model="form.titleChange"></el-input>
+          </el-form-item>
+          <p class="line"></p>
+          <DevInfo
+            v-for="(f,i) in form.prags"
+            v-if="!upload"
+            :key="(i+1)*10000 + showType"
+            :data="f"
+            :index="i"
+            :total="form.prags.length"
+            :isEdit="isEdit"
+            :isCopy="isCopy"
+            ref="subForm"
+            @add="addParagraph(i)"
+            @del="delParagraph"
+            @reOrder="reOrder"
+            :showType="showType"
+          ></DevInfo>
+          <el-form-item v-if="upload" label="标题名称搜索:" prop="fileTitle" label-width="160px">
+            <el-input v-model="form.fileTitle"></el-input>
+          </el-form-item>
+          <el-form-item
+            v-if="upload"
+            label="上传文件:"
+            ref="upload"
+            prop="fileList"
+            label-width="160px"
+          >
+            <el-upload
+              @mouseenter.native="handleMouseenter"
+              @mouseleave.native="handleMouseleave"
+              class="upload-demo"
+              :action="config.urls.promptServer"
+              name="upfile"
+              :multiple="false"
+              :limit="1"
+              :on-preview="handlePreview"
+              :on-remove="handleRemove"
+              :before-upload="handleBeforeUpLoad"
+              :before-remove="beforeRemove"
+              :on-change="handleChange"
+              :on-success="handleSuccess"
+              :show-file-list="showFileList"
+              :file-list="form.fileList"
+            >
+              <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">{{form.fileList[0]&&form.fileList[0].name}}</span>
+            <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
+          </el-form-item>
+          <el-form-item label-width="160px">
+            <div class="uploadInfo" v-if="isSuccessUpload===1">文件上传中,请稍等...</div>
+          </el-form-item>
+        </el-form>
+        <div class="btn">
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确 定</el-button>
+        </div>
+      </div>
+    </div>
+  </el-scrollbar>
+</template>
+<script>
+/**
+ *
+ */
+import api from '@api/knowledgeTree.js';
+import DevInfo from './DevInfo';
+import config from '@api/config';
+import $ from 'jquery';
+
+export default {
+  name: 'AddDevKnow',
+  components: {
+    DevInfo
+  },
+  data() {
+    return {
+      isFixedTop: true,
+      isEdit: false,
+      isCopy: false,
+      title: '添加',
+      termTypes: [],
+      terms: [], //术语列表
+      form: {
+        conceptId: '', //术语id
+        isTip: 0, //是否要覆盖,0不覆盖,1覆盖
+        selectedTerm: '', //术语标签
+        termType: '',
+        typeId: '',
+        selectedTermName: '',
+        selectedTermType: '',
+        // titleChange: '',
+        fileList: [],
+        name: '',
+        prags: [
+          {
+            //单个段落相关
+            title: '',
+            content: '',
+            isReason: 0,
+            orderNo: 0,
+            position: [],
+            text: ''
+          }
+        ],
+        fileTitle: '',
+        titleChange: ''
+      },
+      rules: {
+        selectedTerm: [
+          { required: true, message: '请选择标准术语', trigger: 'change' }
+        ],
+        fileTitle: [
+          { required: true, message: '请输入标题名称', trigger: 'change' },
+          {
+            validator: (rule, value, callback) => {
+              if (value.trim().length > 30) {
+                callback(new Error('标题名称不能超过30字'));
+              } else {
+                callback();
+              }
+            },
+            trigger: 'change'
+          }
+        ],
+        fileList: [
+          { required: true, message: '请上传文件', trigger: 'change' }
+        ],
+        titleChange: [
+          // {
+          //   validator: (rule, value, callback) => {
+          //     if (!value.trim()) {
+          //       callback(
+          //         new Error('请输入' + this.titleChange.replace(':', ''))
+          //       );
+          //     } else {
+          //       callback();
+          //     }
+          //   },
+          //   trigger: 'change'
+          // },
+          { max: 30, message: '标题最多30字', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字bug1774
+      config: config,
+      showUpLoad: true,
+      showFileList: false,
+      upload: false,
+      showConfirm: true,
+      isSuccessUpload: 0, //是否上传成功  0: 不在上传  1: 上传过程中  2: 上传成功
+      isShowTip: false,
+      showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查 6检查子   7手术和操作 8量表
+      editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
+      startCount: -1,
+      isSaveSuccess: false // 是否保存成功
+    };
+  },
+  watch: {
+    showType: {
+      handler(newVal, oldVal) {
+        if (newVal !== oldVal) {
+          this.form.prags = this.form.prags.map(item => {
+            return { ...item, position: [] };
+          });
+        }
+      }
+    },
+    form: {
+      handler(newName, oldName) {
+        this.editCount++;
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  created: function() {
+    const { isEdit, data, isCopy } = this.$route.params;
+    if (isEdit || isCopy) {
+      this.showType = data.type; // 编辑页确认显示类型
+      this.isEdit = isEdit;
+      this.isCopy = isCopy;
+      this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
+      (isEdit || isCopy) && this.changeWord(data);
+      if (isCopy) {
+        const _this = this;
+        setTimeout(() => {
+          _this.handleClear();
+        }, 300);
+      }
+      api.getBaseRecordById({ id: data.id })
+        .then(res => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            if (this.form.typeId === 82 || this.form.typeId === 83) {
+              // console.log('data',data)
+              this.form.fileList =
+                data &&
+                data.map(it => {
+                  return JSON.parse(it.content);
+                });
+              this.showFileList = true;
+              this.showUpLoad = false;
+            } else {
+              this.conceptId = data.id;
+              this.form.typeId = data.type;
+              this.form.name = data.name;
+              this.form.titleChange =
+                data.type == 1
+                  ? data.clinicalPathwayName
+                  : data.type == 3 ||
+                    data.type == 4 ||
+                    data.type == 5 ||
+                    data.type == 6
+                  ? data.noticeName
+                  : '';
+              this.form.selectedTermName =
+                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
+              this.form.selectedTerm =
+                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
+              this.form.prags =
+                data &&
+                data.details.map(it => {
+                  return {
+                    title: it.title,
+                    position: this.mapStringToNum(it.contentType),
+                    content: it.content.replace(
+                      /{imageUrlPrefix}/g,
+                      config.imgHost
+                    ),
+                    // isReason:it.isReason,
+                    text: it.text,
+                    disabled: true
+                  };
+                });
+            }
+          }
+        })
+        .catch(error => {
+          if (error.code === '900010001') {
+            return false;
+          }
+          console.log(error);
+        });
+    }
+    setTimeout(() => {
+      this.startCount = this.editCount;
+    }, 500);
+  },
+  mounted() {},
+  beforeRouteLeave(to, from, next) {
+    // if (this.isSuccessUpload === 1) {
+    //   this.$confirm('文件正在上传,是否确定返回?', '提示', {
+    //     confirmButtonText: '确定',
+    //     cancelButtonText: '取消',
+    //     cancelButtonClass: 'cancel',
+    //     type: 'warning'
+    //   })
+    //     .then(() => {
+    //       next();
+    //     })
+    //     .catch(() => {});
+    //   //  this.warning('还有未保存的文件,是否确定返回?');
+    // } else if (this.isSuccessUpload === 2) {
+    //   this.$confirm('还有未保存的文件,是否确定返回?', '提示', {
+    //     confirmButtonText: '确定',
+    //     cancelButtonText: '取消',
+    //     cancelButtonClass: 'cancel',
+    //     type: 'warning'
+    //   })
+    //     .then(() => {
+    //       next();
+    //     })
+    //     .catch(() => {});
+    // } else {
+    //   next();
+    // }
+
+    if (this.startCount !== this.editCount && !this.isSaveSuccess) {
+      this.$alert('还有未保存的内容,确定要退出当前页面吗?', '提示', {
+        confirmButtonText: '确定',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'leaveBtn',
+        // customClass: 'leaveBox',
+        type: 'warning'
+      })
+        .then(() => {
+          next();
+        })
+        .catch(() => {});
+    } else {
+      next();
+    }
+  },
+  methods: {
+    handleClear() {
+      this.form.selectedTermName = '';
+      this.form.selectedTerm = '';
+      this.form.titleChange = '';
+      // console.log('处理清空的操作');
+    },
+
+    handleMouseenter() {
+      if (this.form.fileList.length !== 0) {
+        this.isShowTip = true;
+      }
+    },
+    handleMouseleave() {
+      this.isShowTip = false;
+    },
+    changeWord(newVal) {
+      // console.log(newVal, '选中');
+      this.showType = newVal.type || -1;
+      const name = newVal.name;
+      const typeName = newVal.typeName;
+      const type = newVal.type;
+      this.form.selectedTermName = name + (typeName ? '(' + typeName + ')' : '');
+      // this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
+      this.form.name = name;
+      this.form.fileList = [];
+      this.showFileList = false;
+      this.form.typeId = type || '';
+      this.showUpLoad = true;
+      this.titleChange =
+        type == 1
+          ? '临床路径标题:'
+          : type == 3 || type == 4 || type == 5 || type == 6
+          ? '注意事项标题:'
+          : '';
+      this.form.fileTitle = '';
+      if (newVal.typeId === 82 || newVal.typeId === 83) {
+        this.upload = true;
+        this.form.fileTitle = newVal.title;
+      } else {
+        this.upload = false;
+      }
+    },
+    handleVisible(flag) {
+      if (!flag) {
+        this.terms = [];
+      }
+    },
+    reOrder(isUp, i) {
+      // isUp: 1 上升    0 下降
+      let div = this.$refs['elscrollbar'].$refs['wrap'];
+      let temp = {},
+        it = {};
+      if (isUp === 1) {
+        if (i === 0) {
+          this.warning('已经是第一个,不能再升啦!');
+          return;
+        }
+        temp = Object.assign(this.form.prags[i - 1]);
+        it = Object.assign(this.form.prags[i]);
+        this.form.prags.splice(i - 1, 2, it, temp);
+        this.$nextTick(() => {
+          div.scrollTop = this.$refs.subForm[i - 1].$el.offsetTop - 48;
+        });
+      } else {
+        if (i === this.form.prags.length - 1) {
+          this.warning('已经是最后一个,不能再降啦!');
+          return;
+        }
+        temp = Object.assign(this.form.prags[i + 1]);
+        it = Object.assign(this.form.prags[i]);
+        this.form.prags.splice(i, 2, temp, it);
+      }
+    },
+    addParagraph(i) {
+      this.form.prags.splice(i + 1, 0, {
+        title: '',
+        content: '',
+        isReason: 0,
+        position: [],
+        text: ''
+      });
+      //添加段落光标自动落到新增的段落中
+      setTimeout(() => {
+        this.$refs.subForm[i + 1].$el
+          .getElementsByClassName('el-input__inner')[0]
+          .focus();
+      });
+    },
+    delParagraph(i) {
+      if (this.form.prags.length == 1) {
+        this.warning('只剩一个段落,不能再删啦!');
+        return;
+      }
+      this.showConfirmDialog('确定要删除该段落?', () => {
+        this.form.prags.splice(i, 1);
+      });
+    },
+    back() {
+      this.$router.go(-1);
+    },
+    searchTerms(query) {
+      if (!query.trim()) {
+        this.form.terms = [];
+        return;
+      }
+      //搜索术语列表
+      this.showDrop = true;
+      api.staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] }).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.terms = res.data.data;
+        } else {
+          this.warning('数据获取失败');
+        }
+      });
+    },
+    mapStringToNum(str) {
+      return str.split(',').map(it => {
+        return +it;
+      });
+    },
+
+    // 额外的表单检验
+    formVal() {
+      let positiontemp = this.form.prags.map(item => {
+        return [...item.position];
+      });
+      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是否显示');
+      if (
+        (this.showType == 3 ||
+          this.showType == 4 ||
+          this.showType == 5 ||
+          this.showType == 6) &&
+        isVisFlag
+      ) {
+        console.log('进入校验');
+        //若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
+        this.$refs.groups.clearValidate();
+        this.rules.titleChange.push({
+          required: true,
+          message: '请输入注意事项标题',
+          trigger: 'change'
+        });
+        this.$refs.groups.validateField('titleChange');
+        this.$refs.groups.validateField('selectedTerm');
+        this.rules.titleChange = this.rules.titleChange.slice(0, 1);
+
+        if (this.form.titleChange.trim() !== '') {
+          // console.log('内容不为空');
+          return true;
+        } else {
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
+          this.$nextTick(() => {
+            div.scrollTop = 0;
+          });
+          return false;
+        }
+        // return;
+      } else if (isDiagFlag && this.showType == 1) {
+        // 若医学术语为诊断,且内容类型选择了临床路径,此时“临床路径标题”是必填项
+        this.$refs.groups.clearValidate();
+        this.rules.titleChange.push({
+          required: true,
+          message: '请输入临床路径标题',
+          trigger: 'change'
+        });
+        this.$refs.groups.validateField('titleChange');
+        this.$refs.groups.validateField('selectedTerm');
+        this.rules.titleChange = this.rules.titleChange.slice(0, 1);
+
+        if (this.form.titleChange.trim() !== '') {
+          // console.log('内容不为空');
+          return true;
+        } else {
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
+          this.$nextTick(() => {
+            div.scrollTop = 0;
+          });
+          return false;
+        }
+      }
+    },
+
+    submitForm() {
+      if (this.isSuccessUpload === 1) {
+        this.warning('文件上传中,请稍等');
+        return;
+      }
+      let flagVal = this.formVal(); // 额外的表单校验
+      if (flagVal === false) return;
+      //验证外层表单
+      let goOn = true,
+        it = null;
+      let outIsVia = true; // 外层验证是否通过
+      this.$refs.groups.validate(valid => {
+        if (!valid) {
+          goOn = false;
+          outIsVia = false;
+          return false;
+        }
+      });
+      //验证段落表单
+      let viewHeight = 0; // 定位到表单校验的高度
+      let viewHeightArr = []; // 表单校验出错高度的所有数组
+      if (this.form.typeId !== 82 && this.form.typeId !== 83) {
+        for (let i = 0; i < this.$refs.subForm.length; i++) {
+          it = this.$refs.subForm[i];
+          viewHeight += it.$el.offsetHeight;
+          it.$refs.form.validate(valid => {
+            if (!valid) {
+              goOn = false;
+              viewHeightArr.push(viewHeight);
+            }
+          });
+        }
+      }
+      // console.log(viewHeightArr,'viewHeightArr');
+      if (!goOn) {
+        var div = this.$refs['elscrollbar'].$refs['wrap'];
+        if (outIsVia) {
+          // 外层校验通过,跳转至下层校验具体位置
+          this.$nextTick(() => {
+            div.scrollTop = +viewHeightArr[0] - 150;
+          });
+        } else {
+          // 外层校验没通过,页面滚动到顶部
+          this.$nextTick(() => {
+            div.scrollTop = 0;
+          });
+        }
+        return;
+      }
+      //通过必填验证,提交保存
+      const item = this.form.prags;
+      let param = [];
+      if (this.form.typeId === 82 || this.form.typeId === 83) {
+        if (this.form.fileList.length === 0) {
+          this.warning('文件未上传,不存储数据');
+          return;
+        }
+        param.push(
+          Object.assign(
+            {},
+            {
+              position: this.form.typeId === 82 ? '8' : '9',
+              conceptId: this.form.conceptId,
+              title: this.form.fileTitle,
+              orderNo: 0,
+              content: JSON.stringify(this.form.fileList[0])
+            }
+          )
+        );
+      } else {
+        let data = this.form.prags,
+          tempArr = [],
+          paramsAll = {},
+          types = this.form.typeId;
+        for (let i = 0; i < data.length; i++) {
+          let obj = {};
+          obj.content = data[i].content;
+          obj.text = data[i].text;
+          obj.conceptId = data[i].conceptId;
+          obj.orderNo = i;
+          obj.title = data[i].title;
+          obj.contentType = data[i].position.join(',');
+          tempArr.push(obj);
+        }
+        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;
+        paramsAll.details = tempArr;
+        param = paramsAll;
+      }
+      // this.showSaveDialog(param,'是否'+(this.isEdit?'修改':'保存')+'该静态知识?');
+
+      if (!this.isEdit) {
+        // 新增页面
+        this.saveDisable = true;
+        this.sendSaveOrEdit(param);
+        return;
+      }
+      this.showSaveDialog(
+        param,
+        '<div><p style="color: #333333">确定保存修改内容?</p><p style="color: #D70A25">保存后将覆盖原有数据,且原有数据无法恢复。</p></div>'
+      );
+    },
+    showSaveDialog(param, msg) {
+      this.showConfirmDialog(msg, () => {
+        this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+        this.sendSaveOrEdit(param);
+      });
+    },
+
+    //保存编辑 接口
+    sendSaveOrEdit(param) {
+      this.isCopy && (param.id = undefined);
+      api.saveBaseOrUpdateRecord(param)
+        .then(res => {
+          if (res.data.code === '0') {
+            this.isSuccessUpload = 0; // 修改文件上传状态为0
+            this.warning(res.data.msg || '保存成功', 'success');
+            this.isSaveSuccess = true; // 保存成功,可正常退出
+            //返回带搜索条件的首页
+            this.$router.push({
+              name: 'StaticInfo',
+              params: Object.assign({}, this.$route.params, {
+                currentPage: 1
+              })
+            });
+          } else {
+            this.warning(res.data.msg);
+          }
+          this.saveDisable = false;
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.saveDisable = false;
+          this.warning(err);
+        });
+    },
+
+    // 弹出窗
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'cancel',
+        // confirmButtonClass: 'confirmBtn',
+        dangerouslyUseHTMLString: true,
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    handleChange(file, fileList) {
+      // if(fileList&&fileList[0]&&fileList[0].response&&fileList[0].response.code==='0'){
+      //   this.showUpLoad = false
+      //   this.showFileList = true
+      // }else{
+      //    this.showUpLoad = true
+      //    this.showFileList = false
+      // }
+      // console.log(fileList,this.form.fileList,'aa')
+    },
+    handleSuccess(response, file, fileList) {
+      if (response.code == '0') {
+        this.showFileList = true;
+        this.form.fileList = [];
+        this.form.fileList.push({
+          name: response.data.title,
+          url: response.data.url,
+          size: response.data.size
+        });
+        this.showUpLoad = false;
+        if (!this.form.fileTitle) {
+          this.form.fileTitle = response.data.title;
+        }
+        this.isSuccessUpload = 2; // 上传成功状态
+        this.$refs.upload && this.$refs.upload.clearValidate(); // 清除校验
+      } else {
+        this.warning(response.msg || '上传失败');
+        // this.form.fileList = []
+        this.showUpLoad = true;
+        this.showFileList = false;
+        this.form.fileList = [];
+      }
+    },
+    handleRemove(file, fileList) {
+      this.showUpLoad = true;
+      this.form.fileList = [];
+      this.isSuccessUpload = 0;
+    },
+    handleBeforeUpLoad(file) {
+      // 上传过程中   上传按钮 隐藏
+      this.isSuccessUpload = 1; // 上传过程中
+      this.showFileList = true; // 新增 进度条  显示
+      this.$refs.upload && this.$refs.upload.clearValidate(); // 清除校验
+
+      this.showUpLoad = false;
+      if (file.size / 1024 / 1024 >= 500) {
+        this.warning('文件上传失败,超出大小限制500MB');
+        this.form.fileList = [];
+        this.showConfirm = false;
+        return false;
+      } else {
+        this.showConfirm = true;
+      }
+    },
+    handlePreview(file) {},
+    beforeRemove(file, fileList) {
+      if (this.showConfirm) {
+        return this.$alert(`确定移除 ${file.name}?`, '', {
+          cancelButtonClass: 'cacelBtn'
+        });
+      }
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+@import '../../less/common.less';
+.cell .el-button.delete:focus {
+  color: red !important;
+}
+
+.topBack {
+  top: 0;
+}
+.info-container {
+  background: #fff;
+  padding: 20px;
+  margin: 70px 20px -20px 20px;
+  .el-input__inner {
+    width: 200px;
+  }
+  .el-form-item__label {
+    text-align: left;
+  }
+  .add-prg .el-form-item {
+    margin-bottom: 20px;
+  }
+  .el-form-item {
+    margin-bottom: 8px !important;
+  }
+}
+// .cancel span {
+//   color: #22ccc8;
+// }
+.line {
+  border-top: 1px #dcdfe6 solid;
+  margin-bottom: 25px;
+  margin-top: 25px;
+}
+.NoiseTemplateWrapper .info-container .el-input__inner {
+  width: 250px;
+}
+// .NoiseTemplateWrapper .el-select .el-input .el-icon-circle-close{
+//     display: inherit!important;
+// }
+.cacelBtn {
+  color: #22ccc8 !important;
+}
+.upload-demo {
+  width: 300px;
+  /deep/.el-upload-list__item .el-icon-close-tip {
+    display: none !important;
+  }
+
+  /deep/.el-upload-list__item .el-upload-list__item-name {
+    max-width: 250px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+  /deep/ .focusing {
+    // border: 1px solid transparent !important;
+    outline: transparent !important;
+  }
+}
+.uploadInfo {
+  margin-top: -20px;
+  color: #606266;
+}
+.tipInfo {
+  position: absolute;
+  // position: relative;
+  line-height: 24px;
+  top: -56px;
+  left: 20px;
+  // background-color: transparent;
+  // color: #606266;
+  padding: 3px 10px;
+  border-radius: 4px;
+  margin: 100px auto;
+  background-color: #4d4d4d;
+  text-align: center;
+  color: #fff;
+  font-size: 14px;
+}
+.tipInfo:before {
+  content: '';
+  display: block;
+  position: absolute;
+  // bottom: 9px;
+  top: -10px;
+  left: 18px;
+  border-bottom: 6px solid #4d4d4d;
+  border-top: 6px solid transparent;
+  border-left: 6px solid transparent;
+  border-right: 6px solid transparent;
+  // border-right: 6px solid #4D4D4D;
+}
+.btn {
+  text-align: right;
+  padding-right: 20px;
+}
+.el-message-box {
+  /deep/ .el-icon-warning {
+    background-color: transparent !important;
+    // display: none;
+  }
+  /deep/ .el-message-box__message {
+    margin: 24px 0px;
+  }
+  // /deep/ .confirmBtn {
+  //   // position: relative;
+  //   // right: 240px !important;
+  //   // top: 0px;
+  //   background-color: #fff !important;
+  //   span {
+  //     color: #48c5d7 !important;
+  //   }
+  // }
+  /deep/ .cancel {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+    span {
+      color: #fff;
+    }
+  }
+}
+</style>
+

+ 405 - 0
src/components/knowledgeExtra/AddDiagBase.vue

@@ -0,0 +1,405 @@
+<template>
+    <div>
+        <crumbs :title="title" :param="$route.params" linkTo="ZskDiagBase"></crumbs>
+        <div class="contents">
+            <div class="content">
+                <el-form ref="form" :label-position="labelPosition" class="add-new-form" label-width="150px" :model="form" :rules="rules">
+                    <el-form-item label="疾病名称:" prop="conceptId">
+                        <el-select clearable remote filterable :remote-method="searchDiag" v-model.trim="form.conceptId">
+                            <el-option
+                                    v-for="item in conceptList"
+                                    :key="item.conceptId"
+                                    :label="item.conceptName"
+                                    :value="item.conceptId">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="诊断依据描述:" class="description">
+                        <el-input type="textarea" :rows="3" placeholder="请输入诊断依据描述" v-model.trim="form.description"></el-input>
+                    </el-form-item>
+                    <el-form-item label="诊断依据内容:" prop="remind" class="discDesc is-required">
+                        <DiagBaseType v-for="(group,i) in form.klDiagnoseTypeVO"
+                                       ref="groups"
+                                       :data="group"
+                                       :inx="i"
+                                       :isLast="form.klDiagnoseTypeVO.length===1"
+                                       @setRules="setRules"
+                                       @addDiag="addDiag"
+                                       @copyDiag="copyDiag"
+                                       @delDiag="delDiag"></DiagBaseType>
+                    </el-form-item>
+                    <el-button class="disclButn" size="small" type="primary" @click="confirm">保存</el-button>
+                </el-form>
+            </div>
+        </div>
+    </div>
+</template>
+<script type="text/javascript">
+    import api from '@api/zskDiagBase.js';
+    import DiagBaseType from './DiagBaseType'
+    export default {
+        name:'AddZskDiagBase',
+        data(){
+            return{
+                labelPosition:'left',
+                isCopy:false,
+                title:'诊断依据维护-添加诊断依据',
+                conceptName:'',
+                conceptList:[],
+                form:{
+                    description:'',
+                    conceptId:'',
+                    klDiagnoseTypeVO:[{conditionType:'',groupVO:[{
+                            "baseGroup": '',
+                            "conditionGroup": '',
+                            "fitNo": '',
+                            "klDiagnoseDetail": [{
+                                "basConceptId": '',
+                                "basDescription": "",
+                                "basLename": "",
+                                "basLibName": "",
+                                "basLibType":null,
+                                "basType": '',
+                                "eqOperator": "",
+                                "eqUnit": "",
+                                "eqValue": "",
+                                "maxOperator": "",
+                                "maxUnit": "",
+                                "maxVal": "",
+                                "minOperator": "",
+                                "minUnit": "",
+                                "minVal": ""
+                            }]
+                        }]}],
+                },
+                id:null,
+                rules:{
+                    conceptId:[{ required: true, message: '请输入疾病名称',trigger: ['change'] }],
+                    description:[{
+                        validator: (rule,value,callback)=>{
+                            if(value&&value.length>100){
+                                callback(new Error('诊断依据描述不能超过100字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'change'
+                    }],
+                }
+            }
+        },
+        created(){
+            const param = this.$route.params;
+            let info = param.data;
+            if(info){
+                this.id = info.id;
+                this.isCopy=param.copy;
+                this.title = "诊断依据维护-"+(this.isCopy?'复制':'修改')+"诊断依据";
+                this.conceptList = [{conceptId:info.conceptId,conceptName:info.conceptName}];
+                this.form=Object.assign({},this.form,this.formatData(info));
+                if(this.isCopy){
+                    this.conceptList =[];
+                    delete this.form.conceptName;
+                    delete this.form.conceptId;
+                    delete this.form.description;
+                    delete this.form.id;
+                }
+                console.log(info)
+            }
+            this.setRules()
+        },
+        components:{
+            DiagBaseType
+        },
+        methods:{
+            formatData(data){       //转换字段名
+                let str = JSON.stringify(data).replace(/byIdDTO/g,"groupVO").replace(/klDiagnoseByIdDTO/g,"klDiagnoseDetail");
+                //console.log(JSON.parse(str))
+                return JSON.parse(str);
+            },
+            setRules(){
+                let that=this;
+                let list=this.form.klDiagnoseTypeVO;
+                if(list&&list.length>0){
+                    list.forEach((item,i)=>{
+                        let list1=list[i].groupVO;
+                        that.rules['klDiagnoseTypeVO.'+i+'.conditionType']=[{required: true, message: '请选择诊断依据类型',trigger: ['change'] }];
+                        list1.forEach((it,x)=>{
+                            that.rules['klDiagnoseTypeVO.'+i+'.groupVO.'+x+'.fitNo']=[{required: true, message: '请选择符合条件的数量',trigger: ['change'] }];
+                            let list2=list1[x].klDiagnoseDetail;
+                            list2.forEach((t,j)=>{
+                                let grandeObj = this.form.klDiagnoseTypeVO[i].groupVO[x].klDiagnoseDetail[j];
+                                if(grandeObj) {
+                                    const keyTxt='klDiagnoseTypeVO.' + i + '.groupVO.' + x + '.klDiagnoseDetail.' + j;
+                                    that.rules[keyTxt + '.basDescription'] = [{
+                                        required: true,
+                                        message: '请输入基础依据名称',
+                                        trigger: ['blur']
+                                    },{
+                                        validator: (rule, value, callback) => {
+                                            if (value&&value.length > 100) {
+                                                callback(new Error('不能超过100字'));
+                                            } else {
+                                                callback();
+                                            }
+                                        }, trigger: 'blur'
+                                    }];
+                                    that.rules[keyTxt + '.basType'] = [{
+                                        required: true,
+                                        message: '请选择基础依据类型',
+                                        trigger: ['change']
+                                    }];
+                                    that.rules[keyTxt + '.basLibType'] = [{
+                                        required: true,
+                                        message: '请选择基础依据术语类型',
+                                        trigger: ['change']
+                                    }];
+                                    that.rules[keyTxt + '.basConceptId'] = [{
+                                        required: true,
+                                        message: '请输入医学标准术语',
+                                        trigger: ['change']
+                                    }];
+                                    that.rules[keyTxt + '.dataType'] = [{
+                                        required: true,
+                                        message: '请选择类型',
+                                        trigger: ['change']
+                                    }];
+                                    that.rules[keyTxt + '.maxOperator'] = [{
+                                        validator: (rule, value, callback) => {
+                                            const {maxVal, minOperator, minVal} = grandeObj;
+                                            const val = value + minOperator + minVal + maxVal;
+                                            if (!val || (!value && maxVal !== '')) {
+                                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                                            } else {
+                                                callback();
+                                            }
+                                        }, trigger: 'blur'
+                                    }];
+                                    that.rules[keyTxt + '.minOperator'] = [{
+                                        validator: (rule, value, callback) => {
+                                            const {maxVal, maxOperator, minVal} = grandeObj;
+                                            const val = value + maxOperator + minVal + maxVal;
+                                            if (!val || (!value && minVal !== '')) {
+                                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                                            } else {
+                                                callback();
+                                            }
+                                        }, trigger: 'blur'
+                                    }];
+                                    that.rules[keyTxt + '.maxVal'] = [{
+                                        validator: (rule, value, callback) => {
+                                            const {maxOperator, minOperator, minVal} = grandeObj;
+                                            const val = value + maxOperator + minVal + minOperator;
+                                            const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
+                                            if (!val || (value === '' && maxOperator)) {
+                                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                                            } else if (value !== '' && !isNum) {
+                                                callback(new Error('只能输入数字'));
+                                            } else {
+                                                callback();
+                                            }
+                                        }, trigger: 'blur'
+                                    }]
+                                    that.rules[keyTxt + '.minVal'] = [{
+                                        validator: (rule, value, callback) => {
+                                            const {maxVal, minOperator, maxOperator} = grandeObj;
+                                            const val = value + maxOperator + maxVal + minOperator;
+                                            const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
+                                            console.log(val, value, minOperator)
+                                            if (!val || (value === '' && minOperator)) {
+                                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                                            } else if (value !== '' && !isNum) {
+                                                callback(new Error('只能输入数字'));
+                                            } else {
+                                                callback();
+                                            }
+                                        }, trigger: 'blur'
+                                    }];
+                                    that.rules[keyTxt + '.eqValue'] = [{required: true, message: '不能为空~',trigger: 'blur'},{
+                                        validator: (rule, value, callback) => {
+                                            if (value&&value.length > 200) {
+                                                callback(new Error('不能超过200字'));
+                                            } else {
+                                                callback();
+                                            }
+                                        }, trigger: 'blur'
+                                    }];
+                                }
+                            });
+                        });
+                    })
+                }
+            },
+            formatGroupDatas(data){
+                let arr=[];
+                return arr;
+            },
+            searchDiag(val){
+                const param = {
+                    diseaseName:val,
+                };
+                api.searchDiag(param).then((res) => {
+                    if (res.data.code == '0') {
+                        const data = res.data.data;
+                        this.conceptList = data;
+                    }
+                }).catch((error) => {
+                    console.log(error);
+                });
+            },
+            getInitData(){
+                return {conditionType:'',groupVO:[{
+                        "baseGroup": '',
+                        "conditionGroup": '',
+                        "fitNo": '',
+                        "klDiagnoseDetail": [{
+                            "basConceptId": '',
+                            "basDescription": "",
+                            "basLename": "",
+                            "basLibName": "",
+                            "basLibType": null,
+                            "basType": '',
+                            "eqOperator": "",
+                            "eqUnit": "",
+                            "eqValue": "",
+                            "maxOperator": "",
+                            "maxUnit": "",
+                            "maxVal": "",
+                            "minOperator": "",
+                            "minUnit": "",
+                            "minVal": ""
+                        }]
+                    }]}
+            },
+            setInitGroupData(){
+                let temp = this.getInitData();
+                this.form.klDiagnoseTypeVO = [temp];
+            },
+            addDiag(i){
+                let temp = this.getInitData();
+                this.form.klDiagnoseTypeVO.splice(i+1,0,temp);
+                this.setRules();
+            },
+            copyDiag(i){
+                let temp = JSON.parse(JSON.stringify(this.form.klDiagnoseTypeVO[i]));
+                this.form.klDiagnoseTypeVO.splice(i,0,temp);
+                this.setRules();
+            },
+            delDiag(i){
+                this.form.klDiagnoseTypeVO.splice(i,1);
+            },
+            saveDiagBase(params){
+                api.saveDiagBase(params).then((res)=>{
+                    if(res.data.code==0){
+                        this.$message({
+                            message:"操作成功",
+                            type:'success'
+                        });
+                        this.$router.push({name: 'ZskDiagBase',params:this.$route.params});
+                    }else{
+                        this.$message({
+                            message:res.data.msg,
+                            type:'warning'
+                        });
+                    }
+                })
+            },
+            validateForms(callBack){
+                this.$refs['form'].validate((valid) => {
+                    if (valid) {
+                        callBack();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            confirm(){
+                const _this=this;
+                this.validateForms(function(){
+                    let params = _this.form;
+
+                    _this.saveDiagBase(params);
+                });
+            },
+        }
+    }
+</script>
+<style lang="less">
+    @import "../../less/admin.less";
+    .content{
+        background: #fff;
+        // padding: 20px 20px 30px;
+        padding: 20px 20px 50px;
+        color: #545455;
+        min-width: 980px;
+        position: relative;
+        .tip-text{
+            color:#F56C6C;
+            margin-left: 10px;
+        }
+        .conceptItem{
+            padding: 0 10px;
+            cursor: pointer;
+            height: 32px;
+            line-height: 32px;
+            &:hover{
+                background: #ebedf1;
+            }
+        }
+        .discDesc{
+            margin-bottom: 20px;
+            .el-form-item__error{
+                top: 9px;
+                left:200px;
+                white-space: nowrap;
+                background: #fff;
+            }
+        }
+        .disclButn{
+            position: absolute;
+            right: calc(50% - 60px);
+            bottom: 10px;
+        }
+    }
+    .description .el-form-item__error{
+        top:auto;
+    }
+    .add-new-form{
+        .el-form-item__label{
+            text-align: right;
+        }
+        .addDepartFormItem {
+            position: relative;
+        }
+        .itemList {
+            position: absolute;
+            // display: none;
+            background: #fff;
+            width: 188px;
+            max-height: 160px;
+            border: 1px solid #DCDFE6;
+            left: 0;
+            top: 37px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .indexList {
+            left: 42px;
+            top: 78px;
+        }
+        .el-input__prefix, .el-input__suffix{
+            /*top:-2px;*/
+            right: 3px;
+        }
+        .el-input--suffix .el-input__inner{
+            padding-right: 22px;
+        }
+        .el-input,.el-input__inner{
+            width: 190px;
+            line-height: 32px;
+            height: 32px;
+        }
+        .el-input__icon{
+            line-height: 32px;
+        }
+    }
+
+</style>

+ 496 - 0
src/components/knowledgeExtra/AddNewRule.vue

@@ -0,0 +1,496 @@
+<template>
+    <div>
+        <crumbs :title="title" :param="$route.params" linkTo="ZskRuleManager"></crumbs>
+        <div class="contents">
+            <div class="content">
+                <el-form ref="form" :label-position="labelPosition" class="add-new-form" label-width="130px" :model="form" :rules="rules">
+                    <el-form-item label="规则名称:" prop="parDescription">
+                        <el-input v-model.trim = "form.parDescription"></el-input>
+                    </el-form-item>
+                    <el-form-item label="规则类型:" prop="parRuleType">
+                        <el-select v-model="form.parRuleType"
+                                   placeholder="请选择"
+                                   size="small"
+                                   @change="ruleTypeChange"
+                                   >
+                            <el-option
+                                    v-for="item in ruleTypeList"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id">
+                            </el-option>
+                        </el-select>
+                        <span class="tip-text">注:更改规则类型,将会清空已填写的规则内容~</span>
+                    </el-form-item>
+                    <el-form-item label="规则术语类型:" prop="parLenCode">
+                        <el-select v-model="form.parLenCode"
+                                   placeholder="请选择"
+                                   size="small" @change="ruleTermChange">
+                            <el-option
+                                    v-for="item in ruleTermTypeList"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.code">
+                            </el-option>
+                        </el-select>
+                        <span class="tip-text">注:更改规则术语类型,将会清空已填写的规则内容~</span>
+                    </el-form-item>
+                    <el-form-item  class="addDepartFormItem" label="医学标准术语:" prop="parConceptId">
+                        <el-select clearable filterable remote :remote-method="searchConcept" v-model.trim="form.parConceptId">
+                            <el-option
+                                    v-for="item in conceptList"
+                                    :key="item.conceptId"
+                                    :label="item.conceptName"
+                                    :value="item.conceptId">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item v-if="showHasSub" label="有无子条件:" prop="parHasSub">
+                        <el-select v-model="form.parHasSub"
+                                   placeholder="请选择"
+                                   size="small" @change="hasSubChange">
+                            <el-option
+                                    v-for="item in hasSub"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item v-if="showMsg" label="附加信息:" prop="parMsg" class="parMsg">
+                        <el-input type="textarea" :rows="3" placeholder="请输入附加信息" v-model.trim="form.parMsg"></el-input>
+                    </el-form-item>
+                    <el-form-item v-if="form.parHasSub===1" label="规则内容:" prop="remind" class="discDesc">
+                        <SubRulesGroup v-for="(group,i) in subGroups"
+                                       ref="groups"
+                                       :key="i"
+                                       :data="group"
+                                       :baseTypes="baseTypeList"
+                                       :inx="i"
+                                       :maxNum="subRuleMaxNum"
+                                       :firstPlace="firstPlace"
+                                       :isLast="subGroups.length===1"
+                                       @addGroup="addGroup"
+                                       @delGroup="delGroup"></SubRulesGroup>
+                    </el-form-item>
+                    <el-button class="disclButn" size="small" type="primary" @click="confirm">保存</el-button>
+                </el-form>
+            </div>
+        </div>
+    </div>
+</template>
+<script type="text/javascript">
+    import api from '@api/knowledgeLib.js';
+    import SubRulesGroup from './SubRulesGroup'
+    export default {
+        name:'AddRule',
+        data(){
+            return{
+                labelPosition:'left',
+                isFirst:true,
+                isCopy:false,
+                dict:'',        //规则内容固定的类型
+                msgDict:'',     //显示附加信息的类型
+                title:'规则维护-添加规则',
+                ruleTermTypeList:[],
+                ruleTypeList:[],
+                conceptList:[],
+                baseTypeList:[],
+                conceptName:'',
+                subRuleMaxNum:null,     //规则内容中规则的限制个数
+                firstPlace:null,
+                subGroups:[[{
+                    subDescription:'',
+                    parRuleType:'',
+                    subConceptId:'',
+                    subType:'',
+                    subMaxOperator:'',
+                    subMaxUnit:'',
+                    subMaxValue:'',
+                    subMinOperator:'',
+                    subMinUnit:'',
+                    subMinValue:'',
+                    subEqValue:'',
+                    subLenCode:'',
+                    dataType:'',
+                }]],
+                form:{
+                    parDescription:'',
+                    parRuleType:'',
+                    parConceptId:'',
+                    parlibName:'',
+                    parLenName:'',
+                    parHasSub:undefined,
+                    parLenCode:'',
+                    parMsg:'',
+                    klRuleInfoSaveSub:[],
+                },
+                parId:null,
+                rules:{
+                    parDescription:[{ required: true, message: '请输入规则名称',trigger: ['blur'] },{
+                        validator: (rule,value,callback)=>{
+                            if(value.length>100){
+                                callback(new Error('规则名称不能超过100字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'change'
+                    }],
+                    parRuleType:[{ required: true, message: '请选择规则类型',trigger: ['change'] }],
+                    parLenCode:[{ required: true, message: '请选择规则术语类型',trigger: ['change'] }],
+                    parConceptId:[{ required: true, message: '请输入医学标准术语',trigger: ['blur'] }],
+                    parHasSub:[{ required: true, message: '请选择有无子条件',trigger: ['change'] }],
+                    parMsg:[{ required: true, message: '请输入附加信息',trigger: ['change'] },{
+                        validator: (rule,value,callback)=>{
+                            if(value.length>100){
+                                callback(new Error('附加信息不能超过100字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'change'
+                    }]
+                },
+                hasSub:[{name:'有',id:1},{name:'无',id:0},
+                ]
+            }
+        },
+        created(){
+            this.getTypeList();
+            this.setDict();
+            const param = this.$route.params;
+            let info = param.data;
+            if(info){
+                this.parId = info.parId;
+                this.isCopy=param.copy;
+                this.title = "规则维护-"+(this.isCopy?'复制':'修改')+"规则";
+                this.form=Object.assign({},this.form,info);
+                this.conceptList=[{conceptName:this.form.parlibName,conceptId:this.form.parConceptId}];
+                this.subGroups=this.formatGroupDatas(info.klRuleByIdSub);
+
+            }
+        },
+        watch:{
+            'form.parRuleType':function(val){
+                const obj = this.ruleTypeList.find((it)=>it.id===val);
+                this.ruleTermTypeList = obj.subMenuList;
+            },
+            'form.parLenCode':function(val){
+                if(!val){
+                    this.baseTypeList = [];
+                    return ;
+                }
+                const obj = this.ruleTermTypeList.find((it)=>it.code===val);
+                this.baseTypeList = obj.subMenuList;
+                this.subRuleMaxNum=obj.number;
+            },
+            'form.parConceptId':function(val){
+                if(val&&this.checkFirstPlace&&this.conceptList) {
+                    this.firstPlace = this.conceptList.find((it) => it.conceptId === val);
+                    this.firstPlace['checkedType']=this.ruleTermCodeStr;
+                }else if(!val){
+                    this.setInitGroupData();
+                    this.firstPlace =null;
+                }else{
+                    this.firstPlace =null;
+                }
+            }
+        },
+        components:{
+            SubRulesGroup
+        },
+        computed:{
+            ruleTermCodeStr:function(){
+                return this.form.parRuleType+"-"+this.form.parLenCode
+            },
+            checkFirstPlace:function(){
+                return this.dict.indexOf(this.ruleTermCodeStr)>-1;
+            },
+            showMsg:function(){
+                return this.ruleTermCodeStr.length>1&&this.msgDict.indexOf(this.ruleTermCodeStr)>-1;
+            },
+            showHasSub:function(){
+                return this.subDict.indexOf(this.ruleTermCodeStr)>-1;
+            }
+        },
+        methods:{
+            hasSubChange(val){
+                if(val){
+                    this.subGroups = [[{
+                        subDescription:'',
+                        parRuleType:'',
+                        subConceptId:'',
+                        subType:'',
+                        subMaxOperator:'',
+                        subMaxUnit:'',
+                        subMaxValue:'',
+                        subMinOperator:'',
+                        subMinUnit:'',
+                        subMinValue:'',
+                        subEqValue:'',
+                        subLenCode:'',
+                        dataType:'',
+                    }]];
+                }
+            },
+            setDict(){
+                this.dict = localStorage.getItem("zskDicts");
+                this.msgDict = localStorage.getItem("zskMsgDict");
+                this.subDict = localStorage.getItem("zskSubDict");
+            },
+            showConfirmDialog(msg,resolve){
+                this.$alert(msg, '提示', {
+                    confirmButtonText: '确定',
+                    type: 'warning'
+                }).then(() => {
+                    resolve();
+                }).catch(() => {});
+            },
+            formatGroupDatas(data){
+                let arr=[];
+                data.map((it)=>{
+                    if(!arr[it.groupType]){arr[it.groupType]=[];}
+                    if(it.subMaxOperator||it.subMinOperator){
+                        it.dataType='1';
+                    }else if(it.subEqValue){
+                        it.dataType='2';
+                    }
+                    arr[it.groupType].push(it);
+                });
+                arr = arr.filter((it)=>{if(it)return it});
+                return arr;
+            },
+            searchConcept(val){
+                const param = {
+                    excludedConceptIds:[this.form.parRuleType],
+                    libType:this.form.parLenCode,
+                    name:val,
+                };
+                api.searchConcept(param).then((res) => {
+                    if (res.data.code == '0') {
+                        const data = res.data.data;
+                        this.conceptList = data;
+                    }
+                }).catch((error) => {
+                    console.log(error);
+                });
+            },
+            ruleTypeChange(val){       //规则类型选中
+                this.form.parRuleType=val;
+                this.form.parLenCode='';
+                this.form.parMsg="";
+                const obj = this.ruleTypeList.find((it)=>it.id===val);//console.log(val)
+                this.ruleTermTypeList = obj.subMenuList;
+                this.setInitGroupData();
+            },
+            ruleTermChange(val){        //规则术语类型选中
+                this.form.parLenCode=val;
+                this.form.parMsg="";
+                const obj = this.ruleTermTypeList.find((it)=>it.code===val);
+                this.form.parLenName=obj.name;
+                this.baseTypeList = obj.subMenuList;
+                this.subRuleMaxNum = obj.number;
+                this.setInitGroupData();
+                this.form.parHasSub=obj.subMenuList.length?1:0;
+            },
+            getTypeList(){
+              const typeListData = JSON.parse(localStorage.getItem("zskTypesList"));
+              this.ruleTypeList = typeListData;
+            },
+            setInitGroupData(){
+              this.subGroups = [[{
+                  subDescription:'',
+                  parRuleType:'',
+                  subConceptId:'',
+                  subType:'',
+                  subMaxOperator:'',
+                  subMaxUnit:'',
+                  subMaxValue:'',
+                  subMinOperator:'',
+                  subMinUnit:'',
+                  subMinValue:'',
+                  subEqValue:'',
+                  subLenCode:'',
+                  dataType:'',
+              }]];
+              this.form.parConceptId='';//医学标准术语清空
+              this.conceptList=[];  //下拉列表清空
+            },
+            addGroup(){
+                let temp = {
+                    subDescription:'',
+                    subConceptId:'',
+                    subType:'',
+                    subLenCode:'',
+                    dataType:'',
+                    subMaxOperator:'',
+                    subMaxUnit:'',
+                    subMaxValue:'',
+                    subMinOperator:'',
+                    subMinUnit:'',
+                    subMinValue:'',
+                    subEqValue:'',
+                };
+                if(this.checkFirstPlace){
+                    const obj=this.subGroups[0][0];
+                    temp = {
+                        subDescription:obj.subConceptName,
+                        subConceptId:obj.subConceptId,
+                        subConceptName:obj.subConceptName,
+                        subLenCode:this.form.parLenCode,
+                        subLenName: this.form.parLenName,
+                        subLibName: this.form.parlibName,
+                        subType:obj.subType,
+                        dataType:'',
+                        subMaxOperator:'',
+                        subMaxUnit:'',
+                        subMaxValue:'',
+                        subMinOperator:'',
+                        subMinUnit:'',
+                        subMinValue:'',
+                        subEqValue:'',
+                    };
+                }
+                this.subGroups.push([temp]);
+            },
+            delGroup(i){
+                //this.subGroups.splice(i,1);
+                this.$set(this.subGroups,i,null);
+            },
+            saveRule(params){
+                api.saveRule(params).then((res)=>{
+                    if(res.data.code==0){
+                        this.$message({
+                            message:"操作成功",
+                            type:'success'
+                        });
+                        this.$router.push({name: 'ZskRuleManager',params: Object.assign({}, this.$route.params, { currentPage: 1 })});
+                    }else{
+                        this.$message({
+                            message:res.data.msg,
+                            type:'warning'
+                        });
+                    }
+                })
+            },
+            formatGroups(){
+                let obj = [];
+                this.subGroups.map((item,i)=>{
+                    item&&item.map((it)=>{
+                       obj.push({...it,groupType:i+1});
+                   })
+                });
+                return obj
+            },
+            validateForms(callBack){
+                this.$refs['form'].validate((valid) => {
+                    if (valid) {
+                        const groupsRef = this.$refs['groups'];
+                        if(!groupsRef||groupsRef.length===0){
+                            callBack();
+                            return;
+                        }
+                        let groupRef=null,goOn=true;
+                        for(let i=0;i<groupsRef.length;i++){
+                            groupRef=groupsRef[i].$refs['group'];
+                            for(let j=0;j<groupRef.length;j++){
+                                groupRef[j].$refs['groupData'].validate((valid)=>{
+                                    if(!valid){
+                                        goOn=false;
+                                    }
+                                })
+                            }
+                        }
+                        if(goOn){
+                            callBack();
+                        }
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            confirm(){
+                const _this=this;
+                this.validateForms(function(){
+                    delete _this.form.klRuleByIdSub;
+                    _this.form.klRuleInfoSaveSub = _this.form.parHasSub?_this.formatGroups():undefined;
+                    let params = _this.form;
+                    if(_this.parId){//修改/复制
+                        params = Object.assign({},_this.form,{parId:_this.isCopy?undefined:_this.parId,parStatus:_this.isCopy?1:_this.form.parStatus})
+                    }
+                    console.log(params)
+                    _this.saveRule(params);
+                });
+            },
+        }
+    }
+</script>
+<style lang="less">
+    @import "../../less/admin.less";
+    .content{
+        background: #fff;
+        // padding: 20px 20px 30px;
+        padding: 20px 20px 50px;
+        color: #545455;
+        min-width: 980px;
+        position: relative;
+        .tip-text{
+            color:#F56C6C;
+            margin-left: 10px;
+        }
+        .conceptItem{
+            padding: 0 10px;
+            cursor: pointer;
+            height: 32px;
+            line-height: 32px;
+            &:hover{
+                background: #ebedf1;
+            }
+        }
+        .discDesc{
+            margin-bottom: 20px;
+        }
+        .disclButn{
+            position: absolute;
+            right: 80px;
+            bottom: 10px;
+        }
+    }
+    .add-new-form{
+        .el-form-item__label{
+            text-align: right;
+        }
+        .addDepartFormItem {
+            position: relative;
+        }
+        .itemList {
+            position: absolute;
+            // display: none;
+            background: #fff;
+            width: 188px;
+            max-height: 160px;
+            border: 1px solid #DCDFE6;
+            left: 0;
+            top: 37px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .indexList {
+            left: 42px;
+            top: 78px;
+        }
+        .el-input__prefix, .el-input__suffix{
+            /*top:-2px;*/
+            right: 3px;
+        }
+        .el-input--suffix .el-input__inner{
+            padding-right: 22px;
+        }
+        .el-input,.el-input__inner{
+            width: 190px;
+            line-height: 32px;
+            height: 32px;
+        }
+        .el-input__icon{
+            line-height: 32px;
+        }
+    }
+
+</style>

+ 297 - 0
src/components/knowledgeExtra/DevInfo.vue

@@ -0,0 +1,297 @@
+<template>
+  <el-form
+    :rules="rules"
+    :model="data"
+    ref="form"
+    class="sub-form"
+    :validate-on-rule-change="false"
+  >
+    <!--<el-input v-model="form.orderNo" :value="index" type="hidden"></el-input>-->
+    <!-- <el-form-item label="是否属于诊断依据:" prop="isReason" label-width="160px">
+            <el-select v-model="data.isReason" placeholder="请选择">
+                <el-option label="否" :value="0"></el-option>
+                <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-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">{{it.name}}</el-checkbox>
+      </el-checkbox-group>
+    </el-form-item>
+    <el-form-item label="内容" prop="content" label-width="160px" ref="editor">
+      <quillEditor
+        v-model="data.content"
+        :options="editorOption"
+        class="ql-editor"
+        ref="quillEditor"
+      ></quillEditor>
+    </el-form-item>
+    <div class="order-btn">
+      <a v-if="index!==0" :class="index===total-1?'order-spc':'order-up'" @click="reOrder(1)">上升</a>
+      <a v-if="index!==total-1" :class="index===0?'order-spc':'order-down'" @click="reOrder(0)">下降</a>
+    </div>
+    <el-form-item label-width="160px" class="btns">
+      <el-button @click="addEmit">添加段落</el-button>
+      <el-button @click="delEmit" type="info">删除本段落</el-button>
+    </el-form-item>
+  </el-form>
+</template>
+
+<script>
+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',
+  components: {
+    quillEditor
+  },
+  data() {
+    return {
+      toolbars: [
+        [
+          ['bold', 'underline', 'strike'],
+          [{ list: 'ordered' }, { list: 'bullet' }],
+          [{ script: 'sub' }, { script: 'super' }],
+          [{ color: [] }, { background: [] }],
+          [{ align: [] }],
+          ['image']
+        ]
+      ],
+      toolbarMode: 0,
+      editorOption: {
+        modules: {
+          ImageExtend: {
+            loading: true,
+            name: 'upfile',
+            size: 1,
+            sizeError: () => {
+              this.$message({
+                showClose: true,
+                message: '请上传 1M 以内的图片!',
+                type: 'warning'
+              });
+            },
+            action: config.urls.promptServer,
+            response: res => {
+              if (res.code == '0') {
+                return config.imgHost + res.data.url;
+              } else {
+                this.$message({
+                  showClose: true,
+                  message: res.msg,
+                  type: 'warning'
+                });
+              }
+            }
+          },
+          toolbar: {
+            container: container,
+            handlers: {
+              image: function() {
+                QuillWatch.emit(this.quill.id);
+              }
+            }
+          }
+        }
+      },
+      form: {
+        position: [],
+        orderNo: 0
+      },
+      positions: [], //位置列表
+      rules: {}
+    };
+  },
+  watch: {
+    'data.content': function() {
+      if (this.data.content !== '') {
+        this.$refs.editor && this.$refs.editor.clearValidate(); // 清除校验
+      }
+      if (this.data.content === '') {
+        // console.log('内容为空');
+        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();
+    if (this.isEdit||this.isCopy) {
+      setTimeout(() => {
+        this.rules = {
+          position: [
+            { required: true, message: '请选择内容类型', trigger: 'change' }
+          ],
+          title: [
+            {
+              validator: (rule, value, callback) => {
+                if (!value.trim()) {
+                  callback(new Error('请输入段落标题'));
+                } else {
+                  callback();
+                }
+              },
+              trigger: 'change'
+            },
+            { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
+          ],
+          content: [
+            { required: true, message: '请输入段落内容', trigger: 'change' }
+          ]
+        };
+      }, 100);
+    } else {
+      this.rules = {
+        position: [
+          { required: true, message: '请选择内容类型', trigger: 'change' }
+        ],
+        title: [
+          {
+            validator: (rule, value, callback) => {
+              if (!value.trim()) {
+                callback(new Error('请输入段落标题'));
+              } else {
+                callback();
+              }
+            },
+            trigger: 'change'
+          },
+          { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
+        ],
+        content: [
+          { required: true, message: '请输入段落内容', trigger: 'change' }
+        ]
+      };
+    }
+      setTimeout(()=>{
+          this.filterHiddenPosition();
+      },200)
+  },
+  mounted() {
+  },
+  methods: {
+    reOrder(i) {
+      this.$emit('reOrder', i, this.index);
+    },
+    addEmit() {
+      this.$emit('add');
+    },
+    delEmit() {
+      this.$emit('del', this.index);
+    },
+    filterHiddenPosition(){
+        const pos = this.data.position;
+        const pArr = this.positions.map((it)=>{return it.key});
+        const pStr = pArr.join(",");
+        const arr=pos.filter((it)=>{
+            return pStr.indexOf(it)>-1;
+        });
+        this.data.position=arr;
+    },
+    // 渲染内容类型
+    renderPositions() {
+      //显示位置枚举列表
+      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;
+        });
+      } 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>
+
+<style lang="less" scoped>
+.quill-editor.ql-editor {
+  padding-left: 0 !important;
+}
+.is-error .el-form-item__error {
+  top: auto;
+}
+.sub-form {
+  position: relative;
+}
+.order-btn {
+  // position: absolute;
+  top: 12px;
+  right: 0;
+  display: flex;
+  a {
+    margin-bottom: 20px;
+    border: 1px solid #22ccc8;
+    color: #22ccc8;
+    padding: 5px 10px;
+    border-radius: 4px;
+    cursor: pointer;
+    font-size: 12px;
+  }
+  .order-spc {
+    margin-top: 28px;
+  }
+  .order-down {
+    margin-left: 20px;
+  }
+}
+/**富文本编辑器样式修改***/
+.ql-snow .ql-picker.ql-size .ql-picker-label::before,
+.ql-snow .ql-picker.ql-size .ql-picker-item::before,
+.ql-snow .ql-picker.ql-header .ql-picker-label::before,
+it .ql-editor,
+.quill-editor {
+  padding-top: 0px !important;
+  margin-top: -8px;
+  min-height: 48px;
+  p {
+    padding-top: 8px;
+  }
+}
+.ql-editor.ql-blank::before {
+  padding-top: 0px;
+}
+.btns {
+  margin-top: 20px;
+}
+</style>

+ 398 - 0
src/components/knowledgeExtra/DiagBase.vue

@@ -0,0 +1,398 @@
+<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.conceptName" placeholder="输入疾病名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="描述:">
+                    <el-input size="mini" v-model="filter.description" placeholder="输入描述" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="状态:">
+                    <el-select v-model="filter.status" 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 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>
+            </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="conceptName"
+                        label="疾病名称"
+                        width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.conceptName.length>8" class="item" effect="dark" :content="scope.row.conceptName" placement="top">
+                            <span>{{scope.row.conceptName.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.conceptName.length<9">{{scope.row.conceptName}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="description"
+                        label="描述"
+                        width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.description.length>8" class="item" effect="dark" :content="scope.row.description" placement="top">
+                            <span>{{scope.row.description.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.description.length<9">{{scope.row.description}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        label="状态">
+                    <template slot-scope="scope">
+                          <span>
+                            {{scope.row.status === 0?'禁用':'启用'}}
+                          </span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="modifierName"
+                        label="操作人">
+                </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)">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button type="text" size="small" @click="editData(scope.row,true)">复制</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button type="text" size="small" :class="scope.row.status === 0?'':'unvailable'" @click="showDelDialog(scope.row)">{{scope.row.status === 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/zskDiagBase.js';
+    import config from '@api/config.js';
+    import utils from '@api/utils.js';
+
+    export default {
+        name: 'ZskDiagBase',
+        data: function () {
+            return {
+                list: [],
+                stateSelect:[
+                    {id:1,name:'启用'},
+                    {id:0,name:'禁用'},
+                ],
+                ruleTypeList:[],
+                searched: false,
+                filter:{
+                    conceptName:'',
+                    description:'',
+                    status:''
+                },
+                cacheData: {},
+                currentPage: 1,
+                pageSize: config.pageSize,
+                pageSizeArr:config.pageSizeArr,
+                pageLayout:config.pageLayout,
+                total: 0,
+                titleWidth:'1070px' //头部最小宽度
+            }
+        },
+        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();
+            });
+        },
+        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;
+                        localStorage.setItem("zskDiagDicts",`{"onlyNum":"${data['24'][0].val}","onlyTxt":"${data['25'][0].val}"}`);
+                    }
+                }).catch((error) => {
+                    console.log(error);
+                });
+            },
+            getTypeList(){
+                this.getDict();
+                api.getTypesList({planCode:'dis'}).then((res) => {
+                    if (res.data.code == '0') {
+                        const data = res.data.data;
+                        localStorage.setItem("zskDiagList",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: 'AddZskDiagBase', 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.diagBasePage(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,
+                    conceptName: this.filter.conceptName,
+                    description: this.filter.description,
+                    status:this.filter.status
+                };
+                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(row,isCopy){
+                const pam = this.searched ? {
+                    currentPage: this.currentPage,
+                    pageSize:this.pageSize,
+                    filter: this.filter
+                } : {currentPage: this.currentPage,
+                    pageSize:this.pageSize};
+                api.diagBaseGetDetail({id:row.id}).then((res) => {
+                    if (res.data.code == '0') {
+                        const data = res.data.data;
+                        this.$router.push({name:'AddZskDiagBase',params:{...pam,data:{...row,klDiagnoseTypeVO:data},copy:isCopy}});
+                    }
+                }).catch((error) => {
+                    this.warning('获取详情失败,请重试')
+                });
+            },
+            showDelDialog(row,isDelete){
+                const params = {
+                    id:row.id
+                };
+                const txt=row.status===0?'重新启用':'禁用';
+                const warningTxt = isDelete?'是否删除该诊断依据?可能对现有系统造成影响':'是否'+txt+'该诊断依据?';
+                const handleFn = isDelete?api.diagBaseDelete:(row.status===0?api.diagBaseApply:api.diagBaseStop);
+                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.status!==''&&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={
+                    conceptName:'',
+                    description:'',
+                    status:''
+                };
+            },
+            update(){
+                const loading = this.$loading({
+                    lock: true,
+                    text: 'Loading',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(0, 0, 0, 0.7)'
+                });
+                api.updateDiagBase().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: 40px;
+        min-width: 970px!important;
+    }
+    .demo-form-inline{
+        margin: 0 20px 0 0;
+    }
+    /deep/ .contents.knowledgeContents {
+        padding: 64px 20px 0;
+    }
+    /deep/ .secLine.el-form {
+        float: right;
+        display: block;
+        position: relative;
+        top: -1px;
+    }
+    .delete{
+        color: red;
+    }
+    .review{
+        color: #22ccc8;
+    }
+    .el-table .cell{
+        overflow: hidden;
+        white-space: nowrap;
+    }
+    #upFile{
+        display: none !important;
+    }
+    .unvailable{
+        color: #FE7D3D;
+        &:hover,&:active,&:focus{
+            color: #f19061;
+        }
+    }
+</style>

+ 181 - 0
src/components/knowledgeExtra/DiagBaseGroup.vue

@@ -0,0 +1,181 @@
+<template>
+    <div class="sub-groups">
+        <div class="group-items">
+        <!--<el-form ref="form" class="add-new-form" label-width="140px" :model="data" :rules="rules">-->
+            <DiagBaseItem v-for="(rules,i) in data.klDiagnoseDetail"
+                           ref="group"
+                           :key="i"
+                           :groupData="rules"
+                           :ind="i"
+                           :inx="inx"
+                           :parInx="parInx"
+                           :hideDel="isLast&&len===1"
+                           :baseTypes="diagTypeList"
+                           @changeVal="handleInput"
+                           @delRule="delRule"></DiagBaseItem>
+            <div class="inner-oper">
+                <span>新增基础依据:</span>
+                <span class="add-btn" @click="addRule"><img src="../../images/add.png" alt="新增基础依据"></span>
+            </div>
+            <el-form-item label="符合条件的数量:" :prop="'klDiagnoseTypeVO.'+parInx+'.groupVO.'+inx+'.fitNo'" class="diag-num">
+                <el-select v-model="data.fitNo"
+                           placeholder="请选择"
+                           size="small">
+                    <el-option
+                            v-for="item in numArr"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.id">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+        </div>
+        <div class="group-oper">
+            <el-button size="small" @click="addGroup">+新增分组</el-button>
+            <el-button :disabled="isLast" size="small" type="danger" plain @click="delGroup">-删除分组</el-button>
+        </div>
+        <!--</el-form>-->
+    </div>
+</template>
+<script>
+    import DiagBaseItem from './DiagBaseItem.vue';
+    import util from '../../api/utils.js'
+    export default {
+        name:'DiagBaseGroup',
+        props:['data','inx','isLast','diagTypeList','parInx'],
+        data(){
+            return {
+            }
+        },
+        computed:{
+            len:function(){
+                return util.delNullObj(this.data.klDiagnoseDetail).length;
+            },
+            numArr:function(){
+                let arr=[];
+                for(let i=0;i<this.len;i++){
+                    arr.push({id:i+1,name:i+1});
+                }
+                return arr;
+            },
+        },
+        methods:{
+            handleInput(val,i){
+                if(val){
+                    this.data[i]=val;
+                }
+            },
+            setRules(){
+                this.$emit('setRules');
+            },
+            addRule(){
+                let temp={
+                    "basConceptId": '',
+                    "basDescription": "",
+                    "basLename": "",
+                    "basLibName": "",
+                    "basLibType": null,
+                    "basType": '',
+                    "eqOperator": "",
+                    "eqUnit": "",
+                    "eqValue": "",
+                    "maxOperator": "",
+                    "maxUnit": "",
+                    "maxVal": "",
+                    "minOperator": "",
+                    "minUnit": "",
+                    "minVal": "",
+                    "dataType":"",
+                };
+                this.data.klDiagnoseDetail.push(temp);
+                this.$emit("setRules");
+            },
+            delRule(i){
+                if(this.len===1){
+                    this.$emit("delGroup",this.inx);
+                    this.$emit("setRules");
+                    return;
+                }
+                this.data.klDiagnoseDetail.splice(i,1,null);
+                this.$emit("setRules");
+                //符合条件数量列表同步变化
+                //if(this.numArr.length){
+                this.data.fitNo='';
+                //}
+            },
+            addGroup(){
+                this.$emit("addGroup",this.inx);
+            },
+            delGroup(){
+                this.$emit("delGroup",this.inx);
+            },
+            warning(msg,type){
+                this.$message({
+                    showClose: true,
+                    message:msg,
+                    type:type||'warning'
+                })
+            },
+            showConfirmDialog(msg,resolve){
+                this.$alert(msg, '提示', {
+                    confirmButtonText: '确定',
+                    type: 'warning'
+                }).then(() => {
+                    resolve();
+                }).catch(() => {
+                    this.warning("删除失败,请重试!")
+                });
+            },
+        },
+        components:{
+            DiagBaseItem
+        }
+    }
+</script>
+<style lang="less" scoped>
+    .sub-groups{
+    }
+    .group-items{
+        padding:10px 20px;
+        margin: 10px 20px;
+        background: #E3EAF4;
+        border:1px #ccc dashed;
+    }
+    .diag-num{
+        background: #fff;
+        padding: 10px 0;
+        /*border-bottom: 1px solid #E6E6E6;*/
+    }
+    .inner-oper{
+        background: #fff;
+        padding: 10px 0 10px 21px;
+        .add-btn {
+            cursor: pointer;
+            img {
+                vertical-align: middle;
+            }
+        }
+    }
+    .group-oper{
+        /*text-align: center;*/
+        padding: 8px 0 8px 205px;;
+        border-top: 4px solid #F5F5F5;
+        background: #fff;
+        margin: 0 20px;
+        .el-button{
+            margin-right: 60px;
+        }
+    }
+    .el-button--danger.is-plain:focus, .el-button--danger.is-plain:hover{
+        color: #fbc4c4;
+        border-color:#fbc4c4;
+    }
+    .el-button--danger.is-plain{
+        background: none;
+        &.is-disabled{
+            color: #f9a7a7;
+            background-color: #fef0f0;
+            border-color: #fde2e2;
+        }
+    }
+</style>

+ 385 - 0
src/components/knowledgeExtra/DiagBaseItem.vue

@@ -0,0 +1,385 @@
+<template>
+    <div class="groups-cont" v-if="groupData">
+        <!--<el-form ref="groupData" label-width="150px" class="sub-condition-form" :model="groupData" :rules="rules">-->
+        <div class="sub-condition-form">
+        <span v-if="!hideDel" class="del-btn"  @click="delRule">删除</span><!--:class="isLast?'disable del-btn':'del-btn'"-->
+            <el-form-item label="基础依据名称:" :key="0" :prop="ruleLine+ind+'.basDescription'">
+                <el-input v-model.trim = "groupData.basDescription" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="基础依据类型:" :key="1" :prop="ruleLine+ind+'.basType'">
+                <el-select v-model="groupData.basType"
+                           id="basTypeRef"
+                           placeholder="请选择"
+                           size="small"
+                           @change="basTypeChange">
+                    <el-option
+                            v-for="item in baseTypes"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.type">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item v-if="!showRegx" :key="2" label="基础依据术语类型:" :prop="ruleLine+ind+'.basLibType'">
+                <el-select v-model="groupData.basLibType"
+                           placeholder="请选择"
+                           size="small"
+                           :disabled="showRegx" @change="basLibTypeChange">
+                    <el-option
+                            v-for="item in baseTermTypeList"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="Number(item.code)">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item v-if="showRegx" :key="3" label="基础依据术语类型:" class="is-required">
+                <el-input disabled v-model="basTypeName"></el-input>
+            </el-form-item>
+            <el-form-item v-if="!showRegx" :key="4" class="addDepartFormItem" label="医学标准术语:" :prop="ruleLine+ind+'.basConceptId'">
+                <el-select clearable remote filterable :remote-method="searchConcept" v-model.trim="groupData.basConceptId" @change="conceptChange">
+                    <el-option
+                            v-for="item in conceptList"
+                            :key="item.conceptId"
+                            :label="item.conceptName"
+                            :value="item.conceptId">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item :key="5" v-if="groupData.basType===2&&!onlyNum&&!onlyTxt" label="选择类型:" :prop="ruleLine+ind+'.dataType'">
+                <el-select v-model="groupData.dataType"
+                           placeholder="请选择"
+                           size="small" @change="dataTypeChange">
+                    <el-option
+                            v-for="item in dataTypes"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.id">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item class="min-margin" :key="6" v-if="(!showRegx&&groupData.dataType==='1')||onlyNum" label="最大值:">
+                <div class="select-item clearfix">
+                    <el-col :span="3">
+                        <el-form-item :prop="ruleLine+ind+'.maxOperator'">
+                            <el-select v-model="groupData.maxOperator"
+                                       placeholder="请选择"
+                                       size="small" clearable>
+                                <el-option
+                                        v-for="item in operMaxList"
+                                        :key="item.key"
+                                        :label="item.name"
+                                        :value="item.key">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item :prop="ruleLine+ind+'.maxVal'">
+                            <el-input type="text" v-model="groupData.maxVal" placeholder="填写数值"/>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item prop="maxUnit">
+                            <el-input  type="text" v-model.trim="groupData.maxUnit" placeholder="填写单位"/>
+                        </el-form-item>
+                    </el-col>
+                </div>
+            </el-form-item>
+            <el-form-item class="min-margin" v-if="(!showRegx&&groupData.dataType==='1')||onlyNum" label="最小值:">
+                <div class="select-item clearfix">
+                    <el-col :span="3">
+                        <el-form-item :prop="ruleLine+ind+'.minOperator'">
+                            <el-select v-model="groupData.minOperator"
+                                       placeholder="请选择"
+                                       size="small" clearable>
+                                <el-option
+                                        v-for="item in operMinList"
+                                        :key="item.name"
+                                        :label="item.name"
+                                        :value="item.name">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item :prop="ruleLine+ind+'.minVal'">
+                            <el-input type="text" v-model="groupData.minVal" placeholder="填写数值"/>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item prop="minUnit">
+                            <el-input  type="text" v-model.trim="groupData.minUnit" placeholder="填写单位"/>
+                        </el-form-item>
+                    </el-col>
+                </div>
+            </el-form-item>
+            <el-form-item v-if="showRegx" key="v11" label="正则表达式:" :prop="ruleLine+ind+'.eqValue'" class="discDesc">
+                <el-input type="textarea" rows="3" placeholder="请输入正则表达式" v-model.trim="groupData.eqValue"></el-input>
+            </el-form-item>
+            <el-form-item key="v13" v-if="(!onlyNum&&!showRegx&&groupData.basType===2&&groupData.dataType==='2')||onlyTxt" label="医学内容:" :prop="ruleLine+ind+'.eqValue'" class="discDesc">
+                <el-input placeholder="请输入医学内容" v-model.trim="groupData.eqValue"></el-input>
+                <span class="tip-text">注:可输入升高、降低、阴性、阳性等~</span>
+            </el-form-item>
+        </div>
+        <!--</el-form>-->
+    </div>
+</template>
+<script>
+    import api from '@api/zskDiagBase.js';
+    export default {
+        name:'DiagBaseItem',
+        props:['groupData','ind','baseTypes','parInx','inx','hideDel'],
+        data(){
+            return {
+                dicts:{},
+                baseTermTypeList:[],
+                typeList:[],
+                numTypes:'',    //只有数值类型的类型id
+                //basTypeName:'',
+                operMaxList:[
+                    {name:'<=',key:'<='},
+                    {name:'<',key:'<'},
+                ],
+                operMinList:[{name:'>',key:'>'},
+                    {name:'>=',key:'>='},
+                ],
+                dataTypes:[{id:'1',name:'数值类型'},{id:'2',name:'文本类型'}],
+                conceptList:[],
+            }
+        },
+        created(){
+            this.dicts=JSON.parse(localStorage.getItem("zskDiagDicts")||'{}');
+            if(this.groupData){
+                if(this.groupData.maxOperator||this.groupData.minOperator){
+                    this.groupData.dataType='1';
+                }else if(this.groupData.eqValue){
+                    this.groupData.dataType='2';
+                }
+            }
+            this.conceptList=[{conceptName:this.groupData.basLibName,conceptId:this.groupData.basConceptId}];
+            if(this.groupData.basType){
+                const obj = this.baseTypes.find((it)=>it.type===this.groupData.basType);
+                this.baseTermTypeList = obj.subMenuList;
+            }
+        },
+        computed:{
+            basTypeName:function(){
+                return (this.baseTypes.find((it)=>it.type===this.groupData.basType)||{}).name;
+            },
+            onlyNum:function(){
+                const onlyNum =this.dicts['onlyNum']||'&';
+                const codes=onlyNum+',';
+                const type=this.groupData.basLibType;
+                return type&&codes.indexOf(this.groupData.basLibType+',')>-1;
+            },
+            onlyTxt:function(){
+                const onlyTxt =this.dicts['onlyTxt']||'&';
+                const codes=onlyTxt+',';
+                const type=this.groupData.basLibType;
+                return type&&codes.indexOf(this.groupData.basLibType+',')>-1;
+            },
+            ruleLine:function(){
+              return 'klDiagnoseTypeVO.'+this.parInx+'.groupVO.'+this.inx+'.klDiagnoseDetail.';
+            },
+            showRegx:function(){
+              return this.groupData.basType===3||this.groupData.basType===4;
+            },
+        },
+        methods:{
+            dataTypeChange(val){
+                this.groupData.eqOperator=(val==='2'?'=':'');
+                this.clearNumText();
+                delete this.groupData.dataType;     //触发更新
+                this.$set(this.groupData,'dataType',val);
+            },
+            basTypeChange(val){        //基础依据类型修改
+                if(!val){
+                    this.baseTermTypeList =[];
+                    return;
+                }
+                this.groupData.basLibType='';
+                this.groupData.dataType='';
+                this.clearConcept();    //清空医学标准术语
+                this.clearNumText();    //清空数值、医学内容
+                const obj = this.baseTypes.find((it)=>it.type===val);
+                this.baseTermTypeList = obj.subMenuList;
+            },
+            basLibTypeChange(val){        //基础依据术语类型修改
+                this.groupData.basLibType=val;
+                if((this.numTypes+',').indexOf(val+',')>-1){
+                    this.groupData.dataType='1';
+                }else{
+                    this.groupData.dataType='';
+                }
+                this.clearConcept();
+                this.clearNumText();
+            },
+            conceptChange(val){
+                this.groupData.basConceptId=val;
+                if(val){
+                    this.groupData.basLibName=this.conceptList.find((it)=>it.conceptId===val).conceptName;
+                }else{
+                    this.groupData.basLibName='';
+                }
+            },
+            clearConcept(){
+                this.groupData.basConceptId='';
+                this.groupData.basLibName='';
+                this.conceptList=[];
+            },
+            clearNumText(){
+                this.groupData.maxOperator='';
+                this.groupData.maxVal='';
+                this.groupData.maxUnit='';
+                this.groupData.minOperator='';
+                this.groupData.minVal='';
+                this.groupData.minUnit='';
+                this.groupData.eqValue='';
+                this.groupData.eqOperator='';
+            },
+            searchConcept(val){
+                const param = {
+                    excludedConceptIds:[this.groupData.basType],
+                    libType:this.groupData.basLibType,
+                    name:val,
+                };
+                api.searchConcept(param).then((res) => {
+                    if (res.data.code == '0') {
+                        const data = res.data.data;
+                        this.conceptList = data;
+                    }
+                }).catch((error) => {
+                    console.log(error);
+                });
+            },
+            /*addRule(){
+                this.$emit("addRule");
+                this.$emit('setRules');
+            },*/
+            delRule(){
+                this.$emit("delRule",this.ind);
+                this.$emit('setRules');
+            },
+            warning(msg,type){
+                this.$message({
+                    showClose: true,
+                    message:msg,
+                    type:type||'warning'
+                })
+            },
+            showConfirmDialog(msg,resolve){
+                this.$alert(msg, '提示', {
+                    confirmButtonText: '确定',
+                    type: 'warning'
+                }).then(() => {
+                    resolve();
+                }).catch(() => {});
+            },
+        }
+    }
+</script>
+<style lang="less">
+    .groups-cont{
+        background: #fff;
+        border-bottom:2px solid #F5F5F5;
+        .conceptItem{
+            padding: 0 10px;
+            cursor: pointer;
+            height: 32px;
+            line-height: 32px;
+            &:hover{
+                background: #ebedf1;
+            }
+        }
+        .sub-condition-form{
+            padding:10px 20px 9px;
+            position: relative;
+            border-bottom:1px solid #F5F5F5;
+            .del-btn{
+                color: #FF5B5B;
+                cursor: pointer;
+                position: absolute;
+                right: 20px;
+                top:20px;
+                z-index: 1;
+                &.disable{
+                    color: #B8B8B8;
+                }
+            }
+        }
+        .el-input__icon{
+            line-height: 32px;
+        }
+        .select-item{
+            &>div{
+                float: left;
+                margin-right: 10px;
+            }
+            .el-input{
+                width: auto;
+            }
+            input{
+                width: 95px;
+                line-height: 32px;
+                height: 32px;
+            }
+        }
+        .el-input,.el-input__inner{
+            width: 190px;
+            line-height: 32px;
+            height: 32px;
+        }
+        .el-button--danger.is-plain{
+            background: none;
+        }
+        .itemList {
+            position: absolute;
+            // display: none;
+            background: #fff;
+            width: 188px;
+            max-height: 160px;
+            border: 1px solid #DCDFE6;
+            left: 0;
+            top: 37px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .el-form-item{
+            margin-bottom: 6px;
+            &.min-margin{
+                margin-bottom: 0;
+                position: relative;
+                .el-form-item__content{
+                    position: unset;
+                }
+                .el-form-item__error{
+                    top:10px;
+                    left: 460px;
+                    white-space: normal;
+                    width: 260px;
+                }
+            }
+            .el-textarea + .el-form-item__error{
+                top:80px;
+                left: 0;
+            }
+            .tip-text + .el-form-item__error{
+                top:40px;
+                left: 0;
+            }
+        }
+
+        .el-input-number{
+            width: 95px;
+        }
+        .el-input-number.is-controls-right .el-input-number__decrease, .el-input-number.is-controls-right .el-input-number__increase{
+            width: 25px;
+            height: 15px;
+            line-height: 16px;
+        }
+        .el-col-3 {
+            width: 94px;
+        }
+    }
+</style>

+ 148 - 0
src/components/knowledgeExtra/DiagBaseType.vue

@@ -0,0 +1,148 @@
+<template>
+    <!--<el-form ref="form" class="add-new-form" label-width="130px" :model="data">-->
+   <div class="add-new-form">
+        <el-form-item label="诊断依据类型:" :prop="'klDiagnoseTypeVO.'+inx+'.conditionType'" class="diag-type">
+            <el-select v-model="data.conditionType"
+                       placeholder="请选择"
+                       size="small">
+                <el-option
+                        v-for="item in typeList"
+                        :key="item.ruleType"
+                        :label="item.name"
+                        :value="item.ruleType">
+                </el-option>
+            </el-select>
+            <span class="tip-text">注:选择诊断依据类型后才能展示基础依据类型~</span>
+        </el-form-item>
+        <DiagBaseGroup v-for="(group,i) in data.groupVO"
+                   ref="groups"
+                   :data="group"
+                   :diagTypeList="baseTypeList"
+                   :inx="i"
+                   :parInx="inx"
+                   :isLast="isLast&&data.groupVO.length===1"
+                   @setRules="setRules"
+                   @addGroup="addGroup"
+                   @delGroup="delGroup"></DiagBaseGroup>
+    <div class="group-oper">
+        <el-button size="small" @click="addDiag">+新增依据</el-button>
+        <el-button size="small" class="copy-btn" @click="copyDiag"><img src="../../images/copy.png" alt="">复制依据</el-button>
+        <el-button :disabled="isLast" size="small" type="danger" plain @click="delDiag">-删除依据</el-button>
+    </div>
+          </div>
+       <!-- </el-form>-->
+      </template>
+      <script>
+          import DiagBaseGroup from './DiagBaseGroup';
+          import util from '../../api/utils.js'
+          export default {
+              name:'DiagBaseType',
+              props:['data','isLast','inx'],
+              data(){
+                  return {
+                      form:{},
+                      conditionType:'',
+                      typeObj:{},
+                      typeList:[],
+                      /*rules:{
+                          conditionType:[]
+                      }*/
+                  }
+              },
+              computed:{
+                baseTypeList:function(){
+                    return this.typeObj[this.data.conditionType];
+                }
+              },
+              created(){
+                  this.getTypeList();
+              },
+              methods:{
+                  setRules(){
+                      this.$emit('setRules');
+                  },
+                  getTypeList(){
+                      const typeListData = JSON.parse(localStorage.getItem("zskDiagList"));
+                      this.typeObj=util.formatObj(typeListData,'ruleType');
+                      this.typeList = typeListData;
+                  },
+                  addDiag(){
+                      this.$emit("addDiag",this.inx);
+                  },
+                  delDiag(){
+                      this.$emit("delDiag",this.inx);
+                  },
+                  copyDiag(){
+                      this.$emit("copyDiag",this.inx);
+                  },
+                  addGroup(i){
+                      const temp={
+                          "baseGroup": '',
+                          "conditionGroup": '',
+                          "fitNo": '',
+                          "klDiagnoseDetail": [{
+                              "basConceptId": '',
+                              "basDescription": "",
+                              "basLename": "",
+                              "basLibName": "",
+                              "basLibType": null,
+                              "basType": '',
+                              "eqOperator": "",
+                              "eqUnit": "",
+                              "eqValue": "",
+                              "maxOperator": "",
+                              "maxUnit": "",
+                              "maxVal": "",
+                              "minOperator": "",
+                              "minUnit": "",
+                              "minVal": ""
+                          }]
+                      };
+                      this.data.groupVO.splice(i+1,0,temp);
+                      this.$emit('setRules');
+                  },
+                  delGroup(i){
+                      if(i===0&&this.data.groupVO.length===1){
+                          this.$emit("delDiag",this.inx);
+                          return;
+                      }
+                      this.data.groupVO.splice(i,1);
+                  }
+              },
+              components:{
+                  DiagBaseGroup
+              }
+          }
+      </script>
+      <style lang="less" scoped>
+          .add-new-form{
+              background: #E3EAF4;
+              padding: 20px 0;
+          }
+          /deep/ .diag-type .el-form-item__error{
+              top: 35px!important;
+              left: 0!important;
+              background: none!important;
+          }
+          .diag-type{
+              background: #fff;
+              margin: 0 20px;
+              padding: 8px 0 15px;
+          }
+          .group-oper{
+              margin: 20px 20px 0 20px;
+              background: #fff;
+              padding: 8px 0 8px 205px;;
+              /*text-align: center;*/
+              .el-button{
+                  margin-right: 60px;
+              }
+              .copy-btn{
+                  border-color:#666;
+                  color: #666;
+                  img{
+                      margin-right: 5px;
+                  }
+              }
+          }
+      </style>

+ 544 - 0
src/components/knowledgeExtra/DiseaseTree.vue

@@ -0,0 +1,544 @@
+<template>
+  <div class="addMedicalMultRelationWrapper">
+    <crumbs :title="minTitle" :param="$route.params" fix="fixed" linkTo="AboutDisease"></crumbs>
+    <div class="contents">
+      <div class="content">
+        <div class="addBtn" v-if="list.length == 0">
+          <el-button
+            @click="addConcept"
+          >+ 新 增</el-button>
+        </div>
+
+        <div class="tree">
+          <el-tree
+            :data="list"
+            :props="defaultProps"
+            node-key="conceptId"
+            draggable
+            :allow-drag="allowDrag"
+            :allow-drop="allowDrop"
+            :expand-on-click-node="true"
+            :render-after-expand="true"
+            :highlight-current="true"
+            :default-expanded-keys="defaultExpandedArr"
+            @node-click = "handleNodeClick"
+          >
+            <span class="custom-tree-node" slot-scope="{ node, data }" >
+                <span class="custom-tree-node-name ellipsis" :class="{colorGray: data.isDeletedConcept == 'Y'}" :title="node.label">{{ node.label }}</span>
+                <span class="btn-box">
+                  <el-button
+                      class="btn-add fl"
+                      v-if="data.level < 2 &&data.level>0"
+                      type="text"
+                      size="mini"
+                      @click="(e) => append(data, e)">
+                      + 增加
+                  </el-button>
+                  <el-button
+                      class="btn-del fr"
+                      v-if="data.level > 1"
+                      type="text"
+                      size="mini"
+                      @click.stop="() => remove(node, data)">
+                      删除
+                  </el-button>
+                </span>
+            </span>
+          </el-tree>
+        </div>
+        <div class="btn">
+          <el-button
+            type="primary"
+            :disabled = 'saveDisable'
+            @click="confirm"
+          >确 定</el-button>
+        </div>
+      </div>
+    </div>
+    <div class="btmFix"></div>
+    <SearchList 
+      v-if="showSearch"
+      ref="searchDom"
+      :conceptList="conceptList||[]" 
+      :addLevel="addLevel"
+      placeTxt="请输入术语"
+      title="疾病相关术语"
+      top="120px"
+      @closeSearch="closeSearch" 
+      @selectConcept="selectConcept" 
+      @searchConcept="searchConcept" />
+  </div>
+</template>
+<script type="text/javascript">
+import api from '@api/knowledgeTree.js';
+import SearchList from '../basicKnow/SearchList.vue';
+
+export default {
+    name:'DiseaseTree',
+    components:{
+      SearchList
+    },
+    data(){
+      return{
+        minTitle:'疾病相关维护-添加',
+        tab:[
+          {name:'ICD10疾病类别',id:'1'},
+          {name:'科室疾病类别',id:'2'},
+          {name:'药物类别',id:'3'},
+          {name:'症状类别',id:'4'},
+          {name:'手术和操作类别',id:'5'},
+          {name:'实验室检查类别',id:'6'},
+          {name:'辅助检查类别',id:'7'},
+        ],
+        template:{
+          "conceptId": null,
+          "conceptName": "",
+          "nodeList": [{
+            "conceptId": 501,
+            "conceptName": "疾病相关主症状",
+            "nodeList": [],
+            "libType": [103],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+            "conceptId": 502,
+            "conceptName": "疾病相关次症状",
+            "nodeList": [],
+            "libType": [103],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+            "conceptId": 503,
+            "conceptName": "疾病相关体格检查结果",
+            "nodeList": [],
+            "libType": [104],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+            "conceptId": 504,
+            "conceptName": "疾病相关实验室检查套餐",
+            "nodeList": [],
+            "libType": [107],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+            "conceptId": 505,
+            "conceptName": "疾病相关辅助检查项目",
+            "nodeList": [],
+            "libType": [109, 110],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+            "conceptId": 506,
+            "conceptName": "疾病相关药物治疗",
+            "nodeList": [],
+            "libType": [101],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+            "conceptId": 507,
+            "conceptName": "疾病相关手术治疗",
+            "nodeList": [],
+            "libType": [106],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+            "conceptId": 508,
+            "conceptName": "疾病相关鉴别诊断",
+            "nodeList": [],
+            "libType": [100],
+            "level": 1,
+            "sonRelationId": 17,
+            "isExpanded": false
+          }, {
+              "conceptId": 509,
+              "conceptName": "疾病相关量表",
+              "nodeList": [],
+              "libType": [124],
+              "level": 1,
+              "sonRelationId": 17,
+              "isExpanded": false
+          }, {
+              "conceptId": 510,
+              "conceptName": "疾病相关护理",
+              "nodeList": [],
+              "libType": [123],
+              "level": 1,
+              "sonRelationId": 17,
+              "isExpanded": false
+          }],
+          "level": 0,
+          "isExpanded": false
+        },
+        curId:'1',
+        list: [],
+        defaultProps: {
+          children: 'nodeList',
+          label: 'conceptName'
+        },
+        conceptList: [], //概念列表
+        showSearch: false,
+        addLevel: 0,  //添加级别
+        excludedConceptIds:[],
+        operaList: [],
+        relationConceptId: '', //关联父类ID
+        level: 0, //层级(修改时只能显示三级)
+        saveDisable: false,  //保存按钮禁止点击
+        defaultExpandedArr: [],
+        relationTypes:[]
+      }
+    },
+    created(){
+      this.getTreeList(1)
+    },
+    methods:{
+      addConcept(e) {
+        this.addLevel = 0;
+        this.openSearch(e);
+      },
+      getTreeList(id){
+      const { isEdit, data } = this.$route.params
+      if(isEdit) {
+          this.isEdit = isEdit
+          this.minTitle = '疾病相关维护-修改'
+          const paramData = JSON.parse(JSON.stringify(data))
+          let result = paramData.diseaseDetailDTO||{}
+          // this.relationTypes = paramData.types[0]||[]
+          const itemStr = JSON.stringify(result)
+          let tmp = itemStr.replace(/disName/g,'conceptName').replace(/rname/g,'conceptName').replace(/datas/g,'nodeList').replace(/details/g,'nodeList').replace(/id/g,'conceptId').replace(/sconceptId/g,'conceptId').replace(/rconceptId/g,'conceptId').replace(/libName/g,'conceptName')
+          let item = JSON.parse(tmp)
+          item.level = 0
+          item.isExpanded = false
+          item.nodeList = this.IteraNodeList(item.nodeList, [], 1)
+          let arr = []
+          arr[0] = item
+          this.list = [...arr]
+      }
+      },
+      allowDrop(draggingNode, dropNode, type) {
+        if(draggingNode.parent.data.conceptName !== dropNode.parent.data.conceptName){
+          return false
+        }else{
+          return type !== 'inner'
+        }
+      },
+      allowDrag(draggingNode) {
+        return draggingNode.data.level > 1;//一级不可拖动
+      },
+      handleNodeClick(data) {
+          if(data.nodeList.length > 0) {
+            if(!data.isExpanded) {
+              this.defaultExpandedArr.push(data.conceptId)
+            } else {
+              this.defaultExpandedArr = this.defaultExpandedArr.filter(item => item !== data.conceptId)
+            }
+            this.$set(data, 'isExpanded', !data.isExpanded);
+          }
+      
+      },
+      confirm() { 
+        if(!this.list[0] || this.list[0].nodeList.length == 0) {
+          this.message('请输入数据信息');
+          return
+        }
+        const param = {
+          conceptId: this.list[0].conceptId,
+          sonRelationId: 17,
+          isOrderBy: 1
+        }
+        const nodeListResult = []
+        this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
+        param.nodeList = nodeListResult
+        const {params,grandson} = this.reparams(param)
+        if(grandson == 0){
+          this.message('增加子项数据后才能保存~');
+          return
+        }
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+        api.diseaseBaseSave(params).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.message(res.data.msg||'保存成功','success');
+            this.$router.push({
+              name: 'AboutDisease',
+              params: Object.assign({}, this.$route.params, { currentPage: 1 })
+            });
+          } else {
+            this.message(data.msg);
+          }
+          this.saveDisable = false;
+        })
+      },
+      IteraNodeList(nodeList,  nodeListResult, type, level = 1) {
+        this.level= level + 1
+        for(let i = 0; i <nodeList.length; i++) {
+          let newChild;
+          if(type == '0') { //添加的时候保存所有的id列表
+            newChild = {conceptId: nodeList[i].conceptId,libType:nodeList[i].libType, relationId: 17,nodeList:[],sonRelationId: 17, isExpanded:false}
+          } else if(type == '1') {  //修改的时候添加层级
+            const item = JSON.parse(JSON.stringify(nodeList[i]))
+            newChild = Object.assign(item, {level:  level, nodeList: [],sonRelationId: 17, isExpanded:false})
+          } else if(type == '2') { //移除节点的时候同时移除节点(搜索时排除的id列表)
+            newChild = nodeList[i].conceptId
+          }
+          if(nodeList[i].nodeList &&nodeList[i].nodeList.length > 0&&level < 3) {
+            if(type == '0' || type =='1') {
+              this.IteraNodeList(nodeList[i].nodeList,  newChild.nodeList, type, level+1)
+            } else if(type == '2') {
+              this.IteraNodeList(nodeList[i].nodeList,  nodeListResult, type, level+1)
+            }
+          }
+          newChild&&nodeListResult.push(newChild)
+        }
+        return nodeListResult
+      },
+      searchConcept(txt) {
+        let  excludedConceptIds = [];
+        if(!txt){
+          this.conceptList = []
+          return
+        }
+        if(this.list.length>0) {
+          this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
+        }
+        const {libType} = this.operaList
+
+        this.list.length>0&&this.excludedConceptIds.push(this.list[0].conceptId)
+        const params = {
+          "name": txt,
+          "diseaseName":txt,
+          "excludedConceptIds": this.excludedConceptIds||[],
+          "libType": this.addLevel == 0?100:libType&&libType[0]||''
+        }
+        let searchUrl = this.addLevel == 0?'findDisName':'searchConcept'
+        api[searchUrl](params).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.conceptList = data.data
+          }
+        })
+      },
+      selectConcept(data) {
+        console.log(this.addLevel)
+        const {item,txt} = data
+        if(this.addLevel == 0) {
+          let temp = JSON.parse(JSON.stringify(this.template))
+          temp.conceptId = item.conceptId
+          temp.conceptName = item.conceptName
+          this.list = [temp]
+        }else {
+          const data = this.operaList
+          const newChild = Object.assign({}, item,  {nodeList: [],libType:data.libType, level: data.level+1, conceptId: item.conceptId, relationId: 17,sonRelationId: 17});
+         // const newChild = { id: id++, label: 'nodeList', level: data.level+1, children: [] };
+          if (!data.nodeList) {
+            this.$set(data, 'nodeList', []);
+          }
+          data.nodeList.push(newChild);
+        }
+        this.conceptList = [];
+        if(this.addLevel == 0){
+          this.closeSearch();
+        }else{
+          this.searchConcept(txt)
+        }
+      },
+      openSearch(e) {
+        this.showSearch = true
+      },
+      closeSearch() {
+        this.conceptList = []
+        this.showSearch = false
+      },
+      append(data, e) {
+          if(this.$refs.searchDom){console.log(this.$refs.searchDom.$refs.conceptInput)
+              this.conceptList = [];
+              setTimeout(()=>{
+                  this.$refs.searchDom.$refs.conceptInput.value="";
+              })
+
+          }
+          this.addLevel = data.level+1;
+          this.relationConceptId = data.conceptId
+          this.operaList = data;
+          this.openSearch(data);
+
+          // const newChild = { id: id++, label: 'testtest', level: data.level+1, nodeList: [] };
+          // if (!data.nodeList) {
+          // this.$set(data, 'nodeList', []);
+          // }
+          // data.nodeList.push(newChild);
+      },
+      showConfirmDialog(msg,resolve){
+        this.$confirm(msg, '提示', {
+          confirmButtonText: '确定',
+          showCancelButton:false,
+          // cancelButtonText: '取消',
+          // cancelButtonClass:'cancel',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      remove(node, data) {
+          this.showConfirmDialog('是否删除该关联关系,可能对现有系统会造成影响',()=>{
+            const parent = node.parent;
+            const nodeList = parent.data.nodeList || parent.data;
+            const index = nodeList.findIndex(d => d.conceptId === data.conceptId);
+            nodeList.splice(index, 1);
+          })
+      },
+      reparams(param){
+        let params = [],grandson = 0;
+        const tmplis = param.nodeList||[];
+        for(let i = 0;i < tmplis.length;i++){
+          let item = tmplis[i],sonIds=[];
+          if(item.nodeList&&item.nodeList.length>0){
+            for(let j = 0;j < item.nodeList.length;j++){
+              sonIds.push(item.nodeList[j].conceptId)
+            }
+          }
+          if(sonIds.length > 0){
+            ++grandson
+          }
+          let obj = {
+            "sid": param.conceptId,
+            "rid": item.conceptId,
+            "eids": sonIds,
+            // "eid": item.libType[0],
+            // "srid": 0
+          }
+          params.push(obj)
+        }
+        return {params,grandson}
+      },
+      message(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      
+    }
+}
+</script>
+<style lang="less" scoped>
+@import "../../less/admin.less";
+.content {
+  min-width: auto;
+  box-sizing: border-box;
+}
+.contents {
+  box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.addMedicalMultRelationWrapper {
+  height: calc(100% - 70px);
+}
+.tree {
+  margin-bottom: 230px;
+}
+.contents {
+  height: 100%;
+  padding-top: 60px;
+}
+.btn-box {
+  position: absolute;
+  left: 350px;
+}
+.btn-del {
+  color: #8F8F8F;
+  padding-left: 28px;
+}
+.addBtn {
+  width: 66px;
+  order: 1px solid #21CBC7;
+  border-radius: 2px;
+}
+.conceptSearch {
+  position: fixed;
+  right: 20px;
+  top: 180px;
+  bottom: 10px;
+  width: 300px;
+  background: #fff;
+  border: 1px solid #C9C9C9;
+  text-align: center;
+  z-index: 2;
+  padding: 30px;
+  box-sizing: border-box;
+  .conceptTitle {
+    width: 100%;
+    text-align: center;
+    padding: 20px 0;
+  }
+  .searchText {
+    padding: 0 35px 0 15px;
+    width: 100%;
+    height: 34px;
+    border: 1px solid #C9C9C9;
+    box-sizing: border-box;
+  }
+  .conceptList {
+    min-height: 200px;
+    max-height:300px;
+    margin: -2px auto 0;
+    border: 1px solid #E1DFDF;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+  .conceptItem {
+    height: 34px;
+    line-height: 34px;
+    text-align: left;
+    padding: 0 15px;
+    cursor: pointer;
+  }
+  .conceptItem:hover {
+    background: #f5f7fa;
+  }
+  .closeSearch {
+    position: absolute;
+    width: 30px;
+    right: 0;
+    top: 0;
+  }
+  .searchWrap {
+    position: relative;
+    .search {
+      position: absolute;
+      right: 7px;
+      top:8px;
+    }
+  }
+}
+.delete {
+  cursor: pointer;
+}
+.content{
+  background: #fff;
+  padding: 20px 20px 30px;
+  color: #545455;
+ 
+}
+
+.btn {
+  text-align: center;
+  margin-top: 20px;
+}
+.custom-tree-node-name {
+  display: inline-block;
+  width: 270px;
+}
+.colorGray {
+  color: #c1c1c1;
+} 
+</style>

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

@@ -0,0 +1,480 @@
+<template>
+  <div class="addMedicalMultRelationWrapper">
+    <crumbs :title="minTitle" fix="fixed" linkTo=""></crumbs>
+    <TreeTab @getTreeList="getTreeList" />
+    <div class="updataData" @click="updataTree" v-if="id == 1||id == 2||id == 3||id == 4"><span>更新数据</span></div>
+    
+    <div class="contents">
+      <div class="content">
+        <div class="addBtn" v-if="list.length == 0">
+          <!-- <el-button
+            @click="addConcept"
+          >+ 新 增</el-button> -->
+        </div>
+
+        <div class="tree">
+          <el-tree
+            :data="list"
+            :props="defaultProps"
+            node-key="conceptId"
+            draggable
+            :allow-drag="allowDrag"
+            :allow-drop="allowDrop"
+            :expand-on-click-node="true"
+            :render-after-expand="true"
+            :highlight-current="true"
+            :default-expanded-keys="defaultExpandedArr"
+            @node-click = "handleNodeClick"
+          >
+            <span class="custom-tree-node" slot-scope="{ node, data }" >
+                <span class="custom-tree-node-name ellipsis" :class="{colorGray: data.isDeletedConcept == 'Y'}" :title="node.label">{{ node.label }}</span>
+                <span class="btn-box">
+                  <el-button
+                      class="btn-add fl"
+                      v-show="data.level < 2"
+                      type="text"
+                      size="mini"
+                      @click="(e) => append(data, e)">
+                      + 增加
+                  </el-button>
+                  <el-button
+                      class="btn-del fr"
+                      v-show="data.level != 0"
+                      type="text"
+                      size="mini"
+                      @click.stop="() => remove(node, data)">
+                      删除
+                  </el-button>
+                </span>
+            </span>
+          </el-tree>
+        </div>
+        <div class="btn">
+          <el-button
+            type="primary"
+            :disabled = 'saveDisable'
+            @click="confirm"
+          >确 定</el-button>
+        </div>
+      </div>
+    </div>
+    <div class="btmFix"></div>
+    <SearchList 
+      v-if="showSearch" 
+      :conceptList="conceptList" 
+      :addLevel="addLevel"
+      @closeSearch="closeSearch" 
+      @selectConcept="selectConcept" 
+      @searchConcept="searchConcept" />
+  </div>
+</template>
+<script type="text/javascript">
+import api from '@api/knowledgeTree.js';
+import SearchList from '../basicKnow/SearchList.vue';
+import TreeTab from '../basicKnow/TreeTab.vue';
+
+export default {
+    name:'KnowledgeAll',
+    components:{
+      SearchList,TreeTab
+    },
+    data(){
+      return{
+        minTitle:'树形结构维护',
+        id:1,
+        list: [],
+        defaultProps: {
+          children: 'nodeList',
+          label: 'conceptName'
+        },
+        conceptList: [], //概念列表
+        showSearch: false,
+        addLevel: 0,  //添加级别
+        excludedConceptIds:[],
+        operaList: [],
+        relationConceptId: '', //关联父类ID
+        level: 0, //层级(修改时只能显示三级)
+        saveDisable: false,  //保存按钮禁止点击
+        defaultExpandedArr: [],
+        relationTypes:[]
+      }
+    },
+    created(){
+      this.getTreeList(1)
+    },
+    methods:{
+      updataTree(){
+        const {id} = this
+        api.clearDrug({}).then((res)=>{
+          const loading = this.$loading({
+            lock: true,
+            text: 'Loading',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
+          this.getTreeList(id)
+        })
+      },
+      getTreeList(id){
+        if(id != this.id){
+          this.id = id
+          this.showSearch = false
+        }
+        const loading = this.$loading({
+          lock: true,
+          text: 'Loading',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        const params = {
+          "type": id,
+        }
+        api.getlistTree(params).then((res) => {
+          loading.close();
+          const { data } = res
+          if(data.code == '0') {
+            let result = data.data.treeDTO||{}
+            this.relationTypes = data.data.types||[]
+            const itemStr = JSON.stringify(result)
+            let tmp = itemStr.replace(/nextTree/g,'nodeList').replace(/id/g,'conceptId').replace(/name/g,'conceptName')
+            let item = JSON.parse(tmp)
+            item.level = 0
+            item.isExpanded = false
+            item.nodeList = this.IteraNodeList(item.nodeList, [], 1)
+            let arr = []
+            arr[0] = item
+            this.list = [...arr]
+          } else {
+            this.message(data.msg);
+          }
+          this.saveDisable = false;
+        })
+      },
+      allowDrop(draggingNode, dropNode, type) {
+        if(draggingNode.parent.data.conceptName !== dropNode.parent.data.conceptName){
+          return false
+        }else{
+          return type !== 'inner'
+        }
+      },
+      allowDrag(draggingNode) {
+        return draggingNode.data.level != 0;//一级不可拖动
+      },
+      handleNodeClick(data) {
+          if(data.nodeList.length > 0) {
+            if(!data.isExpanded) {
+              this.defaultExpandedArr.push(data.conceptId)
+            } else {
+              this.defaultExpandedArr = this.defaultExpandedArr.filter(item => item !== data.conceptId)
+            }
+            this.$set(data, 'isExpanded', !data.isExpanded);
+          }
+      
+      },
+      // addConcept(e) {
+      //   console.log(e)
+      //   this.addLevel = 0;
+      //   this.openSearch(e);
+      // },
+      confirm() { 
+        if(!this.list[0] || this.list[0].nodeList.length == 0) {
+          this.message('请输入数据信息');
+          return
+        }
+        const param = {
+          conceptId: this.list[0].conceptId,
+          sonRelationId: 17,
+          isOrderBy: 1
+        }
+        const nodeListResult = []
+        this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
+        param.nodeList = nodeListResult
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+        api.addTreeRelation(this.reparams(param)).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.message(res.data.msg||'保存成功','success');
+          } else {
+            this.message(data.msg);
+          }
+          this.saveDisable = false;
+        })
+      },
+      IteraNodeList(nodeList,  nodeListResult, type, level = 1) {
+        this.level= level + 1
+        for(let i = 0; i <nodeList.length; i++) {
+          let newChild;
+          if(type == '0') { //添加的时候保存所有的id列表
+            newChild = {conceptId: nodeList[i].conceptId, relationId: 17,nodeList:[],sonRelationId: 17, isExpanded:false}
+          } else if(type == '1') {  //修改的时候添加层级
+            const item = JSON.parse(JSON.stringify(nodeList[i]))
+            newChild = Object.assign(item, {level:  level, nodeList: [],sonRelationId: 17, isExpanded:false})
+          } else if(type == '2') { //移除节点的时候同时移除节点(搜索时排除的id列表)
+            newChild = nodeList[i].conceptId
+          }
+          
+          if(nodeList[i].nodeList &&nodeList[i].nodeList.length > 0&&level < 3) {
+            if(type == '0' || type =='1') {
+              this.IteraNodeList(nodeList[i].nodeList,  newChild.nodeList, type, level+1)
+            } else if(type == '2') {
+              this.IteraNodeList(nodeList[i].nodeList,  nodeListResult, type, level+1)
+            }
+            
+          }
+          nodeListResult.push(newChild)
+        }
+        return nodeListResult
+      },
+      searchConcept(txt) {
+        let  excludedConceptIds = [];
+        if(!txt){
+          this.conceptList = []
+          return
+        }
+        if(this.list[0]) {
+          excludedConceptIds.push(this.list[0].conceptId)
+          this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
+        }
+        const params = {
+          "typeId": this.addLevel === 1 ? this.relationTypes[2] : this.addLevel === 2 ? this.relationTypes[4] : 1,
+          "name": txt,
+          "excludedConceptIds": this.excludedConceptIds,
+          "relationId": this.addLevel === 1 ? this.relationTypes[1] : this.addLevel === 2 ? this.relationTypes[3] : 1,
+          "relationConceptId": this.relationConceptId,
+        }
+        api.getTreeSearchList(params).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.conceptList = data.data
+          }
+        })
+      },
+      selectConcept(data) {
+        const {item,txt} = data
+        if(this.addLevel == 0) {
+          this.list.push(Object.assign({}, item,  {nodeList: [], level: 0, conceptId: item.conceptId, sonRelationId: 17}))
+          this.list = JSON.parse(JSON.stringify(this.list))
+        }else { 
+          const data = this.operaList
+          const newChild = Object.assign({}, item,  {nodeList: [], level: data.level+1, conceptId: item.conceptId, relationId: 17,sonRelationId: 17});
+          // const newChild = { id: id++, label: 'nodeList', level: data.level+1, children: [] };
+          if (!data.nodeList) {
+          this.$set(data, 'nodeList', []);
+          }
+          data.nodeList.push(newChild);
+        }
+        this.conceptList = [];
+        this.searchConcept(txt)
+        // this.closeSearch();
+      },
+      openSearch(e) {
+        this.showSearch = true
+      },
+      closeSearch() {
+        this.conceptText = ''
+        this.conceptList = []
+        this.showSearch = false
+      },
+      append(data, e) {
+          this.addLevel = data.level+1;
+          this.relationConceptId = data.conceptId
+          this.operaList = data;
+          this.openSearch(data);
+
+          // const newChild = { id: id++, label: 'testtest', level: data.level+1, nodeList: [] };
+          // if (!data.nodeList) {
+          // this.$set(data, 'nodeList', []);
+          // }
+          // data.nodeList.push(newChild);
+      },
+      showConfirmDialog(msg,resolve){
+        this.$confirm(msg, '提示', {
+          confirmButtonText: '确定',
+          showCancelButton:false,
+          // cancelButtonText: '取消',
+          // cancelButtonClass:'cancel',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      remove(node, data) {
+          this.showConfirmDialog('是否删除该关联关系,可能对现有系统会造成影响',()=>{
+            const parent = node.parent;
+            const nodeList = parent.data.nodeList || parent.data;
+            const index = nodeList.findIndex(d => d.conceptId === data.conceptId);
+            nodeList.splice(index, 1);
+          })
+      },
+      reparams(param){
+        let params = []
+        const tmplis = param.nodeList||[];
+        for(let i = 0;i < tmplis.length;i++){
+          let item = tmplis[i],sonIds=[]
+          if(item.nodeList&&item.nodeList.length>0){
+            for(let j = 0;j < item.nodeList.length;j++){
+              sonIds.push(item.nodeList[j].conceptId)
+            }
+          }
+          let obj = {
+            "eid": item.conceptId,
+            "eids": sonIds,
+            "rid": this.relationTypes[1],
+            "sid": param.conceptId,
+            "srid": this.relationTypes[3]
+          }
+          params.push(obj)
+        }
+        return params
+      },
+      message(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      
+    }
+}
+</script>
+<style lang="less" scoped>
+@import "../../less/admin.less";
+.updataData {
+  position:fixed;
+  right:20px;
+  top:60px;
+  z-index:100;
+  height:40px;
+  line-height:40px;
+  cursor:pointer;
+  span {
+    display:inline-block;
+    border:1px solid #48c5d7;
+    color:#48c5d7;
+    margin-top:7px;
+    padding:0 10px;
+    height:24px;
+    line-height:24px;
+    border-radius: 3px;
+    font-size:14px;
+  }
+}
+
+.el-button+.el-button {
+  margin-left: 0;
+}
+.content {
+  min-width: auto;
+  box-sizing: border-box;
+}
+.contents {
+  box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.addMedicalMultRelationWrapper {
+  height: calc(100% - 70px);
+}
+.tree {
+  margin-bottom: 230px;
+}
+.contents {
+  height: 100%;
+  padding-top: 120px;
+}
+.btn-box {
+  position: absolute;
+  left: 350px;
+}
+.btn-del {
+  color: #8F8F8F;
+  padding-left: 28px;
+}
+.addBtn { 
+  width: 66px;
+  order: 1px solid #21CBC7;
+  border-radius: 2px;
+}
+.conceptSearch {
+  position: fixed;
+  right: 20px;
+  top: 180px;
+  bottom: 10px;
+  width: 300px;
+  background: #fff;
+  border: 1px solid #C9C9C9;
+  text-align: center;
+  z-index: 2;
+  padding: 30px;
+  box-sizing: border-box;
+  .conceptTitle {
+    width: 100%;
+    text-align: center;
+    padding: 20px 0;
+  }
+  .searchText {
+    padding: 0 35px 0 15px;
+    width: 100%;
+    height: 34px;
+    border: 1px solid #C9C9C9;
+    box-sizing: border-box;
+  }
+  .conceptList {
+    min-height: 200px;
+    max-height:300px;
+    margin: -2px auto 0;
+    border: 1px solid #E1DFDF;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+  .conceptItem {
+    height: 34px;
+    line-height: 34px;
+    text-align: left;
+    padding: 0 15px;
+    cursor: pointer;
+  }
+  .conceptItem:hover {
+    background: #f5f7fa;
+  }
+  .closeSearch {
+    position: absolute;
+    width: 30px;
+    right: 0;
+    top: 0;
+  }
+  .searchWrap {
+    position: relative;
+    .search {
+      position: absolute;
+      right: 7px;
+      top:8px;
+    }
+  }
+}
+.delete {
+  cursor: pointer;
+}
+.content{
+  background: #fff;
+  padding: 40px 20px 30px;
+  color: #545455;
+}
+
+.btn {
+  // text-align: center;
+  margin-top: 20px;
+  position: fixed;
+  bottom: 30px;
+  width: 100%;
+  left: 60%;
+}
+.custom-tree-node-name {
+  display: inline-block;
+  width: 270px;
+}
+.colorGray {
+  color: #c1c1c1;
+} 
+</style>

+ 329 - 0
src/components/knowledgeExtra/KnowledgeBaseType.vue

@@ -0,0 +1,329 @@
+<template>
+  <div>
+    <crumbs title="基础术语类型维护" minWidth="995px" class="knowledgeTitle">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="术语类型:">
+          <el-select v-model="filter.type" clearable filterable placeholder="请选择" size="mini">
+            <el-option
+              v-for="item in typeList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="数字编码:">
+          <el-input size="mini" type="number" v-model="filter.term" placeholder="请输入编码"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">确认</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="name" label="术语类型" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="code" label="数字编码" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="isHasCommonCn" label="是否支持通用扩展" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="canChangeCn" label="是否允许修改" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="onlyOneCn" label="是否只有单个词" show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column prop="operName" label="操作人" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column prop="gmtModified" label="操作时间" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column label="操作" width="160">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              :disabled="true"
+            >修改</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/knowledgeTree.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'KnowledgeBaseType',
+  data: function() {
+    return {
+      list: [],
+      stateSelect:[
+          {id:'N',name:'启用'},
+          {id:'Y',name:'禁用'},
+      ],
+      // isState:'',
+      cacheData: {}, //因为删除和恢复要及时更新,所以不做缓存
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      searched: false,
+      filter: {
+        term: '',
+        type: '',
+        libName: '',
+      },
+      typeList: [],
+      reloadFlag: true
+    };
+  },
+  created() {
+    // this.getDataList();
+    this.getTypeList();
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+    });
+    this.$nextTick(()=>{
+      that.getDataList();
+    })
+  },
+  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: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+    reloadLib() {
+      if (this.reloadFlag) {
+        this.reloadFlag = false;
+        api.clearStandRuleDrug().then(res => {
+          if (res.data.code == 0) {
+            this.reloadFlag = true;
+          }
+        });
+      }
+    },
+    addMedicalName() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddTerm', params: pam });
+    },
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    getDataList(isTurnPage) {
+      const param = 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.baseTypeGetPage(param)
+        .then(res => {
+          // loading.close();
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            const templis = data.records;
+            for(let i = 0;i < templis.length;i++){
+              templis[i].isDeleted = templis[i].status=='1'?'N':'Y'
+            }
+            this.list = templis;
+            // this.cacheData[param.current] = data.records;
+            this.total = data.total;
+            if (this.inCurrentPage !== undefined) {
+              this.currentPage = this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    getTypeList() {
+      api
+        .baseTypeGetPage({ name: '',size: 1000 })
+        .then(res => {
+          const data = res.data;
+          if (data.code == 0) {
+            this.typeList = data.data.records||[];
+          } else {
+            console.log(res.msg);
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    /*getDetailList(id) {
+        this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+      },*/
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        "code": this.filter.term.trim(),
+        "name": this.filter.type,
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+      };
+      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(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(() => {});
+    },
+    showDelDialog(item) {
+      /*const param = {
+          term:item.term,
+          type:item.type,
+          id:item.id
+        }*/
+      const param = {
+        conceptId: item.conceptId
+      };
+      let url = item.isDeleted === 'N'?'disableConcept':'startConcept'
+      let waringTxt =
+        item.isDeleted === 'N'
+          ? '是否禁用该标准术语?'
+          : '是否重新启用该条数据?';
+      this.showConfirmDialog(waringTxt, () => {
+        api[url](param)
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (item.isDeleted !== 'N') {
+                //恢复成功后跳转到筛选条件的首页
+                this.currentPage = 1;
+              } else {
+                if (this.filter.isState !== '' && 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 = {
+        term: '',
+        type: '',
+        libName: '',
+        isState: ''
+      };
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+@import '../../less/admin.less';
+
+/deep/ .container.knowledgeTitle {
+  height: 40px;
+}
+/deep/ .contents.knowledgeContents {
+  padding: 64px 20px 0;
+}
+/deep/ .secLine.el-form {
+  float: right;
+  display: block;
+  position: relative;
+  top: -5px;
+}
+.delete {
+  color: red;
+}
+.review {
+  color: #22ccc8;
+}
+.deletes {
+  cursor: default;
+  color: red;
+}
+.reviews {
+  color: #606266;
+  cursor: default;
+}
+.el-table .cell {
+  overflow: hidden;
+  white-space: nowrap;
+}
+#upFile {
+  display: none !important;
+}
+</style>

+ 450 - 0
src/components/knowledgeExtra/RuleManager.vue

@@ -0,0 +1,450 @@
+<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>
+</template>
+
+<script>
+    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:'1070px' //头部最小宽度
+            }
+        },
+        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'?'启用':'禁用')
+                        }
+                        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]) {       //如果已请求过该页数据,则使用缓存不重复请求
+                  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('更新失败,请重试')
+                });
+            },
+        }
+    }
+</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;
+        }
+    }
+</style>

+ 334 - 0
src/components/knowledgeExtra/StaticInfo.vue

@@ -0,0 +1,334 @@
+<template>
+    <div>
+        <crumbs title="静态信息维护">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="标准术语归类:">
+                    <el-select size="mini" v-model="filter.libType" placeholder="标准术语归类" clearable>
+                        <el-option v-for="item in typeList" :label="item.name" :value="item.val" :key="item.val"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="医学标准术语:">
+                    <el-input size="mini" v-model="filter.term" placeholder="请输入术语" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="状态:">
+                    <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+                        <el-option v-for="item in stateList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" style="margin:0 10px" @click="addMedicalPrompt">添加静态知识</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <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="name"
+                        width="150"
+                        label="医学标准术语">
+                </el-table-column>
+                <el-table-column
+                        prop="typeName"
+                        label="标准术语归类"
+                        width="120">
+                </el-table-column>
+                <el-table-column
+                        prop="title"
+                        label="关联标题"
+                        width="240">
+                </el-table-column>
+                <el-table-column
+                        label="状态">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.isDeleted=='N'">启用</span>
+                        <span v-if="scope.row.isDeleted=='Y'" class="delete">禁用</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="modifier"
+                        label="操作人"
+                        width="80">
+                </el-table-column>
+                <el-table-column
+                        prop="gmtModified"
+                        label="操作时间"
+                        width="180"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column
+                        label="操作" width="140">
+                    <template slot-scope="scope">
+                        <!-- <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" class="is-disabled">修改</el-button> -->
+                        <el-button type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <!-- <el-button v-if="scope.row.isDeleted=='Y' || scope.row.typeId === 82 || scope.row.typeId === 83" type="text" size="small" class="is-disabled">复制</el-button> -->
+                        <!-- <el-button v-if="scope.row.isDeleted=='N'&&scope.row.typeId !== 82 && scope.row.typeId !== 83" type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button> -->
+                        <el-button type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" @click="showReuseDialog(scope.row)">启用</el-button>
+                        <el-button v-if="scope.row.isDeleted=='N'" type="text" size="small" class="delete" @click="showDelDialog(scope.row)">禁用</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/knowledgeTree.js';
+  import config from '@api/config.js';
+  import utils from '@api/utils.js';
+
+  export default {
+    name: 'StaticInfo',
+    data: function () {
+      return {
+        list: [],
+        cacheData: {},
+        currentPage: 1,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
+        total: 0,
+        linkIn:[],
+        pays:[],
+        typeList:[],
+        stateList:[
+          {id:'N',name:'启用'},
+          {id:'Y',name:'禁用'},
+        ],
+        searched: false,
+        filter: {
+          term: '',
+          title:'',
+          status:'',
+          libType:'',
+        }
+      }
+    },
+    created() {
+      const param = this.$route.params;
+      if(param.currentPage){
+        this.inCurrentPage = param.currentPage
+        this.filter = param.filter
+      }
+      //返回时避免参数未赋值就获取列表
+      this.$nextTick(()=>{
+        this.getDataList();
+        this.getListBack();
+      });
+    },
+    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: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
+        this.getDataList();
+      },
+      addMedicalPrompt(){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({name:'AddDevKnow',
+          params:pam});
+      },
+      toEditProduct(row){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({
+          name:'AddDevKnow',
+          params: Object.assign(pam, {data:row,isEdit:true})
+        })
+      },
+      toCopyProduct(row){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({
+          name:'AddDevKnow',
+          params: Object.assign(pam, {data:row,isCopy:true})
+        })
+      },
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getListBack(){
+        api.getListBack({}).then((res) => {
+          const result = res.data
+          if (result.code == '0') {
+            this.typeList = result.data&&result.data[10]||[]
+          }
+        })
+      },
+      getDataList(isTurnPage) {
+        const param = 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.staticBaseKnowledge(param).then((res) => {
+          loading.close()
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            let templis = data.records;
+            this.list = templis;
+            this.cacheData[param.current] = data.records;
+            this.total = data.total;
+            for(let i = 0;i < templis.length;i++){
+              templis[i].isDeleted = templis[i].status=='1'?'N':'Y'
+            }
+            if(this.inCurrentPage!==undefined){
+              this.currentPage=this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      clearFilter(){
+        this.filter={
+          term: '',
+          title:'',
+          status:'',
+          libType:'',
+        };
+      },
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
+        const param = {
+          name:this.filter.term.trim(),
+          current: this.inCurrentPage||this.currentPage,
+          size: this.pageSize,
+          status:this.filter.status == 'Y'?0:this.filter.status == 'N'?1:'',
+          type:this.filter.libType||'',
+        };
+        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(true);
+        //}
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$confirm(msg, '提示', {
+          confirmButtonText: '确定',
+          showCancelButton:false,
+          // cancelButtonText: '取消',
+          // cancelButtonClass:'cancel',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(row){
+        this.showConfirmDialog('是否禁用该静态知识?',()=>{
+          api.changeBaseStatus({id:row.id,status:0}).then((res)=>{
+            if(res.data.code=='0'){
+              if(!this.searched){
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              this.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      },
+      showReuseDialog(row){
+        this.showConfirmDialog('是否重新启用该条数据?',()=>{
+          api.changeBaseStatus({id:row.id,status:1}).then((res)=>{
+            if(res.data.code=='0'){
+              this.currentPage = 1;         //恢复数据跳转到筛选条件下首页
+              this.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      }
+    }
+  }
+</script>
+
+<style lang="less">
+    @import "../../less/admin.less";
+    .status-span{
+        font-size: 12px;
+        margin-right:10px;
+        color: unset;
+    }
+    .delete {
+      color: red;
+    }
+</style>

+ 449 - 0
src/components/knowledgeExtra/SubConditions.vue

@@ -0,0 +1,449 @@
+<template>
+    <div class="groups-cont">
+        <el-form ref="groupData" label-width="150px" class="sub-condition-form" :model="groupData" :rules="rules">
+            <span v-if="!disabled&&!isLast" class="del-btn"  @click="delRule">删除</span><!--:class="isLast?'disable del-btn':'del-btn'"-->
+            <el-form-item label="基础规则名称:" prop="subDescription">
+                <el-input v-model.trim = "groupData.subDescription" :disabled="disabled"></el-input>
+            </el-form-item>
+            <el-form-item label="基础规则类型:" prop="subType">
+                <el-select v-model="groupData.subType"
+                           :disabled="disabled"
+                           placeholder="请选择"
+                           size="small"
+                           @change="subTypeChange">
+                    <el-option
+                            v-for="item in baseTypes"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.type">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="基础规则术语类型:" prop="subLenCode">
+                <el-select v-model="groupData.subLenCode"
+                           :disabled="disabled"
+                           placeholder="请选择"
+                           size="small" @change="subCodeChange">
+                    <el-option
+                            v-for="item in baseTermTypeList"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.code">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item  class="addDepartFormItem" label="医学标准术语:" prop="subConceptId">
+                <el-select clearable remote filterable :disabled="disabled" :remote-method="searchConcept" v-model.trim="groupData.subConceptId">
+                    <el-option
+                            v-for="item in conceptList"
+                            :key="item.conceptId"
+                            :label="item.conceptName"
+                            :value="item.conceptId">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item v-if="groupData.subType===2&&showDataType" label="选择类型:" prop="dataType">
+                <el-select v-model="groupData.dataType"
+                           placeholder="请选择"
+                           size="small" @change="dataTypeChange">
+                    <el-option
+                            v-for="item in dataTypes"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.id">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item class="min-margin" v-if="groupData.dataType==='1'" label="最大值:">
+                <div class="select-item clearfix">
+                    <el-col :span="3">
+                        <el-form-item prop="subMaxOperator">
+                            <el-select v-model="groupData.subMaxOperator"
+                                       placeholder="请选择"
+                                       size="small" clearable>
+                                <el-option
+                                        v-for="item in operMaxList"
+                                        :key="item.key"
+                                        :label="item.name"
+                                        :value="item.key">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item prop="subMaxValue">
+                            <el-input type="text" v-model="groupData.subMaxValue" placeholder="填写数值"/>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item prop="subMaxUnit">
+                            <el-input  type="text" v-model.trim="groupData.subMaxUnit" placeholder="填写单位"/>
+                        </el-form-item>
+                    </el-col>
+                </div>
+            </el-form-item>
+            <el-form-item class="min-margin" v-if="groupData.dataType==='1'" label="最小值:">
+                <div class="select-item clearfix">
+                    <el-col :span="3">
+                        <el-form-item prop="subMinOperator">
+                            <el-select v-model="groupData.subMinOperator"
+                                       placeholder="请选择"
+                                       size="small" clearable>
+                                <el-option
+                                        v-for="item in operMinList"
+                                        :key="item.name"
+                                        :label="item.name"
+                                        :value="item.name">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item prop="subMinValue">
+                            <el-input type="text" v-model="groupData.subMinValue" placeholder="填写数值"/>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="3">
+                        <el-form-item prop="subMinUnit">
+                            <el-input  type="text" v-model.trim="groupData.subMinUnit" placeholder="填写单位"/>
+                        </el-form-item>
+                    </el-col>
+                </div>
+            </el-form-item>
+            <el-form-item v-if="groupData.subType!==6&&groupData.dataType==='2'" label="医学内容:" prop="subEqValue" class="discDesc is-required">
+                <el-input type="textarea" rows="3" placeholder="请输入医学内容" v-model.trim="groupData.subEqValue"></el-input>
+            </el-form-item>
+            <el-form-item v-if="groupData.subType===6" label="正则表达式:" prop="subEqValue" class="discDesc is-required">
+                <el-input type="textarea" rows="3" placeholder="请输入正则表达式" v-model.trim="groupData.subEqValue"></el-input>
+            </el-form-item>
+        </el-form>
+        <div class="inner-oper" v-if="showAdd">
+            <span>新增规则:</span>
+            <span class="add-btn" @click="addRule"><img src="../../images/add.png" alt="新增规则"></span>
+        </div>
+    </div>
+</template>
+<script>
+    import api from '@api/knowledgeLib.js';
+    export default {
+        name:'subCondititons',
+        props:['groupData','ind','isLast','baseTypes','firstPlace','disabled','showAdd'],
+        data(){
+            return {
+                //baseTermTypeList:[],
+                typeList:[],
+                numTypes:'',    //只有数值类型的类型id
+                operMaxList:[
+                    {name:'<=',key:'<='},
+                    {name:'<',key:'<'},
+                ],
+                operMinList:[{name:'>',key:'>'},
+                    {name:'>=',key:'>='},
+                ],
+                dataTypes:[{id:'1',name:'数值类型'},{id:'2',name:'文本类型'}],
+                conceptList:[],
+                rules:{
+                    subDescription:[{ required: true, message: '请输入基础规则名称',trigger: ['blur'] },{
+                        validator: (rule,value,callback)=>{
+                            if(value&&value.length>100){
+                                callback(new Error('规则名称不能超过100字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'change'
+                    }],
+                    subType:[{ required: true, message: '请选择基础规则类型',trigger: ['change'] }],
+                    subLenCode:[{ required: true, message: '请选择基础规则术语类型',trigger: ['change'] }],
+                    subConceptId:[{ required: true, message: '请输入医学标准术语',trigger: ['blur'] }],
+                    dataType:[{ required: true, message: '请选择类型',trigger: ['change'] }],
+                    subMaxOperator:[{
+                        validator: (rule,value,callback)=>{
+                            const {subMaxValue,subMinOperator,subMinValue}=this.groupData;
+                            const val=value+subMinOperator+subMinValue+subMaxValue;
+                            if(!val||(!value&&subMaxValue!=='')){
+                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                    subMinOperator:[{
+                        validator: (rule,value,callback)=>{
+                            const {subMaxValue,subMaxOperator,subMinValue}=this.groupData;
+                            const val=value+subMaxOperator+subMinValue+subMaxValue;
+                            if(!val||(!value&&subMinValue!=='')){
+                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                    subMaxValue:[{
+                        validator: (rule,value,callback)=>{
+                            const {subMaxOperator,subMinOperator,subMinValue}=this.groupData;
+                            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('只能输入数字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                    subMinValue:[{
+                        validator: (rule,value,callback)=>{
+                            const {subMaxValue,subMinOperator,subMaxOperator}=this.groupData;
+                            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('只能输入数字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                    subEqValue:[{
+                        validator: (rule,value,callback)=>{
+                            if(value===''){
+                                callback(new Error('请输入'+this.textName));
+                            }else if(value.length>200){
+                                callback(new Error(this.textName+'不能超过200字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                },
+            }
+        },
+        watch:{
+            'groupData':{
+                handler:function(val){
+                    this.$emit("changeVal",val,this.ind);
+                },
+                deep:true
+            },
+            /*'baseTypes':{
+                handler:function(val){
+                    if(!this.groupData.subType){
+                        this.baseTermTypeList =[];
+                        return;
+                    }
+                    const obj = val.find((it)=>it.type===this.groupData.subType);
+                    this.baseTermTypeList = obj.subMenuList;
+                },
+                deep:true
+            },*/
+            'firstPlace':{
+                handler:function(val) {
+                    if (this.ind!==0||!val) return;
+                    const dict = localStorage.getItem("zskDicts").match(new RegExp(val.checkedType+'-\\d+','g'))||[];
+                    const types = dict[0].split("-");
+                    this.groupData.subType = +types[2];
+                    this.groupData.subLenCode = types[1];
+                    this.conceptList = [val];
+                    this.groupData.subDescription = val.conceptName;
+                    this.groupData.subConceptId = val.conceptId;
+                    this.groupData.subConceptName = val.conceptName;
+                },
+                deep:true
+            }
+        },
+        created(){
+            this.numTypes = localStorage.getItem("zskNumDict");
+            this.conceptList=[{conceptName:this.groupData.subLibName||this.groupData.subConceptName,conceptId:this.groupData.subConceptId}];
+        },
+        computed:{
+            baseTermTypeList:function(){
+                if(!this.baseTypes.length){
+                    return [];
+                }
+                const sub = this.baseTypes.find((it) => it.type === this.groupData.subType)||{};
+                return sub.subMenuList;
+            },
+            showDataType:function(){
+               return (this.numTypes+',').indexOf(this.groupData.subLenCode+',')===-1;
+            },
+            textName:function(){
+                return this.groupData.subType!==6&&this.groupData.dataType==='2'?'医学内容':'正则表达式';
+            }
+        },
+        methods:{
+            dataTypeChange(val){
+                this.groupData.subEqOperator=(val==='2'?'=':'');
+                this.clearNumText();
+                delete this.groupData.dataType;     //触发更新
+                this.$set(this.groupData,'dataType',val);
+            },
+            subTypeChange(val){        //基础规则类型修改
+                this.groupData.subLenCode='';
+                this.groupData.dataType='';
+                this.clearConcept();
+                this.clearNumText();
+            },
+            subCodeChange(val){        //基础规则术语类型修改
+                this.groupData.subLenCode=val;
+                if((this.numTypes+',').indexOf(val+',')>-1){
+                    this.groupData.dataType='1';
+                }else{
+                    this.groupData.dataType='';
+                }
+                this.clearConcept();
+                this.clearNumText();
+            },
+            clearConcept(){
+              this.groupData.subConceptId='';
+              this.conceptList=[];
+            },
+            clearNumText(){
+                this.groupData.subMaxOperator='';
+                this.groupData.subMaxValue='';
+                this.groupData.subMaxUnit='';
+                this.groupData.subMinOperator='';
+                this.groupData.subMinValue='';
+                this.groupData.subMinUnit='';
+                this.groupData.subEqValue='';
+                this.groupData.subEqOperator='';
+            },
+            searchConcept(val){
+                const param = {
+                    excludedConceptIds:[this.groupData.subType],
+                    libType:this.groupData.subLenCode,
+                    name:val,
+                };
+                api.searchConcept(param).then((res) => {
+                    if (res.data.code == '0') {
+                        const data = res.data.data;
+                        this.conceptList = data;
+                    }
+                }).catch((error) => {
+                    console.log(error);
+                });
+            },
+            addRule(){
+                this.$emit("addRule");
+            },
+            delRule(){
+                if(this.isLast){
+                    this.warning("初始状态规则不能删除~");
+                    return;
+                }
+                //this.showConfirmDialog("是否删除该条规则,可能对现有系统会造成影响",()=>{
+                    this.$emit("delRule",this.ind);
+                //});
+
+            },
+            warning(msg,type){
+                this.$message({
+                    showClose: true,
+                    message:msg,
+                    type:type||'warning'
+                })
+            },
+            showConfirmDialog(msg,resolve){
+                this.$alert(msg, '提示', {
+                    confirmButtonText: '确定',
+                    type: 'warning'
+                }).then(() => {
+                    resolve();
+                }).catch(() => {});
+            },
+        }
+    }
+</script>
+<style lang="less">
+    .groups-cont{
+        background: #fff;
+        .conceptItem{
+            padding: 0 10px;
+            cursor: pointer;
+            height: 32px;
+            line-height: 32px;
+            &:hover{
+                background: #ebedf1;
+            }
+        }
+        .inner-oper{
+            padding: 15px 0 15px 21px;
+            .add-btn {
+                cursor: pointer;
+                img {
+                    vertical-align: middle;
+                }
+            }
+        }
+        .sub-condition-form{
+            padding: 20px;
+            position: relative;
+            border-bottom:2px solid #F5F5F5;
+            .del-btn{
+                color: #FF5B5B;
+                cursor: pointer;
+                position: absolute;
+                right: 20px;
+                top:20px;
+                z-index: 1;
+                &.disable{
+                    color: #B8B8B8;
+                }
+            }
+        }
+        .el-input__icon{
+            line-height: 32px;
+        }
+        .select-item{
+            &>div{
+                float: left;
+                margin-right: 10px;
+            }
+            .el-input{
+                width: auto;
+            }
+            input{
+                width: 95px;
+                line-height: 32px;
+                height: 32px;
+            }
+        }
+        .el-input,.el-input__inner{
+            width: 190px;
+            line-height: 32px;
+            height: 32px;
+        }
+        .el-button--danger.is-plain{
+            background: none;
+        }
+        .itemList {
+            position: absolute;
+            // display: none;
+            background: #fff;
+            width: 188px;
+            max-height: 160px;
+            border: 1px solid #DCDFE6;
+            left: 0;
+            top: 37px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .el-form-item{
+            margin-bottom: 22px;
+            &.min-margin{
+                margin-bottom: 0;
+            }
+        }
+        .el-form-item__error{
+            top: auto;
+            white-space: nowrap;
+            background: #fff;
+        }
+        .el-input-number{
+            width: 95px;
+        }
+        .el-input-number.is-controls-right .el-input-number__decrease, .el-input-number.is-controls-right .el-input-number__increase{
+            width: 25px;
+            height: 15px;
+            line-height: 16px;
+        }
+        .el-col-3 {
+            width: 94px;
+        }
+    }
+</style>

+ 117 - 0
src/components/knowledgeExtra/SubRulesGroup.vue

@@ -0,0 +1,117 @@
+<template>
+    <div class="sub-groups" v-if="data">
+        <SubConditions v-for="(rules,i) in data"
+                       ref="group"
+                       :groupData="rules"
+                       :isLast="data.length===1"
+                       :ind="i"
+                       :showAdd="data.length<maxNum"
+                       :baseTypes="baseTypes"
+                       :firstPlace="firstPlace"
+                       :disabled="i===0&&disable"
+                       @changeVal="handleInput"
+                       @addRule="addRule"
+                       @delRule="delRule"></SubConditions>
+        <div class="group-oper">
+            <el-button size="small" @click="addGroup">+新增分组</el-button>
+            <el-button :disabled="isLast" size="small" type="danger" plain @click="delGroup">-删除分组</el-button>
+        </div>
+    </div>
+</template>
+<script>
+    import SubConditions from './SubConditions.vue';
+    export default {
+        name:'SubRulesGroup',
+        props:['data','inx','isLast','baseTypes','maxNum','firstPlace'],
+        data(){
+            return {
+            }
+        },
+        computed:{
+          'disable':function(){
+              return Object.keys(this.firstPlace||{}).length>0;
+          }
+        },
+        methods:{
+            handleInput(val,i){
+                this.data[i]=val;
+            },
+            addRule(){
+                let temp={
+                    subDescription:'',
+                    subConceptId:'',
+                    subType:'',
+                    subLenName:'',
+                    subLenCode:'',
+                    subLibName:'',
+                    subMaxOperator:'',
+                    subMaxUnit:'',
+                    subMaxValue:'',
+                    subMinOperator:'',
+                    subMinUnit:'',
+                    subMinValue:'',
+                    subEqValue:'',
+                    dataType:'',
+                };
+                this.data.push(temp);
+            },
+            delRule(i){
+                if(i===0&&this.data.length===1){
+                    this.$emit("delGroup",this.inx);
+                    return;
+                }
+                this.data.splice(i,1);
+            },
+            addGroup(){
+                this.$emit("addGroup");
+            },
+            delGroup(){
+               this.$emit("delGroup",this.inx);
+            },
+            warning(msg,type){
+                this.$message({
+                    showClose: true,
+                    message:msg,
+                    type:type||'warning'
+                })
+            },
+            showConfirmDialog(msg,resolve){
+                this.$alert(msg, '提示', {
+                    confirmButtonText: '确定',
+                    type: 'warning'
+                }).then(() => {
+                    resolve();
+                }).catch(() => {
+                    this.warning("删除失败,请重试!")
+                });
+            },
+        },
+        components:{
+            SubConditions
+        }
+    }
+</script>
+<style lang="less" scoped>
+    .sub-groups{
+        background: #F5F5F5;
+        padding: 20px;
+    }
+    .group-oper{
+        text-align: center;
+        padding: 11px 0;
+        border-top: 4px solid #F5F5F5;
+        background: #fff;
+    }
+    .el-button--danger.is-plain:focus, .el-button--danger.is-plain:hover{
+        color: #fbc4c4;
+        border-color:#fbc4c4;
+    }
+    .el-button--danger.is-plain{
+        background: none;
+        &.is-disabled{
+            color: #f9a7a7;
+            background-color: #fef0f0;
+            border-color: #fde2e2;
+        }
+    }
+</style>

+ 8 - 1
src/components/qualityControl/QualityControlTemp.vue

@@ -3,7 +3,7 @@
     <crumbs title="模板维护">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="模板Id:">
-          <el-input size="mini" v-model.trim="filter.moduleId" placeholder="模板Id" clearable></el-input>
+          <el-input size="mini" type="number" onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))" v-model.trim="filter.moduleId" placeholder="模板Id" clearable></el-input>
         </el-form-item>
         <el-form-item label="模板名称:">
           <el-input size="mini" v-model.trim="filter.modeName" placeholder="模板名称" clearable></el-input>
@@ -402,6 +402,13 @@ export default {
 .delete:hover {
   color: red;
 }
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+  -webkit-appearance: none !important;
+}
+input[type='number'] {
+  -moz-appearance: textfield !important;
+}
 .el-select .el-input .el-icon-arrow-up {
   display: inline-block !important;
 }

+ 236 - 0
src/components/testManager/knowledgeMapRule/BillCommonTest.vue

@@ -0,0 +1,236 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '开单合理性提醒-通用规则测试-成功条数'
+          : '开单合理性提醒-通用规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="billItemType"
+          label="开单项类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="billItemName"
+          label="开单项(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="billItemHisName"
+          label="开单项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemType"
+          label="禁忌项类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemName"
+          label="禁忌项(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemHisName"
+          label="禁忌项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="inputValue"
+          label="禁忌项输入值/结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">
+            {{ scope.row.success === 1 ? '成功' : '失败' }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      let billType; // 开单合理性规则类型  1  通用  2 输血
+      if (data && data.caseName === '开单合理性提醒_通用规则') {
+        billType = 1;
+      } else if (data && data.caseName === '开单类型提醒_输血规则') {
+        billType = 2;
+      }
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        billType,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultBillPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        billType: 1, //1:通用,2:输血
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.billExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-开单合理性提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 236 - 0
src/components/testManager/knowledgeMapRule/BillFusionTest.vue

@@ -0,0 +1,236 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '开单合理性提醒-输血规则测试-成功条数'
+          : '开单合理性提醒-输血规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="billItemName"
+          label="输注类型(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="billItemHisName"
+          label="输注类型(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemType"
+          label="禁忌项类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemName"
+          label="禁忌项(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemHisName"
+          label="禁忌项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemHisDetailName"
+          label="禁忌项细项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="inputValue"
+          label="禁忌项输入值/结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">
+            {{ scope.row.success === 1 ? '成功' : '失败' }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      console.log(this.type, '111');
+      let billType; // 开单合理性规则类型  1  通用  2 输血
+      if (data && data.caseName === '开单合理性提醒_通用规则') {
+        billType = 1;
+      } else if (data && data.caseName === '开单类型提醒_输血规则') {
+        billType = 2;
+      }
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        billType,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultBillPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        billType: 2, //1:通用,2:输血
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.billExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-开单合理性输血提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 211 - 0
src/components/testManager/knowledgeMapRule/CriticalAuxTest.vue

@@ -0,0 +1,211 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '危急值提醒-辅助检查规则测试-成功条数'
+          : '危急值提醒-辅助检查规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="criticalItemName"
+          label="辅检名称(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="criticalItemHisName"
+          label="辅检名称(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="inputValue"
+          label="辅检结果描述"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">
+            {{ scope.row.success === 1 ? '成功' : '失败' }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      let criticalType; // 开单合理性规则类型  1  通用  2 输血
+      if (data && data.caseName === '危机值提醒_实验室检查规则') {
+        criticalType = 1;
+      } else if (data && data.caseName === '危机值提醒_辅助检查规则') {
+        criticalType = 2;
+      }
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        criticalType,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultCriticalPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        criticalType: 2, //1:检验,2:检查
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.criticalExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-辅助检查危急值提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 198 - 0
src/components/testManager/knowledgeMapRule/CriticalLabTest.vue

@@ -0,0 +1,198 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '危急值提醒-实验室检查规则测试-成功条数'
+          : '危急值提醒-实验室检查规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="criticalItemName"
+          label="实验室检查名称(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="criticalItemHisName"
+          label="实验室检查套餐名(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="criticalItemHisDetailName"
+          label="实验室检查名称(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+
+        <el-table-column :resizable="false" prop="maxValue" label="高危急值" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="minValue" label="低危急值" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="inputValue" label="输入值" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="output" label="实际结果" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">{{ scope.row.success === 1 ? '成功' : '失败' }}</template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: ''
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      let criticalType;
+      if (data && data.caseName === '危机值提醒_实验室检查规则') {
+        criticalType = 1;
+      } else if (data && data.caseName === '危机值提醒_辅助检查规则') {
+        criticalType = 2;
+      }
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        criticalType,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getResultCriticalPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        criticalType: 1 //1:检验,2:检查
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning'
+      })
+        .then(() => {
+          api.criticalExportExcel(params).then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-实验室检查危急值提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    }
+  }
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 214 - 0
src/components/testManager/knowledgeMapRule/HighRiskDrugTest.vue

@@ -0,0 +1,214 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '高风险提示-高危药品规则测试-成功条数'
+          : '高风险提示-高危药品规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="highriskItemName"
+          label="药品通用名称(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="highriskItemHisName"
+          label="药品通用名称(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="highriskItemRegName"
+          label="药品注册名称"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="highriskItemForm"
+          label="剂型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="highriskLevel"
+          label="药品高危级别"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultHighriskDrugPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.highriskDrugExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-高风险提示_高危药品规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 232 - 0
src/components/testManager/knowledgeMapRule/HighRiskOperationTest.vue

@@ -0,0 +1,232 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '高风险提示-高危手术整合规则测试-成功条数'
+          : '高风险提示-高危手术整合规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="highriskItemName"
+          label="手术名称(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="highriskItemHisName"
+          label="手术名称(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="level"
+          label="手术级别"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="factorItemType"
+          label="禁忌项类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="factorItemName"
+          label="禁忌项(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="factorItemHisName"
+          label="禁忌项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+          <el-table-column
+          :resizable="false"
+          prop="factorItemHisDetailName"
+          label="禁忌项-细项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="inputValue"
+          label="禁忌项输入值/结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultHighriskOperationPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.highriskOperationExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-高风险提示_高危手术整合规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 360 - 0
src/components/testManager/knowledgeMapRule/KnowledgeMapRuleTest.vue

@@ -0,0 +1,360 @@
+<template>
+  <div>
+    <crumbs title="知识图谱规则测试" class="topBack">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label class="selectMedicine" style="marginbottom: -1px">
+          <el-select size="mini" v-model="hospitalId" placeholder="选择医院" @change="handleChange">
+            <el-option
+              v-for="item in hospitalData"
+              :label="item.name"
+              :value="item.id"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item style="marginbottom: 0px">
+          <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">所有规则测试</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="caseName" label="规则类型" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
+
+        <el-table-column :resizable="false" prop="ruleNum" label="总条数" show-overflow-tooltip></el-table-column>
+        <el-table-column label="成功条数">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="goToFailedOrSuccessPage(scope.row, 'success')"
+              :disabled="runningStatusArr[scope.$index] === 1"
+            >{{ scope.row.ruleSuccessNum }}</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="失败条数">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="goToFailedOrSuccessPage(scope.row, 'failed')"
+              :disabled="runningStatusArr[scope.$index] === 1"
+            >{{ scope.row.ruleFailedNum }}</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="handleTest(scope.row, scope.$index)"
+              :disabled="!runningStatus"
+            >
+              {{
+              runningStatusArr[scope.$index] === 1
+              ? '执行测试中...'
+              : '执行测试'
+              }}
+            </el-button>
+            <span v-if="runningStatusArr[scope.$index] === 1">|</span>
+            <el-button
+              v-if="runningStatusArr[scope.$index] === 1"
+              type="text"
+              size="small"
+              @click="handleUpdateStatus(scope.row, scope.$index)"
+            >重置</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  name: 'KnowledgeMapRuleTest',
+  data() {
+    return {
+      list: [],
+      hospitalData: [],
+      hospitalId: '', //选中医院
+      runningStatusArr: [0, 0, 0, 0, 0, 0, 0, 0, 0] //知识图谱规则 测试状态
+    };
+  },
+  computed: {
+    runningStatus() {
+      return this.runningStatusArr.every(item => {
+        return item === 0;
+      });
+    }
+  },
+  created() {
+    this._getHospitalInfoCDSS();
+    // this._getRunningStatus()   // 进入页面立即确认状态
+    this.timer = setInterval(this._getRunningStatus, 20 * 1000);
+  },
+  beforeDestroy() {
+    clearInterval(this.timer);
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      Object.assign(vm, to.params);
+      if (Object.keys(to.params).length === 0) return;
+      vm.getDataList(to.params.hospitalId);
+      // vm.hospitalId = to.params.hospitalId;
+      vm._getRunningStatus();
+    });
+  },
+  methods: {
+    _getRunningStatus() {
+      const { hospitalId } = this;
+      if (this.hospitalId === '') return;
+      api.getRunningStatusByHospitalId({ hospitalId }).then(res => {
+        if (res.data.code === '0' && res.data.data) {
+          this.runningStatusArr = Object.values(res.data.data).slice(0, 9);
+        }
+      });
+    },
+    // 重置状态
+    handleUpdateStatus(row, index) {
+      const { caseId } = row;
+      // console.log(index,'index');
+      let statusTempArr = [...this.runningStatusArr];
+      statusTempArr[index] = 0;
+      api
+        .updateRunningStatus({
+          hospitalId: this.hospitalId,
+          caseId,
+          status: 0
+        })
+        .then(res => {
+          if (res.data.code === '0' && res.data.data) {
+            this.$message({
+              message: '重置成功',
+              type: 'success'
+            });
+            this.getDataList(this.hospitalId); // 重新获取列表
+          } else {
+            this.$message.error(res.data.msg || '重置失败');
+            this.getDataList(this.hospitalId); // 重新获取列表
+          }
+          this.runningStatusArr = statusTempArr;
+        });
+    },
+
+    indexMethod(index) {
+      return index + 1;
+    },
+    // 执行测试
+    handleTest(row, index) {
+      this.runningStatusArr = this.runningStatusArr.map((item, idx) => {
+        if (idx === index) {
+          return 1;
+        } else {
+          return 0;
+        }
+      });
+      const { caseName, caseId } = row;
+      let params = {
+        caseId,
+        hospitalId: this.hospitalId
+      };
+      let requestAjax;
+      let billType; // 开单合理性规则类型  1  通用  2 输血
+      let criticalType; //危急值测试规则类型(1:检验,2:检查)
+      let highriskType; //高危测试规则类型(1:药品,2:手术)
+      let otherType; // 其他提醒测试规则类型(1:化验,2:辅检,3:输血)
+      if (caseName === '开单合理性提醒_通用规则') {
+        billType = 1;
+        params = { ...params, billType };
+        requestAjax = 'billRuleTest';
+      } else if (caseName === '开单类型提醒_输血规则') {
+        billType = 2;
+        params = { ...params, billType };
+        requestAjax = 'billRuleTest';
+      } else if (caseName === '危机值提醒_实验室检查规则') {
+        criticalType = 1;
+        params = { ...params, criticalType };
+        requestAjax = 'criticalRuleTest';
+      } else if (caseName === '危机值提醒_辅助检查规则') {
+        criticalType = 2;
+        params = { ...params, criticalType };
+        requestAjax = 'criticalRuleTest';
+      } else if (caseName === '高风险提醒_高危药品规则') {
+        highriskType = 1;
+        params = { ...params, highriskType };
+        requestAjax = 'highRiskRuleTest';
+      } else if (caseName === '高风险提醒_高危手术规则') {
+        highriskType = 2;
+        params = { ...params, highriskType };
+        requestAjax = 'highRiskRuleTest';
+      } else if (caseName === '其他提醒_化验规则') {
+        otherType = 1;
+        params = { ...params, otherType };
+        requestAjax = 'otherRuleTest';
+      } else if (caseName === '其他提醒_输血规则') {
+        otherType = 3;
+        params = { ...params, otherType };
+        requestAjax = 'otherRuleTest';
+      } else if (caseName === '其他提醒_辅检规则') {
+        otherType = 2;
+        params = { ...params, otherType };
+        requestAjax = 'otherRuleTest';
+      }
+
+      api[requestAjax](params).then(res => {
+        if (res.data.code === '0' && res.data.data) {
+          this.getDataList(this.hospitalId);
+          this.$message({
+            message: '测试成功',
+            type: 'success'
+          });
+        } else {
+          this.$message.error('测试失败');
+          this.getDataList(this.hospitalId);
+        }
+        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0];
+      });
+    },
+    // 所有规则测试
+    handleAllTest() {
+      if (this.hospitalId === '') {
+        this.$message({
+          message: '请先选择医院',
+          type: 'warning'
+        });
+        return;
+      }
+      this.runningStatusArr = [1, 1, 1, 1, 1, 1, 1, 1, 1];
+      api.ruleAllTest({ hospitalId: this.hospitalId }).then(res => {
+        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0];
+        if (res.data.code === '0' && res.data.data) {
+          this.getDataList(this.hospitalId);
+          this.$message({
+            message: '所有规则测试成功',
+            type: 'success'
+          });
+        } else {
+          this.$message.error('所有规则测试失败');
+          this.getDataList(this.hospitalId);
+        }
+      });
+    },
+
+    // 跳转至失败/成功条数页面
+    goToFailedOrSuccessPage(row, type) {
+      const page = this.handleGoPage(row.caseName);
+      let hospital = this.hospitalData.find(
+        item => item.id === this.hospitalId
+      );
+      let hospitalName = hospital.name;
+      this.$router.push({
+        name: page,
+        params: {
+          data: { ...row },
+          type,
+          hospitalId: this.hospitalId,
+          hospitalName
+        }
+      });
+    },
+    // 处理跳转到的页面
+    handleGoPage(caseName) {
+      switch (caseName) {
+        case '开单合理性提醒_通用规则':
+          return 'BillCommonTest';
+        case '开单类型提醒_输血规则':
+          return 'BillFusionTest';
+        case '危机值提醒_实验室检查规则':
+          return 'CriticalLabTest';
+        case '危机值提醒_辅助检查规则':
+          return 'CriticalAuxTest';
+        case '高风险提醒_高危药品规则':
+          return 'HighRiskDrugTest';
+        case '高风险提醒_高危手术规则':
+          return 'HighRiskOperationTest';
+        case '其他提醒_化验规则':
+          return 'OtherAssayRuleTest';
+        case '其他提醒_输血规则':
+          return 'OtherFusionRuleTest';
+        case '其他提醒_辅检规则':
+          return 'OtherAuxRuleTest';
+        default:
+          return null;
+      }
+    },
+
+    // 获取医院信息
+    _getHospitalInfoCDSS() {
+      api.getHospitalInfo().then(res => {
+        if (res.data.code === '0') {
+          this.hospitalData = res.data && res.data.data;
+        }
+      });
+    },
+
+    // 选中医院
+    handleChange(val) {
+      if (val === '') return;
+      this.getDataList(val);
+      this._getRunningStatus(); // 选中后立即请求状态
+    },
+
+    // 获取列表数据
+    getDataList(id) {
+      const params = {
+        hospitalId: id
+      };
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getCaseResultList(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data && res.data.data;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      if (this.hospitalId === '') {
+        this.$message({
+          message: '请先选择医院',
+          type: 'warning'
+        });
+        return;
+      }
+      this.$alert('确定要导出规则未使用映射关系吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning'
+      })
+        .then(() => {
+          api.exportRuleExcel({ hospitalId: this.hospitalId }).then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '规则未使用映射关系.xls');
+            }
+          });
+        })
+        .catch(() => {});
+    }
+  }
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 226 - 0
src/components/testManager/knowledgeMapRule/OtherAssayRuleTest.vue

@@ -0,0 +1,226 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '其他提醒-化验规则测试-成功条数'
+          : '其他提醒-化验规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="otherItemName"
+          label="实验室检查名称(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="otherItemHisName"
+          label="实验室检查套餐名(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="otherItemHisDetailName"
+          label="实验室检查名称(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="inputValue"
+          label="实验室检查数值"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="remindItemType"
+          label="禁忌项类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="remindItemName"
+          label="禁忌项(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="remindItemHisName"
+          label="禁忌项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultOtherLisPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.otherLisExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-其他提醒_化验规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 227 - 0
src/components/testManager/knowledgeMapRule/OtherAuxRuleTest.vue

@@ -0,0 +1,227 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '其他提醒-辅检规则测试-成功条数'
+          : '其他提醒-辅检规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="pacsResult"
+          label="检查结果描述(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gender"
+          label="性别"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="inputAge"
+          label="年龄"
+          show-overflow-tooltip
+        ></el-table-column>
+
+        <el-table-column
+          :resizable="false"
+          prop="remindItemType"
+          label="禁忌项类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="remindItemName"
+          label="禁忌项(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="remindItemHisName"
+          label="禁忌项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <!-- <el-table-column
+          :resizable="false"
+          prop="inputAge"
+          label="禁忌项输入值/结果"
+          show-overflow-tooltip
+        ></el-table-column> -->
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultOtherPacsPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.otherPacsExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-其他提醒_辅检规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 226 - 0
src/components/testManager/knowledgeMapRule/OtherFusionRuleTest.vue

@@ -0,0 +1,226 @@
+<template>
+  <div>
+    <crumbs
+      :title="
+        type === 'success'
+          ? '其他提醒-输血规则测试-成功条数'
+          : '其他提醒-输血规则测试-失败条数'
+      "
+      class="topBack"
+      :param="$route.params"
+      linkTo="KnowledgeMapRuleTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="otherItemName"
+          label="实验室检查名称(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+         <el-table-column
+          :resizable="false"
+          prop="otherItemHisName"
+          label="实验室检查套餐名(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="otherItemHisDetailName"
+          label="实验室检查名称(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="otherItemInputValue"
+          label="实验室检查数值"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemType"
+          label="禁忌项类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemName"
+          label="禁忌项(标准术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="conflictItemHisName"
+          label="禁忌项(医院术语)"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="expectedOutput"
+          label="预期结果"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="测试结果">
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
+        </el-table-column>
+        <el-table-column
+          v-if="type !== 'success'"
+          :resizable="false"
+          prop="message"
+          label="失败原因"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      type: '',
+    };
+  },
+  created() {
+    const params = this.handleInitData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleInitData() {
+      const { data, type } = this.$route.params;
+      this.type = type;
+      return {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        resultId: data && data.resultId,
+        success: type === 'success' ? 1 : 0,
+      };
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    getDataList() {
+      const params = this.handleInitData();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getResultOtherTransfusionPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.otherTransfusionExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-其他提醒_输血规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 231 - 0
src/components/testManager/staticKnowledgeMap/LessStaticOrNoMap.vue

@@ -0,0 +1,231 @@
+<template>
+  <div>
+    <crumbs
+      :title="title"
+      class="topBack"
+      :param="$route.params"
+      linkTo="StaticKnowledgeMapTest"
+    >
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginbottom: 0px">
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="hisName"
+          :label="caseName === '检验' ? '医院术语(检验套餐)' : '医院术语'"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="hisDetailName"
+          label="医院术语(检验细项)"
+          show-overflow-tooltip
+          v-if="caseName === '检验'"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="name"
+          label="标准术语"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          v-if="type === 'lessStatic'"
+          :resizable="false"
+          prop="hasStaticKnowledge"
+          label="静态知识标识"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            {{ scope.row.hasStaticKnowledge === 0 ? '无' : '有' }}
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <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>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      list: [],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      caseName: '',
+      type: '', // 来自什么页面   noMap/lessStatic
+    };
+  },
+  created() {
+    this._initData();
+    this.getDataList();
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  computed: {
+    title() {
+      let text = '';
+      if (this.type === 'noMap') {
+        text = '未映射到标准术语的医院术语-';
+      } else if (this.type === 'lessStatic') {
+        text = '缺少静态知识的医院术语-';
+      }
+      return text + this.caseName;
+    },
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    _initData() {
+      const { data, type } = this.$route.params;
+      this.caseName = (data && data.caseName) || '';
+      this.type = type;
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    handleParams() {
+      const { data, type } = this.$route.params;
+      let params = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        resultId: data.resultId, //结果id
+      };
+      if (type === 'noMap') {
+        //是否映射到标准术语(0:否,1:是)
+        params = { ...params, hasStandName: 0 };
+      } else if (type === 'lessStatic') {
+        //是否有静态知识(0:无,1:有)
+        params = { ...params, hasStaticKnowledge: 0 };
+      }
+      return params;
+    },
+    getDataList() {
+      const params = this.handleParams();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getStaticPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // excel文件名处理
+    handleExcelName() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let exportText = ''; // excel文件名
+
+      return exportText;
+    },
+    // 导出
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let requestAjax;
+      let exportText; // excel文件名
+      let params = {
+        resultId: data.resultId,
+      };
+      if (data.caseName === '检验' && type === 'noMap') {
+        requestAjax = 'exportStaticLisExcel';
+        exportText = `${hospitalName}-未映射到标准术语的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStandName: 0 };
+      } else if (data.caseName !== '检验' && type === 'noMap') {
+        requestAjax = 'exportStaticCommonExcel';
+        exportText = `${hospitalName}-未映射到标准术语的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStandName: 0 };
+      } else if (data.caseName === '检验' && type === 'lessStatic') {
+        requestAjax = 'exportStaticLisStaticExcel';
+        exportText = `${hospitalName}-缺少静态知识的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStaticKnowledge: 0 };
+      } else if (data.caseName !== '检验' && type === 'lessStatic') {
+        requestAjax = 'exportStaticCommonStaticExcel';
+        exportText = `${hospitalName}-缺少静态知识的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStaticKnowledge: 0 };
+      }
+      this.$alert('确定要导出静态知识映射测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api[requestAjax](params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, exportText);
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+</style>

+ 316 - 0
src/components/testManager/staticKnowledgeMap/StaticKnowledgeMapTest.vue

@@ -0,0 +1,316 @@
+<template>
+  <div>
+    <crumbs title="静态知识映射测试" class="topBack">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item
+          label=""
+          class="selectMedicine"
+          style="marginbottom: -1px"
+        >
+          <el-select
+            size="mini"
+            v-model="hospitalId"
+            placeholder="选择医院"
+            @change="handleChange"
+          >
+            <el-option
+              v-for="item in hospitalData"
+              :label="item.name"
+              :value="item.id"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div style="margin: 60px 20px 0">
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="caseName"
+          label="术语类型"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+
+        <el-table-column
+          :resizable="false"
+          prop="totleNum"
+          label="医院术语总条数"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="未映射到标准术语条数">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="goToInnerPage(scope.row, 'noMap')"
+              :disabled="runningStatusArr[scope.$index] === 1"
+              >{{ scope.row.unMappingNum }}</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="缺少静态知识术语条数">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="goToInnerPage(scope.row, 'lessStatic')"
+              :disabled="runningStatusArr[scope.$index] === 1"
+              >{{ scope.row.withoutKnowledgeNum }}</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <input
+              type="file"
+              name="uploadfile "
+              id="upFile"
+              @change="uploadFile($event)"
+            />
+            <el-button
+              type="text"
+              size="small"
+              :disabled="!runningStatus"
+              @click="handleTest(scope.row, scope.$index)"
+              >{{
+                runningStatusArr[scope.$index] === 1
+                  ? '执行测试中...'
+                  : '执行测试'
+              }}</el-button
+            >
+            <span v-if="runningStatusArr[scope.$index] === 1"> | </span>
+            <el-button
+              v-if="runningStatusArr[scope.$index] === 1"
+              type="text"
+              size="small"
+              @click="handleUpdateStatus(scope.row, scope.$index)"
+            >
+              重置
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  name: 'KnowledgeMapRuleTest',
+  data() {
+    return {
+      list: [],
+      hospitalData: [],
+      hospitalId: '', //选中医院
+      type: '',
+      caseId: '',
+      runningStatusArr: [0, 0, 0, 0, 0],
+      statusIndex: '',
+    };
+  },
+  computed: {
+    runningStatus() {
+      return this.runningStatusArr.every((item) => {
+        return item === 0;
+      });
+    },
+  },
+  created() {
+    this._getHospitalInfoCDSS();
+    this.timer = setInterval(this._getRunningStatus, 20 * 1000);
+  },
+  beforeDestroy() {
+    clearInterval(this.timer);
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      Object.assign(vm, to.params);
+      if (Object.keys(to.params).length === 0) return;
+      vm.getDataList(to.params.hospitalId);
+      vm._getRunningStatus();
+    });
+  },
+  methods: {
+    _getRunningStatus() {
+      const { hospitalId } = this;
+      if (this.hospitalId === '') return;
+      api.getRunningStatusByHospitalId({ hospitalId }).then((res) => {
+        if (res.data.code === '0' && res.data.data) {
+          this.runningStatusArr = Object.values(res.data.data).slice(9, 14);
+        }
+      });
+    },
+    indexMethod(index) {
+      return index + 1;
+    },
+    // 获取医院信息
+    _getHospitalInfoCDSS() {
+      api.getHospitalInfo().then((res) => {
+        if (res.data.code === '0') {
+          this.hospitalData = res.data && res.data.data;
+        }
+      });
+    },
+    handleType(caseName) {
+      switch (caseName) {
+        case '诊断':
+          return 1;
+        case '检验':
+          return 2;
+        case '检查':
+          return 3;
+        case '药品':
+          return 4;
+        case '手术/操作':
+          return 5;
+        default:
+          return null;
+      }
+    },
+    // 重置状态
+    handleUpdateStatus(row, index) {
+      const { caseId } = row;
+      api
+        .updateRunningStatus({
+          hospitalId: this.hospitalId,
+          caseId,
+          status: 0,
+        })
+        .then((res) => {
+          if (res.data.code === '0' && res.data.data) {
+            this.$message({
+              message: '重置成功',
+              type: 'success',
+            });
+            this.getDataList(this.hospitalId); // 重新获取列表
+          } else {
+            this.$message.error(res.data.msg || '重置失败');
+            this.getDataList(this.hospitalId); // 重新获取列表
+          }
+          this.runningStatusArr = [0, 0, 0, 0, 0];
+        });
+    },
+
+    // 执行测试
+    handleTest(row, index) {
+      let inp = document.getElementById('upFile');
+      inp.click();
+      const { caseName, caseId } = row;
+      this.type = this.handleType(caseName); //术语类型(1:诊断、2:检验、3:检查、4:药品、5:手术/操作)
+      this.caseId = caseId; //测试用例id
+      this.statusIndex = index;
+    },
+
+    // 导入数据
+    uploadFile(e) {
+      if (this.statusIndex !== '') {
+        this.runningStatusArr = this.runningStatusArr.map((item, idx) => {
+          if (idx === this.statusIndex) {
+            return 1;
+          } else {
+            return 0;
+          }
+        });
+      }
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('hospitalId', this.hospitalId);
+      formData.append('type', this.type);
+      formData.append('caseId', this.caseId);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data',
+        },
+      };
+      api.staticKnowledgeTest(formData, header).then((res) => {
+        if (res.data.code === '00000001') {
+          this.$message.error(res.data.msg || '数据存在异常');
+          this.getDataList(this.hospitalId); // 重新获取列表
+        } else if (res.data.code === '0' && res.data.data) {
+          this.$message({
+            message: '测试成功',
+            type: 'success',
+          });
+          this.getDataList(this.hospitalId); // 重新获取列表
+        } else {
+          this.$message.error(res.data.msg || '数据存在异常');
+          this.getDataList(this.hospitalId);
+        }
+        this.runningStatusArr = [0, 0, 0, 0, 0];
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+
+    // 跳转至未映射到标准术语条数页面 / 缺少静态知识术语条数
+    goToInnerPage(row, type) {
+      let hospital = this.hospitalData.find(
+        (item) => item.id === this.hospitalId
+      );
+      let hospitalName = hospital.name;
+      this.$router.push({
+        name: 'LessStaticOrNoMap',
+        params: {
+          data: { ...row },
+          hospitalId: this.hospitalId,
+          hospitalName,
+          type,
+        },
+      });
+    },
+
+    // 选中医院
+    handleChange(val) {
+      if (val === '') return;
+      this.getDataList(val);
+      this._getRunningStatus(); // 选中后立即请求状态
+    },
+
+    // 获取列表数据
+    getDataList(id) {
+      const params = {
+        hospitalId: id,
+      };
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getStaticCaseResultList(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data && res.data.data;
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scored>
+@import '../../../less/admin.less';
+#upFile {
+  display: none !important;
+}
+</style>

BIN
src/images/add.png


BIN
src/images/copy.png


BIN
src/images/search.png


+ 1 - 1
src/less/admin.less

@@ -192,7 +192,7 @@ body {
       }
     }
     ul {
-      max-width: 300px;
+      // max-width: 300px;   //影响其他页面控件
     }
 
     /deep/ .el-scrollbar {

+ 8 - 0
src/less/common.less

@@ -201,3 +201,11 @@
 }
 
 
+.btmFix {
+  position: fixed;
+  width: 100%;
+  height:10px;
+  left: 280px;
+  bottom: 0;
+  background-color: #dee2ea;
+}

+ 563 - 337
src/routes.js

@@ -4,18 +4,18 @@ import ForgetPassword from '@components/forgetPassword/FindPassword.vue';
 import HomePage from '@components/common/HomePage.vue';
 import TrialUser from '@components/user/TrialUser.vue';
 import Information from '@components/user/Information.vue';
-import MoreService from '@components/user/MoreService.vue';//GDFW
-import OpenedProduct from '@components/user/OpenedProduct.vue';//YGMCP
-import AddServiceProduct from '@components/user/AddServiceProduct.vue';//添加服务端产品
-import ManageService from '@components/user/ManageService.vue';//管理服务端
-import CreatedToken from '@components/user/CreatedToken.vue';//查看生成令牌
-import AlreadyToken from '@components/user/AlreadyToken.vue';//已生成令牌
+import MoreService from '@components/user/MoreService.vue'; //GDFW
+import OpenedProduct from '@components/user/OpenedProduct.vue'; //YGMCP
+import AddServiceProduct from '@components/user/AddServiceProduct.vue'; //添加服务端产品
+import ManageService from '@components/user/ManageService.vue'; //管理服务端
+import CreatedToken from '@components/user/CreatedToken.vue'; //查看生成令牌
+import AlreadyToken from '@components/user/AlreadyToken.vue'; //已生成令牌
 // import UserSetting from '@components/user/UserSetting.vue';//安全设置
-import UserSetting from '@components/user/SafetySetting.vue';//安全设置
+import UserSetting from '@components/user/SafetySetting.vue'; //安全设置
 /*******************朗通后台**********************/
-import ProductLines from '@components/admin/ProductLines.vue'
-import ProductLinesManage from '@components/admin/ProductLinesManage.vue'
-import SuperAdmin from '@components/admin/SuperAdmin.vue'
+import ProductLines from '@components/admin/ProductLines.vue';
+import ProductLinesManage from '@components/admin/ProductLinesManage.vue';
+import SuperAdmin from '@components/admin/SuperAdmin.vue';
 import AdminConsole from '@components/admin/Console.vue';
 import AddAdmin from '@components/admin/AddAdmin.vue';
 import PersonCenter from '@components/admin/PersonCenter.vue';
@@ -23,68 +23,66 @@ import ChangePwd from '@components/admin/ChangePwd.vue';
 import RegisterAdmin from '@components/admin/RegisterAdmin.vue';
 import Renew from '@components/admin/Renew.vue';
 import AuthedAdmin from '@components/admin/AuthedAdmin.vue';
-import AddProductLine from '@components/admin/AddProductLine.vue'
-import OrganizationInfo from '@components/admin/OrganizationInfo.vue';//机构信息
-import AddOrganization from '@components/admin/AddOrganization.vue';//添加机构信息
-import ModifinedOrga from '@components/admin/ModifinedOrga.vue';//修改机构信息
+import AddProductLine from '@components/admin/AddProductLine.vue';
+import OrganizationInfo from '@components/admin/OrganizationInfo.vue'; //机构信息
+import AddOrganization from '@components/admin/AddOrganization.vue'; //添加机构信息
+import ModifinedOrga from '@components/admin/ModifinedOrga.vue'; //修改机构信息
 import ProductDetail from '@components/admin/ProductDetail.vue';
 import Console from '@components/user/Console.vue';
-import LabelGroup from '@components/icss/LabelGroup.vue'  //标签组
+import LabelGroup from '@components/icss/LabelGroup.vue'; //标签组
 import NoiseTemplate from '@components/icss/NoiseTemplate.vue';
-import DeptInfo from '@components/icss/DeptInfo.vue';//科室信息
-import DeptInfoDetail from '@components/icss/DeptInfoDetail.vue';//科室信息-详情
-import AddDeptInfo from '@components/icss/AddDeptInfo.vue';//科室信息-添加
-import IndeptLabel from '@components/icss/IndeptLabel.vue';//独立标签
-import AddIndeptLabel from '@components/icss/AddIndeptLabel.vue'//独立标签-添加
-import PromptInfo from '@components/icss/PromptInfo.vue'//提示信息
-import AddPromptInfo from '@components/icss/AddPromptInfo.vue'//添加提示信息
-import SimilarName from '@components/icss/SimilarName.vue'//别名维护
-import AddSimilarName from '@components/icss/AddSimilarName.vue'//别名维护-详情
-import CommonSymptom from '@components/icss/CommonSymptom.vue' //常见科室症状
-import AddCommonSymptom from '@components/icss/AddCommonSymptom' //常见科室症状--添加
-import PromptDetail from '@components/icss/PromptDetail.vue'//提示信息详情
-import MedicinePrompt from '@components/icss/MedicinePrompt.vue'   //医学术语静态知识
-import AddMedicinePrompt from '@components/icss/AddMedicinePrompt.vue'   //医学术语静态知识
-
-import DisclaimerInformation from '@components/icss/DisclaimerInformation.vue'//免责声明
-import DiscInfoDetail from '@components/icss/DiscInfoDetail.vue'//免责声明-详情
-import AddDisclInfo from '@components/icss/AddDisclInfo.vue'//免责声明-添加
-import PhysicalExamTemplate from '@components/icss/PhysicalExamTemplate.vue'  //查体模板维护
-import AddPhysicalExamTemp from '@components/icss/AddPhysicalExamTemp.vue'  //查体模板维护--添加
-
-import TemplateMaintenance from '@components/icss/TemplateMaintenance.vue'//模板维护列表
-import TemplateMaintenanceWrap from '@components/icss/TemplateMaintenanceWrap.vue'//模板维护添加修改
-import VersionInfo from '@components/icss/VersionInfo.vue'//版本信息
-import VersionDetail from '@components/icss/VersionDetail.vue'//版本信息-详情
-import AddVersion from '@components/icss/AddVersion.vue'//版本信息-添加/修改
-import MedicalName from '@components/icss/MedicalName.vue'//医学术语维护-命名维护
-import AddMedicalName from '@components/icss/AddMedicalName.vue'//医学术语维护-命名维护/添加修改
-import MedicalRelation from '@components/icss/MedicalRelation.vue'//医学术语维护-关系维护
-import AddMedicalRelation from '@components/icss/AddMedicalRelation.vue'//医学术语维护-关系维护-添加
-import MedicalInfo from '@components/icss/MedicalInfo.vue'//医学术语维护-信息维护(属性维护)
-import AddMedicalInfo from '@components/icss/AddMedicalInfo.vue'//医学术语维护-信息维护(属性维护)-添加
-import DiagnosisList from '@components/icss/DiagnosisList.vue'//诊断标签维护 -- 列表显示
-import DiagnosisTemplate from '@components/icss/DiagnosisTemplate.vue';//诊断标签维护 -- 添加
+import DeptInfo from '@components/icss/DeptInfo.vue'; //科室信息
+import DeptInfoDetail from '@components/icss/DeptInfoDetail.vue'; //科室信息-详情
+import AddDeptInfo from '@components/icss/AddDeptInfo.vue'; //科室信息-添加
+import IndeptLabel from '@components/icss/IndeptLabel.vue'; //独立标签
+import AddIndeptLabel from '@components/icss/AddIndeptLabel.vue'; //独立标签-添加
+import PromptInfo from '@components/icss/PromptInfo.vue'; //提示信息
+import AddPromptInfo from '@components/icss/AddPromptInfo.vue'; //添加提示信息
+import SimilarName from '@components/icss/SimilarName.vue'; //别名维护
+import AddSimilarName from '@components/icss/AddSimilarName.vue'; //别名维护-详情
+import CommonSymptom from '@components/icss/CommonSymptom.vue'; //常见科室症状
+import AddCommonSymptom from '@components/icss/AddCommonSymptom'; //常见科室症状--添加
+import PromptDetail from '@components/icss/PromptDetail.vue'; //提示信息详情
+import MedicinePrompt from '@components/icss/MedicinePrompt.vue'; //医学术语静态知识
+import AddMedicinePrompt from '@components/icss/AddMedicinePrompt.vue'; //医学术语静态知识
+
+import DisclaimerInformation from '@components/icss/DisclaimerInformation.vue'; //免责声明
+import DiscInfoDetail from '@components/icss/DiscInfoDetail.vue'; //免责声明-详情
+import AddDisclInfo from '@components/icss/AddDisclInfo.vue'; //免责声明-添加
+import PhysicalExamTemplate from '@components/icss/PhysicalExamTemplate.vue'; //查体模板维护
+import AddPhysicalExamTemp from '@components/icss/AddPhysicalExamTemp.vue'; //查体模板维护--添加
+
+import TemplateMaintenance from '@components/icss/TemplateMaintenance.vue'; //模板维护列表
+import TemplateMaintenanceWrap from '@components/icss/TemplateMaintenanceWrap.vue'; //模板维护添加修改
+import VersionInfo from '@components/icss/VersionInfo.vue'; //版本信息
+import VersionDetail from '@components/icss/VersionDetail.vue'; //版本信息-详情
+import AddVersion from '@components/icss/AddVersion.vue'; //版本信息-添加/修改
+import MedicalName from '@components/icss/MedicalName.vue'; //医学术语维护-命名维护
+import AddMedicalName from '@components/icss/AddMedicalName.vue'; //医学术语维护-命名维护/添加修改
+import MedicalRelation from '@components/icss/MedicalRelation.vue'; //医学术语维护-关系维护
+import AddMedicalRelation from '@components/icss/AddMedicalRelation.vue'; //医学术语维护-关系维护-添加
+import MedicalInfo from '@components/icss/MedicalInfo.vue'; //医学术语维护-信息维护(属性维护)
+import AddMedicalInfo from '@components/icss/AddMedicalInfo.vue'; //医学术语维护-信息维护(属性维护)-添加
+import DiagnosisList from '@components/icss/DiagnosisList.vue'; //诊断标签维护 -- 列表显示
+import DiagnosisTemplate from '@components/icss/DiagnosisTemplate.vue'; //诊断标签维护 -- 添加
 import ChronicDiseaseStructureList from '@components/icss/ChronicDiseaseStructureList.vue'; //量表结构维护 -- 列表
 import ChronicDiseaseAdd from '@components/icss/ChronicDiseaseAdd.vue'; //量表结构维护 -- 添加
 import ChronicDiseaseManage from '@components/icss/ChronicDiseaseManage.vue'; //慢病管理评估维护 -- 列表
 import ChronicDiseaseManageAdd from '@components/icss/ChronicDiseaseManageAdd.vue'; //慢病管理评估维护 -- 添加
 import ChemicalAndCommonMapping from '@components/icss/ChemicalAndCommonMapping.vue'; //化验大小项与公表维护
-import AddChemicalAndCommonMapping from '@components/icss/AddChemicalAndCommonMapping.vue'  //化验大小项与公表维护--添加关联
-import ChronicAndIndexRelation from '@components/icss/ChronicAndIndexRelation.vue'  //医学数据--慢病指标值关联维护
-import AddChronicAndIndexRelation from '@components/icss/AddChronicAndIndexRelation.vue'  //医学数据--添加慢病指标值关联
-import DisAndScaleRelation from '@components/icss/DisAndScaleRelation.vue'  //医学数据--量表关联维护
-import AddDisAndScaleRelation from '@components/icss/AddDisAndScaleRelation.vue'  //医学数据--添加量表关联
-import AssaySon from '@components/icss/AssaySon.vue'  //医学数据--化验子项维护
-import AddAssaySon from '@components/icss/AddAssaySon.vue'  //医学数据--化验子项维护-添加修改
-import ConceptRelation from '@components/icss/ConceptRelation.vue'  //医学数据--术语关联维护
-import AddConceptRelation from '@components/icss/AddConceptRelation.vue'  //医学数据--术语关联维护添加修改
-
-
-
-import MedicalMultRelation from '@components/icss/MedicalMultRelation.vue'  //医学术语--医学术语多层关联维护
-import AddMedicalMultRelation from '@components/icss/AddMedicalMultRelation.vue' //医学术语--添加医学术语多层关联维护
-import MedicalType from '@components/icss/MedicalType.vue'//医学术语维护-类型维护
+import AddChemicalAndCommonMapping from '@components/icss/AddChemicalAndCommonMapping.vue'; //化验大小项与公表维护--添加关联
+import ChronicAndIndexRelation from '@components/icss/ChronicAndIndexRelation.vue'; //医学数据--慢病指标值关联维护
+import AddChronicAndIndexRelation from '@components/icss/AddChronicAndIndexRelation.vue'; //医学数据--添加慢病指标值关联
+import DisAndScaleRelation from '@components/icss/DisAndScaleRelation.vue'; //医学数据--量表关联维护
+import AddDisAndScaleRelation from '@components/icss/AddDisAndScaleRelation.vue'; //医学数据--添加量表关联
+import AssaySon from '@components/icss/AssaySon.vue'; //医学数据--化验子项维护
+import AddAssaySon from '@components/icss/AddAssaySon.vue'; //医学数据--化验子项维护-添加修改
+import ConceptRelation from '@components/icss/ConceptRelation.vue'; //医学数据--术语关联维护
+import AddConceptRelation from '@components/icss/AddConceptRelation.vue'; //医学数据--术语关联维护添加修改
+
+import MedicalMultRelation from '@components/icss/MedicalMultRelation.vue'; //医学术语--医学术语多层关联维护
+import AddMedicalMultRelation from '@components/icss/AddMedicalMultRelation.vue'; //医学术语--添加医学术语多层关联维护
+import MedicalType from '@components/icss/MedicalType.vue'; //医学术语维护-类型维护
 //预问诊
 import SimpleQuestion from '@components/preTreat/SimpleQuestion.vue';
 import CombinQuestion from '@components/preTreat/CombinQuestion.vue';
@@ -93,8 +91,8 @@ import AddCombinQuestion from '@components/preTreat/AddCombinQuestion.vue';
 import QuestionModules from '@components/preTreat/QuestionModules.vue';
 import AddQuestionModules from '@components/preTreat/AddQuestionModules.vue';
 //诊断依据
-import DiagBase from '@components/diagBase/DiagBase.vue';  //诊断依据--诊断依据数据维护
-import AddDiagBase from '@components/diagBase/AddDiagBase.vue';  //诊断依据--诊断依据数据维护
+import DiagBase from '@components/diagBase/DiagBase.vue'; //诊断依据--诊断依据数据维护
+import AddDiagBase from '@components/diagBase/AddDiagBase.vue'; //诊断依据--诊断依据数据维护
 
 import QuestionWords from '@components/diagBase/QuestionWords.vue';
 
@@ -149,289 +147,517 @@ import AddRecordItem from '@components/recordInput/AddRecordItem.vue';
 import ManageItemBatch from '@components/recordInput/ManageItemBatch.vue';
 
 // cdss数据维护
-import MedicinePromptCDSS from '@components/cdssManage/MedicinePrompt.vue';   //医学术语静态知识
-import AddMedicinePromptCDSS from '@components/cdssManage/AddMedicinePrompt.vue';   //医学术语静态知识
-import MedicalTerm from '@components/cdssManage/MedicalTerm.vue';   //医学术语关联维护
+import MedicinePromptCDSS from '@components/cdssManage/MedicinePrompt.vue'; //医学术语静态知识
+import AddMedicinePromptCDSS from '@components/cdssManage/AddMedicinePrompt.vue'; //医学术语静态知识
+import MedicalTerm from '@components/cdssManage/MedicalTerm.vue'; //医学术语关联维护
 
 import Disease from '@components/cdssManage/disease/Disease.vue'; //诊断关联维护
-import AddDisease from '@components/cdssManage/disease/AddDisease.vue';  //诊断关联维护--添加关联
+import AddDisease from '@components/cdssManage/disease/AddDisease.vue'; //诊断关联维护--添加关联
 import Lis from '@components/cdssManage/lis/Lis.vue'; //检验关联维护
-import AddLis from '@components/cdssManage/lis/AddLis.vue';  //检验关联维护--添加关联
+import AddLis from '@components/cdssManage/lis/AddLis.vue'; //检验关联维护--添加关联
 import Pacs from '@components/cdssManage/pacs/Pacs.vue'; //检查关联维护
-import AddPacs from '@components/cdssManage/pacs/AddPacs.vue';  //检查关联维护--添加关联
+import AddPacs from '@components/cdssManage/pacs/AddPacs.vue'; //检查关联维护--添加关联
 import DrugManage from '@components/cdssManage/drug/DrugManage.vue'; //药品关联维护
-import AddDrug from '@components/cdssManage/drug/AddDrug.vue';  //药品关联维护--添加关联
+import AddDrug from '@components/cdssManage/drug/AddDrug.vue'; //药品关联维护--添加关联
+import ScaleManage from '@components/cdssManage/scale/ScaleManage.vue'; //量表关联维护
+import AddScale from '@components/cdssManage/scale/AddScale.vue'; //量表关联维护--添加关联
 import Operation from '@components/cdssManage/operation/Operation.vue'; //手术/操作关联维护
-import AddOperation from '@components/cdssManage/operation/AddOperation.vue';  //手术/操作关联维护--添加关联
+import AddOperation from '@components/cdssManage/operation/AddOperation.vue'; //手术/操作关联维护--添加关联
 import Fusion from '@components/cdssManage/fusion/Fusion.vue'; //输血关联维护
-import AddFusion from '@components/cdssManage/fusion/AddFusion.vue';  //输血关联维护--添加关联
+import AddFusion from '@components/cdssManage/fusion/AddFusion.vue'; //输血关联维护--添加关联
 import DeptManage from '@components/cdssManage/dept/DeptManage.vue'; //科室关联维护
-import AddDept from '@components/cdssManage/dept/AddDept.vue';  //科室关联维护--添加关联
-// import Correlation from '@components/icss/correlation/Correlation.vue';  //关联维护设置
-import Plan from '@components/cdssManage/plan/Plan.vue';  //关联维护设置
-import AddPlan from '@components/cdssManage/plan/AddPlan.vue';  //关联维护设置
+import AddDept from '@components/cdssManage/dept/AddDept.vue'; //科室关联维护--添加关联
+import Nursing from '@components/cdssManage/nursing/nursing.vue';  //护理关联维护
+import AddNursing from '@components/cdssManage/nursing/Addnursing.vue';  //护理关联维护--添加关联
 
-import KnowledgeManage from '@components/cdssManage/knowledge/KnowledgeManage.vue';  //知识图谱标准术语维护
-import AddKnowledge from '@components/cdssManage/knowledge/AddKnowledge.vue';  //知识图谱标准术语维护-新增编辑
 
-import HospitalCDSS from '@components/cdssManage/hospital/Hospital.vue';  //医院管理
-import AddHospitalCDSS from '@components/cdssManage/hospital/AddHospital.vue';  //医院管理--新增编辑
-import HospitalUserCDSS from '@components/cdssManage/hospitalUser/HospitalUser.vue';  //医院用户管理
-import AddHospitalUserCDSS from '@components/cdssManage/hospitalUser/AddHospitalUser.vue';  //医院用户管理--添加用户
-import VersionCDSS from '@components/cdssManage/version/Version.vue';  //CDSS版本信息维护
-import AddVersionCDSS from '@components/cdssManage/version/AddVersion.vue';  //CDSS版本信息维护--新增编辑
-import VersionDetailCDSS from '@components/cdssManage/version/VersionDetail.vue';  //CDSS版本信息维护--新增编辑
-import DisclaimerCDSS from '@components/cdssManage/disclaimer/Disclaimer.vue';  //免责声明维护
-import AddDisclaimerCDSS from '@components/cdssManage/disclaimer/AddDisclaimer.vue';  //免责声明维护--新增编辑
-import DisclaimerDetailCDSS from '@components/cdssManage/disclaimer/DisclaimerDetail.vue';  //免责声明维护--详情
+// import Correlation from '@components/icss/correlation/Correlation.vue';  //关联维护设置
+import Plan from '@components/cdssManage/plan/Plan.vue'; //关联维护设置
+import AddPlan from '@components/cdssManage/plan/AddPlan.vue'; //关联维护设置
+
+import KnowledgeManage from '@components/cdssManage/knowledge/KnowledgeManage.vue'; //知识图谱标准术语维护
+import AddKnowledge from '@components/cdssManage/knowledge/AddKnowledge.vue'; //知识图谱标准术语维护-新增编辑
+
+import HospitalCDSS from '@components/cdssManage/hospital/Hospital.vue'; //医院管理
+import AddHospitalCDSS from '@components/cdssManage/hospital/AddHospital.vue'; //医院管理--新增编辑
+import HospitalUserCDSS from '@components/cdssManage/hospitalUser/HospitalUser.vue'; //医院用户管理
+import AddHospitalUserCDSS from '@components/cdssManage/hospitalUser/AddHospitalUser.vue'; //医院用户管理--添加用户
+import VersionCDSS from '@components/cdssManage/version/Version.vue'; //CDSS版本信息维护
+import AddVersionCDSS from '@components/cdssManage/version/AddVersion.vue'; //CDSS版本信息维护--新增编辑
+import VersionDetailCDSS from '@components/cdssManage/version/VersionDetail.vue'; //CDSS版本信息维护--新增编辑
+import DisclaimerCDSS from '@components/cdssManage/disclaimer/Disclaimer.vue'; //免责声明维护
+import AddDisclaimerCDSS from '@components/cdssManage/disclaimer/AddDisclaimer.vue'; //免责声明维护--新增编辑
+import DisclaimerDetailCDSS from '@components/cdssManage/disclaimer/DisclaimerDetail.vue'; //免责声明维护--详情
+
+import KnowledgeMapRuleTest from '@components/testManager/knowledgeMapRule/KnowledgeMapRuleTest.vue';
+import StaticKnowledgeMapTest from '@components/testManager/staticKnowledgeMap/StaticKnowledgeMapTest.vue';
+import BillCommonTest from '@components/testManager/knowledgeMapRule/BillCommonTest.vue';
+import BillFusionTest from '@components/testManager/knowledgeMapRule/BillFusionTest.vue';
+import CriticalLabTest from '@components/testManager/knowledgeMapRule/CriticalLabTest.vue';
+import CriticalAuxTest from '@components/testManager/knowledgeMapRule/CriticalAuxTest.vue';
+import HighRiskDrugTest from '@components/testManager/knowledgeMapRule/HighRiskDrugTest.vue';
+import HighRiskOperationTest from '@components/testManager/knowledgeMapRule/HighRiskOperationTest.vue';
+import OtherAssayRuleTest from '@components/testManager/knowledgeMapRule/OtherAssayRuleTest.vue';
+import OtherAuxRuleTest from '@components/testManager/knowledgeMapRule/OtherAuxRuleTest.vue';
+import OtherFusionRuleTest from '@components/testManager/knowledgeMapRule/OtherFusionRuleTest.vue';
+import LessStaticOrNoMap from '@components/testManager/staticKnowledgeMap/LessStaticOrNoMap.vue';
+
+import BasicTermsMaintenance from '@components/basicKnow/BasicTermsMaintenance.vue'   //知识库基础维护-基础术语维护
+import BasicRelationship from '@components/basicKnow/BasicRelationship.vue'   //知识库基础维护-基础关系类型维护
+import BasicPartOfSpeech from '@components/basicKnow/BasicPartOfSpeech.vue'   //知识库基础维护-基础词性类型维护
+import AddTerm from '@components/basicKnow/AddTerm.vue'   //知识库基础维护-基础词性类型维护-编辑
+import StaticInfo from '@components/knowledgeExtra/StaticInfo.vue'   //知识库扩展维护-静态信息维护
+import AddDevKnow from '@components/knowledgeExtra/AddDevKnow.vue'   //知识库扩展维护-静态信息维护-编辑
+import ZskRuleManager from '@components/knowledgeExtra/RuleManager.vue';  //知识库规则维护
+import AddZskRule from '@components/knowledgeExtra/AddNewRule.vue';   //知识库添加规则
+import KnowledgeAll from '@components/knowledgeExtra/KnowledgeAll.vue'   //知识库树
+import KnowledgeBaseType from '@components/knowledgeExtra/KnowledgeBaseType.vue'   
+import AboutDisease from '@components/knowledgeExtra/AboutDisease.vue'   
+import DiseaseTree from '@components/knowledgeExtra/DiseaseTree.vue'   
+import AutoKnowledgeMapRuleTest from '@components/autoTest/AutoKnowledgeMapRuleTest.vue';
+import AutoBillCommonTest from '@components/autoTest/AutoBillCommonTest.vue';
+import ZskDiagBase from '@components/knowledgeExtra/DiagBase.vue';      //知识库拓展-诊断依据维护
+import AddZskDiagBase from '@components/knowledgeExtra/AddDiagBase.vue';
 
 export default [
-  {
-    path: '/',
-    name: 'login',
-    component: Login
-  },
-  {
-    path: '/register',
-    name: 'Register',
-    component: Register
-  },
-  {
-    path: '/forgetPassword',
-    name: 'FindPassword',
-    component: ForgetPassword
-  },
-  {//用户后台
-    path: '/user',
-    component: HomePage,
-    meta: {
-      requireAuth: true
+    {
+        path: '/',
+        name: 'login',
+        component: Login,
     },
-    children: [
-      // {path: '/', component: Console},
-      { path: 'YH-KZT', component: Console },     //控制台
-      { path: 'YH-GDFW', component: MoreService },      //更多服务
-      { path: 'YH-JGZX', component: Information },//机构中心
-      { path: 'YH-JGZX-YKTCP', component: OpenedProduct }, //已开通产品
-      { path: 'TJFWD', component: AddServiceProduct }, //添加服务端
-      { path: 'YH-JGZX-GLFFD', component: ManageService }, //管理服务端
-      { path: 'YH-JGZX-YSCLP', component: AlreadyToken },//已生成令牌
-      { path: 'CKLPXQ', component: CreatedToken },//查看生成令牌
-      { path: 'YH-JGZX-AQSZ', component: UserSetting },//安全设置
-      { path: 'YH-JGZX-ZHXX', component: Information },//账号信息
-
-    ]
-  },
-
-  {//朗通后台
-    path: '/admin',
-    component: HomePage,
-    meta: {
-      requireAuth: true
+    {
+        path: '/register',
+        name: 'Register',
+        component: Register,
     },
-    children: [
-      // {path: '/', component: AdminConsole},
-      { path: 'LT-KZT', component: AdminConsole },
-      { path: 'LT-JGZX', component: AdminConsole },
-      {
-        path: 'LT-KHZX-ZCYH',
-        component: RegisterAdmin
-      },
-      {
-        path: 'LT-YRZCGXX',
-        component: AuthedAdmin
-      },
-      {
-        name: 'organizationInfo',
-        path: 'LT-KHZX-JGXX',//机构信息
-        component: OrganizationInfo,
+    {
+        path: '/forgetPassword',
+        name: 'FindPassword',
+        component: ForgetPassword,
+    },
+    {
+        //用户后台
+        path: '/user',
+        component: HomePage,
         meta: {
-          keepAlive: true
-        }
-      },
-      {
-        path: 'LT-KHZX-TJJG',//添加机构
-        component: AddOrganization
-      },
-      {
-        path: 'LT-KHZX-XGJG',//修改机构
-        component: ModifinedOrga
-      },
-      {
-        name: 'superAdmin',
-        path: 'LT-KHZX-CGXX',
-        component: SuperAdmin
-      },
-      {
-        path: 'LT-DDXT-TJCG',
-        component: AddAdmin,
-        name: 'addAdmin'
-      },
-      {
-        path: 'LT-DDXT-CPXSQLB',
-        component: ProductLines
-      },
-      {
-        path: 'LT-CPXGL-CPXXQ',
-        component: ProductDetail,
-        name: 'productDetail'
-      },
-      {
-        path: 'LT-CPXFLB',
-        component: Renew
-      },
-      { path: 'LT-GRZX', component: PersonCenter },
-      { path: 'LT-CPXGL', component: ProductLinesManage },
-      { path: 'LT-CPXGL-TJCPX', component: AddProductLine, name: 'editProductLine' },
-      { path: 'LT-GRZX/CHANGE', component: ChangePwd }, //个人中心--修改密码
-      { path: 'LT-YXSJWH-BQZWH', component: LabelGroup, name: 'labelGroup' }, //医学数据维护--标签组维护
-      { path: 'LT-YXSJWH-TJBQZ', component: NoiseTemplate, name: 'AddLabelGroup' },     //医学数据维护--标签组维护--添加标签组
-      { path: 'LT-YXSJWH-KSWH', component: DeptInfo, name: 'deptInfo' },     //医学数据维护--科室维护
-      { path: 'LT-YXSJWH-KSXQ', component: DeptInfoDetail, name: 'DeptInfoDetail' },     //科室维护--详情
-      { path: 'LT-YXSJWH-TJKS', component: AddDeptInfo, name: 'AddDeptInfo' },     //科室维护--添加
-      { path: 'LT-YXSJWH-DLLXBQWH', component: IndeptLabel, name: 'IndeptLabel' },     //独立标签维护--详情
-      { path: 'LT-YXSJWH-TJDLBQ', component: AddIndeptLabel, name: 'AddIndeptLabel' },     //独立标签维护--添加
-      { path: 'LT-YXSJWH-TSXXWH', component: PromptInfo, name: 'PromptInfo' },         //提示信息维护
-      { path: 'LT-YXSJWH-BMWH', component: SimilarName, name: 'SimilarName' },     //别名维护
-      { path: 'LT-YXSJWH-CJXXWH', component: CommonSymptom, name: 'CommonSymptom' },  //常见症状维护
-      { path: 'LT-YXSJWH-TJCJZZ', component: AddCommonSymptom, name: 'AddCommonSymptom' },  //常见症状维护--添加
-      { path: 'LT-YXSJWH-TJBM', component: AddSimilarName, name: 'AddSimilarName' },     //别名维护-添加/修改
-      // {path:'LT-YXSJWH-MZSMWH',component:DisclaimerInformation,name:'DisclaimerInformation'},     //免责声明
-      { path: 'LT-YXSJKWH-MZSMWH', component: DisclaimerInformation, name: 'DisclaimerInformation' },     //免责声明
-      { path: 'LT-YXSJWH-MZSMXQ', component: DiscInfoDetail, name: 'DiscInfoDetail' },     //免责声明-详情
-      { path: 'LT-YXSJWH-TJMZSM', component: AddDisclInfo, name: 'AddDisclInfo' },     //免责声明-添加/修改
-      { path: 'LT-YXSJWH-MBWH', component: TemplateMaintenance, name: 'TemplateMaintenance' },     //模板维护
-      { path: 'LT-YXSJWH-CTMBWH', component: PhysicalExamTemplate, name: 'PhysicalExamTemplate' },     //查体模板维护
-      { path: 'LT-YXSJWH-TJCTMB', component: AddPhysicalExamTemp, name: 'AddPhysicalExamTemp' },     //查体模板维护--添加
-      { path: 'LT-YXSJWH-TJMBWH', component: TemplateMaintenanceWrap, name: 'TemplateMaintenanceWrap' },     //模板维护-添加修改
-      { path: 'LT-YXSJWH-TJTSXX', component: AddPromptInfo, name: 'AddPromptInfo' },         //提示信息维护-添加
-      { path: 'LT-YXSJWH-TSXXXQ', component: PromptDetail, name: 'PromptDetail' },         //提示信息维护详情
-      { path: 'LT-YXSYKWH-YXSYJTZSWH', component: MedicinePrompt, name: 'MedicinePrompt' },         //医学术语提示信息维护
-      { path: 'LT-YXSYKWH-TJYXSYJTZS', component: AddMedicinePrompt, name: 'AddMedicinePrompt' },         //医学术语提示信息维护添加
-      { path: 'LT-GBBXXWH-BBXXWH', component: VersionInfo, name: 'VersionInfo' },     //版本信息
-      { path: 'LT-YXSJWH-BBXXXQ', component: VersionDetail, name: 'VersionDetail' },     //版本信息-详情
-      { path: 'LT-YXSJWH-TJBBXX', component: AddVersion, name: 'AddVersion' },     //版本信息-添加/修改
-      { path: 'LT-YXSYKWH-YXSYMMWH', component: MedicalName, name: 'MedicalName' },     //医学术语--命名维护
-      { path: 'LT-YXSYKWH-TJYXSY', component: AddMedicalName, name: 'AddMedicalName' },     //医学术语--命名维护
-      { path: 'LT-YXSYKWH-YXSYGXWH', component: MedicalRelation, name: 'MedicalRelation' },     //医学术语--关系维护
-      { path: 'LT-YXSYKWH-TJYXSYGX', component: AddMedicalRelation, name: 'AddMedicalRelation' },     //医学术语--关系维护-添加
-      { path: 'LT-YXSYKWH-SYYXSXWH', component: MedicalInfo, name: 'MedicalInfo' },  //医学术语维护-信息维护(属性维护)
-      { path: 'LT-YXSYKWH-TJYXSYXX', component: AddMedicalInfo, name: 'AddMedicalInfo' },  //医学术语维护-信息维护(属性维护) -- 添加
-      { path: 'LT-YXSJWH-ZDBQWH', component: DiagnosisList, name: 'DiagnosisList' },  //诊断标签维护 -- 列表显示
-      { path: 'LT-YXSJWH-ZDBQTJ', component: DiagnosisTemplate, name: 'DiagnosisTemplate' },  //诊断标签维护 -- 添加
-      { path: 'LT-YXSYKWH-LBJGWH', component: ChronicDiseaseStructureList, name: 'ChronicDiseaseStructureList' },  //量表结构维护 -- 列表
-      { path: 'LT-YXSJWH-LBJGTJ', component: ChronicDiseaseAdd, name: 'ChronicDiseaseAdd' },  //量表结构维护 -- 添加
-      { path: 'LT-YXSJWH-MBGLYPG', component: ChronicDiseaseManage, name: 'ChronicDiseaseManage' },  //慢病管理评估维护 -- 列表
-      { path: 'LT-YXSJWH-MBGLYTJ', component: ChronicDiseaseManageAdd, name: 'ChronicDiseaseManageAdd' },  //慢病管理评估维护 -- 添加
-      { path: 'LT-YXSJWH-HYDXXYGBXDY', component: ChemicalAndCommonMapping, name: 'ChemicalAndCommonMapping' },  //化验大小项与公表维护
-      { path: 'LT-YXSJWH-TJHYDXXYGBXDY', component: AddChemicalAndCommonMapping, name: 'AddChemicalAndCommonMapping' },  //化验大小项与公表维护--添加关联
-      { path: 'LT-YXSYKWH-YXSYLXWH', component: MedicalType, name: 'MedicalType' },     //医学术语--类型维护
-      { path: 'LT-YXSYKWH-MBZBZGLWH', component: ChronicAndIndexRelation, name: 'ChronicAndIndexRelation' },     //医学数据--慢病指标值关联维护
-      { path: 'LT-YXSYKWH-TJMBZBZGL', component: AddChronicAndIndexRelation, name: 'AddChronicAndIndexRelation' },     //医学数据--添加慢病指标值关联维护
-      { path: 'LT-YXSJWH-LBGLWH', component: DisAndScaleRelation, name: 'DisAndScaleRelation' },     //医学数据--量表关联维护
-      { path: 'LT-YXSJWH-TJLBGL', component: AddDisAndScaleRelation, name: 'AddDisAndScaleRelation' },     //医学数据--添加量表关联
-      { path: 'LT-YXSYKWH-HYZXWH', component: AssaySon, name: 'AssaySon' },     //医学数据--化验子项维护
-      { path: 'LT-YXSYKWH-TJHYZX', component: AddAssaySon, name: 'AddAssaySon' },     //医学数据--化验子项添加修改   
-      { path: 'LT-YXSYKWH-YXSYGLWH', component: ConceptRelation, name: 'ConceptRelation' },     //医学数据--医学术语关联维护   
-      // {path:'LT-YXSYKWH-YXSYLXWH',component:ConceptRelation,name:'ConceptRelation'},     //医学数据--医学术语关联维护   
-      { path: 'LT-YXSYKWH-TJYXSYGL', component: AddConceptRelation, name: 'AddConceptRelation' },     //医学数据--医学术语关联维护-添加修改   
-
-      { path: 'LT-YXSYKWH-YXSYDCGLWH', component: MedicalMultRelation, name: 'MedicalMultRelation' },   //医学术语--医学术语多层关联维护
-      { path: 'LT-YXSYKWH-TJYXSYDCGL', component: AddMedicalMultRelation, name: 'AddMedicalMultRelation' },   //医学术语--添加医学术语多层关联
-      { path: 'LT-YXSYKWH-FJCJGLWH', component: AssistCheckMultRelation, name: 'AssistCheckMultRelation' },   //医学术语--辅检层级关联维护
-      { path: 'LT-YXSYKWH-TJFJCJGL', component: AddAssistCheckMultRelation, name: 'AddAssistCheckMultRelation' },   //医学术语--添加辅检层级关联
-      { path: 'LT-YXSYKWH-FJZXWH', component: AssistCheckSon, name: 'AssistCheckSon' },   //医学术语--辅检子项维护
-      { path: 'LT-YXSYKWH-TJFJZX', component: AddAssistCheckSon, name: 'AddAssistCheckSon' },   //医学术语--辅检子项维护
-
-
-      { path: 'LT-YWZSJWH-DLTXDWH', component: SimpleQuestion, name: 'SimpleQuestion' },  //预问诊-独立填写单
-      { path: 'LT-YWZSJWH-ZHTXDWH', component: CombinQuestion, name: 'CombinQuestion' },  //预问诊-组合填写单
-      { path: 'LT-YWZSJWH-TJDLTXD', component: AddSimpleQuestion, name: 'AddSimpleQuestion' },  //预问诊-添加独立填写单
-      { path: 'LT-YWZSJWH-TJZHTXD', component: AddCombinQuestion, name: 'AddCombinQuestion' },  //预问诊-添加组合填写单
-      { path: 'LT-YWZSJWH-MBWH', component: QuestionModules, name: 'QuestionModules' },  //预问诊-模板维护
-      { path: 'LT-YWZSJWH-TJMBWH', component: AddQuestionModules, name: 'AddQuestionModules' },  //预问诊-添加模板
-
-      { path: 'LT-ZDYJWH-ZDYJSJWH', component: DiagBase, name: 'DiagBase' },  //诊断依据-诊断依据维护
-      { path: 'LT-ZDYJWH-TJZDYJSJ', component: AddDiagBase, name: 'AddDiagBase' },  //诊断依据-添加诊断依据
-      { path: 'LT-ZDYJWH-WTCSJWH', component: QuestionWords, name: 'QuestionWords' },  //问题列表
-      { path: 'LT-SJTJ-YXSJTJ', component: MedicalStatistics, name: 'MedicalStatistics' },  //问题列表
-      { path: 'LT-AQGL-LICENSEWH', component: TokenControl, name: 'TokenControl' },  //安全管理--令牌列表
-      { path: 'LT-AQGL-TJLICENSE', component: AddToken, name: 'AddToken' },  //安全管理--发放令牌
-      { path: 'LT-YXSYKWH-GZWH', component: RulesManager, name: 'RulesManager' },//规则管理
-      { path: 'LT-YXSYKWH-TJGZWH', component: AddRule, name: 'AddRule' },//规则添加
-      { path: 'LT-YXSYKWH-GZYYWH', component: RuleApply, name: 'RuleApply' },//规则管理
-      { path: 'LT-YXSYKWH-TJGZYYWH', component: AddRuleApply, name: 'AddRuleApply' },//规则添加
-      { path: 'LT-BLGL', name: 'RecordManager', component: RecordManager },//病历管理
-      { path: 'LT-BLGL-TJBLGL', name: 'AddRecord', component: AddRecord },//添加病历
-      { path: 'LT-BLGL-CKBLGL', name: 'ShowRecord', component: ShowRecord },//添加病历
-      { path: 'LT-ZKYMSJWH-ZDYSWH', name: 'BaseField', component: BaseField },  //字段映射
-      { path: 'LT-ZKYMSJWH-TJZDYSWH', name: 'FieldMatch', component: FieldMatch },  //添加字段映射
-      { path: 'LT-ZKYMSJWH-ZHDYWH', name: 'CombineFeild', component: CombineFeild },  //组合字段
-      { path: 'LT-ZKYMSJWH-TJZHDYWH', name: 'AddCombineFeild', component: AddCombineFeild },  //添加组合字段
-      { path: 'LT-ZKYMSJWH-MBWH', name: 'QualityControlTemp', component: QualityControlTemp },  //模板维护
-      { path: 'LT-ZKYMSJWH-TMGLZKLX', name: 'ItemDataType', component: ItemDataType },  //条目关联质控类型
-      { path: 'LT-ZKYMSJWH-TMGLZKLXGL', name: 'ItemDataTypeRelation', component: ItemDataTypeRelation },  //条目关联质控类型--关联
-
-      { path: 'LT-ZKYMSJWH-TJMBWH', name: 'AddQualityControlTemp', component: AddQualityControlTemp },  //添加模板维护
-      { path: 'LT-BLZK-BLRl', name: 'RecordInput', component: RecordInput },//病例录入
-      { path: 'LT-BLZK-TJBLRl', name: 'AddRecordInput', component: AddRecordInput },//病例录入
-      { path: 'LT-ZKYMSJWH-ZKTM', name: 'RecordItemList', component: RecordItemList },//病例条目
-      { path: 'LT-BLZK-TJBLTM', name: 'AddRecordItem', component: AddRecordItem },//病例条目
-      { path: 'LT-BLZK-PLGLBLTM', name: 'ManageItemBatch', component: ManageItemBatch },//病例条目
-      { path: 'LT-ZKYMSJWH-ZKLXWH', name: 'QCTypeMang', component: QCTypeMang },  //质控类型
-      { path: 'LT-ZKYMSJWH-TJZKLXWH', name: 'AddQcType', component: AddQcType },  //添加质控类型
-      { path: 'LT-ZKYMSJWH-ZDHCSTJ', name: 'AutoTestList', component: AutoTestList },//自动化测试统计
-      { path: 'LT-ZKYMSJWH-RWLB', name: 'AutoTestTask', component: AutoTestTask },//自动化测试统计-转为任务
-      { path: 'LT-ZKYMSJWH-ZDHCSXQ', name: 'TaskDetail', component: TaskDetail },//自动化测试统计-转为任务-详情
-      { path: 'LT-ZKYMSJWH-BZBL', name: 'StandardRecord', component: StandardRecord },  //标准病历
-      { path: 'LT-ZKYMSJWH-TJBZBL', name: 'AddStandardRecord', component: AddStandardRecord },  //添加标准病历
-
-
-
-      { path: 'LT-CDSSSJWH-JTSYZSWH', component: MedicinePromptCDSS, name: 'MedicinePromptCDSS' }, //医学术语关联维护
-      { path: 'LT-YXSYKWH-TJYXSYJTZSCDSS', component: AddMedicinePromptCDSS, name: 'AddMedicinePromptCDSS' }, //医学术语提示信息维护添加
-      { path: 'LT-CDSSSJWH-YXSYGLWH', component: MedicalTerm, name: 'MedicalTermCDSS' }, //医学术语关联维护
-      { path: 'YXSYK-ZDGLWH', component: Disease, name: 'Disease', }, //诊断关联维护
-      { path: 'LT-ZDGLWH-TJHYDXXYGBXDY', component: AddDisease, name: 'AddDisease', }, //诊断关联维护--添加关联
-      { path: 'YXSYK-JYGLWH', component: Lis, name: 'Lis' }, //检验关联维护
-      { path: 'LT-JYGLWH-TJHYDXXYGBXDY', component: AddLis, name: 'AddLis' }, //检验关联维护--添加关联
-      { path: 'YXSYK-JCGLWH', component: Pacs, name: 'Pacs' }, //检查关联维护
-      { path: 'LT-JCGLWH-TJHYDXXYGBXDY', component: AddPacs, name: 'AddPacs' }, //检查关联维护--添加关联
-      { path: 'YXSYK-YPGLWH', component: DrugManage, name: 'DrugManage' }, //药品关联维护
-      { path: 'LT-YPGLWH-TJHYDXXYGBXDY', component: AddDrug, name: 'AddDrug' }, //药品关联维护--添加关联
-      { path: 'YXSYK-SSCZGLWH', component: Operation, name: 'Operation' }, //手术/操作关联维护
-      { path: 'LT-SSCZGLWH-TJHYDXXYGBXDY', component: AddOperation, name: 'AddOperation' }, //手术/操作关联维护--添加关联
-      { path: 'YXSYK-SXGLWH', component: Fusion, name: 'Fusion' }, //输血关联维护
-      { path: 'LT-SXGLWH-TJHYDXXYGBXDY', component: AddFusion, name: 'AddFusion' }, //输血关联维护--添加关联
-      { path: 'YXSYK-KSGLWH', component: DeptManage, name: 'DeptManage' }, //科室关联维护
-      { path: 'LT-KSGLWH-TJHYDXXYGBXDY', component: AddDept, name: 'AddDept' }, //科室关联维护--添加关联
-      // { path: 'YXSYK-GLWH', component: Correlation, name: 'Correlation' }, //关联维护设置
-      { path: 'LT-CDSSSJWH-DZBLFAPZ', component: Plan, name: 'Plan' }, //电子病历方案配置
-      { path: 'LT-CDSSSJWH-DZBLFAPZEDIT', component: AddPlan, name: 'AddPlan' }, //电子病历方案配置--新增编辑
-      { path: 'LT-CDSSSJWH-ZSTPBZSYWH', component: KnowledgeManage, name: 'KnowledgeManage' }, //知识图谱标准术语维护
-      { path: 'LT-CDSSSJWH-ZSTPBZSYWHEDIT', component: AddKnowledge, name: 'AddKnowledge' }, //知识图谱标准术语维护--新增编辑
-
-      { path: 'LT-CDSSSJWH-YYGL', component: HospitalCDSS, name: 'HospitalCDSS' }, //医院管理
-      { path: 'LT-CDSSSJWH-YYGLEDIT', component: AddHospitalCDSS, name: 'AddHospitalCDSS' }, //医院管理--新增编辑
-      { path: 'LT-CDSSSJWH-YYYHGL', component: HospitalUserCDSS, name: 'HospitalUserCDSS' }, //医院用户管理
-      { path: 'LT-CDSSSJWH-YYYHGLEDIT', component: AddHospitalUserCDSS, name: 'AddHospitalUserCDSS' }, //医院用户管理--添加用户
-      { path: 'LT-CDSSSJWH-BBWH', component: VersionCDSS, name: 'VersionCDSS' }, //CDSS版本信息维护
-      { path: 'LT-CDSSSJWH-BBWHEDIT', component: AddVersionCDSS, name: 'AddVersionCDSS' }, //CDSS版本信息维护--新增编辑
-      { path: 'LT-CDSSSJWH-BBWHDETAIL', component: VersionDetailCDSS, name: 'VersionDetailCDSS' }, //CDSS版本信息维护--详情
-      { path: 'LT-CDSSSJWH-MZSMWH', component: DisclaimerCDSS, name: 'DisclaimerCDSS' }, //免责声明维护
-      { path: 'LT-CDSSSJWH-MZSMWHEDIT', component: AddDisclaimerCDSS, name: 'AddDisclaimerCDSS' }, //免责声明维护--新增编辑
-      { path: 'LT-CDSSSJWH-MZSMWHDETAIL', component: DisclaimerDetailCDSS, name: 'DisclaimerDetailCDSS' }, //免责声明维护--新增编辑
-  
-
-
-
-
-
-
-
-
-
-
-    ]
-  }
-]
+            requireAuth: true,
+        },
+        children: [
+            // {path: '/', component: Console},
+            { path: 'YH-KZT', component: Console }, //控制台
+            { path: 'YH-GDFW', component: MoreService }, //更多服务
+            { path: 'YH-JGZX', component: Information }, //机构中心
+            { path: 'YH-JGZX-YKTCP', component: OpenedProduct }, //已开通产品
+            { path: 'TJFWD', component: AddServiceProduct }, //添加服务端
+            { path: 'YH-JGZX-GLFFD', component: ManageService }, //管理服务端
+            { path: 'YH-JGZX-YSCLP', component: AlreadyToken }, //已生成令牌
+            { path: 'CKLPXQ', component: CreatedToken }, //查看生成令牌
+            { path: 'YH-JGZX-AQSZ', component: UserSetting }, //安全设置
+            { path: 'YH-JGZX-ZHXX', component: Information }, //账号信息
+        ],
+    },
+    {
+        //朗通后台
+        path: '/admin',
+        component: HomePage,
+        meta: {
+            requireAuth: true,
+        },
+        children: [
+            // {path: '/', component: AdminConsole},
+            { path: 'LT-KZT', component: AdminConsole },
+            { path: 'LT-JGZX', component: AdminConsole },
+            {
+                path: 'LT-KHZX-ZCYH',
+                component: RegisterAdmin,
+            },
+            {
+                path: 'LT-YRZCGXX',
+                component: AuthedAdmin,
+            },
+            {
+                name: 'organizationInfo',
+                path: 'LT-KHZX-JGXX', //机构信息
+                component: OrganizationInfo,
+                meta: {
+                    keepAlive: true,
+                },
+            },
+            {
+                path: 'LT-KHZX-TJJG', //添加机构
+                component: AddOrganization,
+            },
+            {
+                path: 'LT-KHZX-XGJG', //修改机构
+                component: ModifinedOrga,
+            },
+            {
+                name: 'superAdmin',
+                path: 'LT-KHZX-CGXX',
+                component: SuperAdmin,
+            },
+            {
+                path: 'LT-DDXT-TJCG',
+                component: AddAdmin,
+                name: 'addAdmin',
+            },
+            {
+                path: 'LT-DDXT-CPXSQLB',
+                component: ProductLines,
+            },
+            {
+                path: 'LT-CPXGL-CPXXQ',
+                component: ProductDetail,
+                name: 'productDetail',
+            },
+            {
+                path: 'LT-CPXFLB',
+                component: Renew,
+            },
+            { path: 'LT-GRZX', component: PersonCenter },
+            { path: 'LT-CPXGL', component: ProductLinesManage },
+            { path: 'LT-CPXGL-TJCPX', component: AddProductLine, name: 'editProductLine' },
+            { path: 'LT-GRZX/CHANGE', component: ChangePwd }, //个人中心--修改密码
+            { path: 'LT-YXSJWH-BQZWH', component: LabelGroup, name: 'labelGroup' }, //医学数据维护--标签组维护
+            { path: 'LT-YXSJWH-TJBQZ', component: NoiseTemplate, name: 'AddLabelGroup' }, //医学数据维护--标签组维护--添加标签组
+            { path: 'LT-YXSJWH-KSWH', component: DeptInfo, name: 'deptInfo' }, //医学数据维护--科室维护
+            { path: 'LT-YXSJWH-KSXQ', component: DeptInfoDetail, name: 'DeptInfoDetail' }, //科室维护--详情
+            { path: 'LT-YXSJWH-TJKS', component: AddDeptInfo, name: 'AddDeptInfo' }, //科室维护--添加
+            { path: 'LT-YXSJWH-DLLXBQWH', component: IndeptLabel, name: 'IndeptLabel' }, //独立标签维护--详情
+            { path: 'LT-YXSJWH-TJDLBQ', component: AddIndeptLabel, name: 'AddIndeptLabel' }, //独立标签维护--添加
+            { path: 'LT-YXSJWH-TSXXWH', component: PromptInfo, name: 'PromptInfo' }, //提示信息维护
+            { path: 'LT-YXSJWH-BMWH', component: SimilarName, name: 'SimilarName' }, //别名维护
+            { path: 'LT-YXSJWH-CJXXWH', component: CommonSymptom, name: 'CommonSymptom' }, //常见症状维护
+            { path: 'LT-YXSJWH-TJCJZZ', component: AddCommonSymptom, name: 'AddCommonSymptom' }, //常见症状维护--添加
+            { path: 'LT-YXSJWH-TJBM', component: AddSimilarName, name: 'AddSimilarName' }, //别名维护-添加/修改
+            // {path:'LT-YXSJWH-MZSMWH',component:DisclaimerInformation,name:'DisclaimerInformation'},     //免责声明
+            {
+                path: 'LT-YXSJKWH-MZSMWH',
+                component: DisclaimerInformation,
+                name: 'DisclaimerInformation',
+            }, //免责声明
+            { path: 'LT-YXSJWH-MZSMXQ', component: DiscInfoDetail, name: 'DiscInfoDetail' }, //免责声明-详情
+            { path: 'LT-YXSJWH-TJMZSM', component: AddDisclInfo, name: 'AddDisclInfo' }, //免责声明-添加/修改
+            { path: 'LT-YXSJWH-MBWH', component: TemplateMaintenance, name: 'TemplateMaintenance' }, //模板维护
+            { path: 'LT-YXSJWH-CTMBWH', component: PhysicalExamTemplate, name: 'PhysicalExamTemplate' }, //查体模板维护
+            { path: 'LT-YXSJWH-TJCTMB', component: AddPhysicalExamTemp, name: 'AddPhysicalExamTemp' }, //查体模板维护--添加
+            {
+                path: 'LT-YXSJWH-TJMBWH',
+                component: TemplateMaintenanceWrap,
+                name: 'TemplateMaintenanceWrap',
+            }, //模板维护-添加修改
+            { path: 'LT-YXSJWH-TJTSXX', component: AddPromptInfo, name: 'AddPromptInfo' }, //提示信息维护-添加
+            { path: 'LT-YXSJWH-TSXXXQ', component: PromptDetail, name: 'PromptDetail' }, //提示信息维护详情
+            { path: 'LT-YXSYKWH-YXSYJTZSWH', component: MedicinePrompt, name: 'MedicinePrompt' }, //医学术语提示信息维护
+            { path: 'LT-YXSYKWH-TJYXSYJTZS', component: AddMedicinePrompt, name: 'AddMedicinePrompt' }, //医学术语提示信息维护添加
+            { path: 'LT-GBBXXWH-BBXXWH', component: VersionInfo, name: 'VersionInfo' }, //版本信息
+            { path: 'LT-YXSJWH-BBXXXQ', component: VersionDetail, name: 'VersionDetail' }, //版本信息-详情
+            { path: 'LT-YXSJWH-TJBBXX', component: AddVersion, name: 'AddVersion' }, //版本信息-添加/修改
+            { path: 'LT-YXSYKWH-YXSYMMWH', component: MedicalName, name: 'MedicalName' }, //医学术语--命名维护
+            { path: 'LT-YXSYKWH-TJYXSY', component: AddMedicalName, name: 'AddMedicalName' }, //医学术语--命名维护
+            { path: 'LT-YXSYKWH-YXSYGXWH', component: MedicalRelation, name: 'MedicalRelation' }, //医学术语--关系维护
+            { path: 'LT-YXSYKWH-TJYXSYGX', component: AddMedicalRelation, name: 'AddMedicalRelation' }, //医学术语--关系维护-添加
+            { path: 'LT-YXSYKWH-SYYXSXWH', component: MedicalInfo, name: 'MedicalInfo' }, //医学术语维护-信息维护(属性维护)
+            { path: 'LT-YXSYKWH-TJYXSYXX', component: AddMedicalInfo, name: 'AddMedicalInfo' }, //医学术语维护-信息维护(属性维护) -- 添加
+            { path: 'LT-YXSJWH-ZDBQWH', component: DiagnosisList, name: 'DiagnosisList' }, //诊断标签维护 -- 列表显示
+            { path: 'LT-YXSJWH-ZDBQTJ', component: DiagnosisTemplate, name: 'DiagnosisTemplate' }, //诊断标签维护 -- 添加
+            {
+                path: 'LT-YXSYKWH-LBJGWH',
+                component: ChronicDiseaseStructureList,
+                name: 'ChronicDiseaseStructureList',
+            }, //量表结构维护 -- 列表
+            { path: 'LT-YXSJWH-LBJGTJ', component: ChronicDiseaseAdd, name: 'ChronicDiseaseAdd' }, //量表结构维护 -- 添加
+            { path: 'LT-YXSJWH-MBGLYPG', component: ChronicDiseaseManage, name: 'ChronicDiseaseManage' }, //慢病管理评估维护 -- 列表
+            {
+                path: 'LT-YXSJWH-MBGLYTJ',
+                component: ChronicDiseaseManageAdd,
+                name: 'ChronicDiseaseManageAdd',
+            }, //慢病管理评估维护 -- 添加
+            {
+                path: 'LT-YXSJWH-HYDXXYGBXDY',
+                component: ChemicalAndCommonMapping,
+                name: 'ChemicalAndCommonMapping',
+            }, //化验大小项与公表维护
+            {
+                path: 'LT-YXSJWH-TJHYDXXYGBXDY',
+                component: AddChemicalAndCommonMapping,
+                name: 'AddChemicalAndCommonMapping',
+            }, //化验大小项与公表维护--添加关联
+            { path: 'LT-YXSYKWH-YXSYLXWH', component: MedicalType, name: 'MedicalType' }, //医学术语--类型维护
+            {
+                path: 'LT-YXSYKWH-MBZBZGLWH',
+                component: ChronicAndIndexRelation,
+                name: 'ChronicAndIndexRelation',
+            }, //医学数据--慢病指标值关联维护
+            {
+                path: 'LT-YXSYKWH-TJMBZBZGL',
+                component: AddChronicAndIndexRelation,
+                name: 'AddChronicAndIndexRelation',
+            }, //医学数据--添加慢病指标值关联维护
+            { path: 'LT-YXSJWH-LBGLWH', component: DisAndScaleRelation, name: 'DisAndScaleRelation' }, //医学数据--量表关联维护
+            {
+                path: 'LT-YXSJWH-TJLBGL',
+                component: AddDisAndScaleRelation,
+                name: 'AddDisAndScaleRelation',
+            }, //医学数据--添加量表关联
+            { path: 'LT-YXSYKWH-HYZXWH', component: AssaySon, name: 'AssaySon' }, //医学数据--化验子项维护
+            { path: 'LT-YXSYKWH-TJHYZX', component: AddAssaySon, name: 'AddAssaySon' }, //医学数据--化验子项添加修改
+            { path: 'LT-YXSYKWH-YXSYGLWH', component: ConceptRelation, name: 'ConceptRelation' }, //医学数据--医学术语关联维护
+            // {path:'LT-YXSYKWH-YXSYLXWH',component:ConceptRelation,name:'ConceptRelation'},     //医学数据--医学术语关联维护
+            { path: 'LT-YXSYKWH-TJYXSYGL', component: AddConceptRelation, name: 'AddConceptRelation' }, //医学数据--医学术语关联维护-添加修改
+
+            {
+                path: 'LT-YXSYKWH-YXSYDCGLWH',
+                component: MedicalMultRelation,
+                name: 'MedicalMultRelation',
+            }, //医学术语--医学术语多层关联维护
+            {
+                path: 'LT-YXSYKWH-TJYXSYDCGL',
+                component: AddMedicalMultRelation,
+                name: 'AddMedicalMultRelation',
+            }, //医学术语--添加医学术语多层关联
+            {
+                path: 'LT-YXSYKWH-FJCJGLWH',
+                component: AssistCheckMultRelation,
+                name: 'AssistCheckMultRelation',
+            }, //医学术语--辅检层级关联维护
+            {
+                path: 'LT-YXSYKWH-TJFJCJGL',
+                component: AddAssistCheckMultRelation,
+                name: 'AddAssistCheckMultRelation',
+            }, //医学术语--添加辅检层级关联
+            { path: 'LT-YXSYKWH-FJZXWH', component: AssistCheckSon, name: 'AssistCheckSon' }, //医学术语--辅检子项维护
+            { path: 'LT-YXSYKWH-TJFJZX', component: AddAssistCheckSon, name: 'AddAssistCheckSon' }, //医学术语--辅检子项维护
+
+            { path: 'LT-YWZSJWH-DLTXDWH', component: SimpleQuestion, name: 'SimpleQuestion' }, //预问诊-独立填写单
+            { path: 'LT-YWZSJWH-ZHTXDWH', component: CombinQuestion, name: 'CombinQuestion' }, //预问诊-组合填写单
+            { path: 'LT-YWZSJWH-TJDLTXD', component: AddSimpleQuestion, name: 'AddSimpleQuestion' }, //预问诊-添加独立填写单
+            { path: 'LT-YWZSJWH-TJZHTXD', component: AddCombinQuestion, name: 'AddCombinQuestion' }, //预问诊-添加组合填写单
+            { path: 'LT-YWZSJWH-MBWH', component: QuestionModules, name: 'QuestionModules' }, //预问诊-模板维护
+            { path: 'LT-YWZSJWH-TJMBWH', component: AddQuestionModules, name: 'AddQuestionModules' }, //预问诊-添加模板
+
+            { path: 'LT-ZDYJWH-ZDYJSJWH', component: DiagBase, name: 'DiagBase' }, //诊断依据-诊断依据维护
+            { path: 'LT-ZDYJWH-TJZDYJSJ', component: AddDiagBase, name: 'AddDiagBase' }, //诊断依据-添加诊断依据
+            { path: 'LT-ZDYJWH-WTCSJWH', component: QuestionWords, name: 'QuestionWords' }, //问题列表
+            { path: 'LT-SJTJ-YXSJTJ', component: MedicalStatistics, name: 'MedicalStatistics' }, //问题列表
+            { path: 'LT-AQGL-LICENSEWH', component: TokenControl, name: 'TokenControl' }, //安全管理--令牌列表
+            { path: 'LT-AQGL-TJLICENSE', component: AddToken, name: 'AddToken' }, //安全管理--发放令牌
+            { path: 'LT-YXSYKWH-GZWH', component: RulesManager, name: 'RulesManager' }, //规则管理
+            { path: 'LT-YXSYKWH-TJGZWH', component: AddRule, name: 'AddRule' }, //规则添加
+            { path: 'LT-YXSYKWH-GZYYWH', component: RuleApply, name: 'RuleApply' }, //规则管理
+            { path: 'LT-YXSYKWH-TJGZYYWH', component: AddRuleApply, name: 'AddRuleApply' }, //规则添加
+            { path: 'LT-BLGL', name: 'RecordManager', component: RecordManager }, //病历管理
+            { path: 'LT-BLGL-TJBLGL', name: 'AddRecord', component: AddRecord }, //添加病历
+            { path: 'LT-BLGL-CKBLGL', name: 'ShowRecord', component: ShowRecord }, //添加病历
+            { path: 'LT-ZKYMSJWH-ZDYSWH', name: 'BaseField', component: BaseField }, //字段映射
+            { path: 'LT-ZKYMSJWH-TJZDYSWH', name: 'FieldMatch', component: FieldMatch }, //添加字段映射
+            { path: 'LT-ZKYMSJWH-ZHDYWH', name: 'CombineFeild', component: CombineFeild }, //组合字段
+            { path: 'LT-ZKYMSJWH-TJZHDYWH', name: 'AddCombineFeild', component: AddCombineFeild }, //添加组合字段
+            { path: 'LT-ZKYMSJWH-MBWH', name: 'QualityControlTemp', component: QualityControlTemp }, //模板维护
+            { path: 'LT-ZKYMSJWH-TMGLZKLX', name: 'ItemDataType', component: ItemDataType }, //条目关联质控类型
+            {
+                path: 'LT-ZKYMSJWH-TMGLZKLXGL',
+                name: 'ItemDataTypeRelation',
+                component: ItemDataTypeRelation,
+            }, //条目关联质控类型--关联
+
+            {
+                path: 'LT-ZKYMSJWH-TJMBWH',
+                name: 'AddQualityControlTemp',
+                component: AddQualityControlTemp,
+            }, //添加模板维护
+            { path: 'LT-BLZK-BLRl', name: 'RecordInput', component: RecordInput }, //病例录入
+            { path: 'LT-BLZK-TJBLRl', name: 'AddRecordInput', component: AddRecordInput }, //病例录入
+            { path: 'LT-ZKYMSJWH-ZKTM', name: 'RecordItemList', component: RecordItemList }, //病例条目
+            { path: 'LT-BLZK-TJBLTM', name: 'AddRecordItem', component: AddRecordItem }, //病例条目
+            { path: 'LT-BLZK-PLGLBLTM', name: 'ManageItemBatch', component: ManageItemBatch }, //病例条目
+            { path: 'LT-ZKYMSJWH-ZKLXWH', name: 'QCTypeMang', component: QCTypeMang }, //质控类型
+            { path: 'LT-ZKYMSJWH-TJZKLXWH', name: 'AddQcType', component: AddQcType }, //添加质控类型
+            { path: 'LT-ZKYMSJWH-ZDHCSTJ', name: 'AutoTestList', component: AutoTestList }, //自动化测试统计
+            { path: 'LT-ZKYMSJWH-RWLB', name: 'AutoTestTask', component: AutoTestTask }, //自动化测试统计-转为任务
+            { path: 'LT-ZKYMSJWH-ZDHCSXQ', name: 'TaskDetail', component: TaskDetail }, //自动化测试统计-转为任务-详情
+            { path: 'LT-ZKYMSJWH-BZBL', name: 'StandardRecord', component: StandardRecord }, //标准病历
+            { path: 'LT-ZKYMSJWH-TJBZBL', name: 'AddStandardRecord', component: AddStandardRecord }, //添加标准病历
+
+            { path: 'LT-CDSSSJWH-JTSYZSWH', component: MedicinePromptCDSS, name: 'MedicinePromptCDSS' }, //医学术语关联维护
+            {
+                path: 'LT-YXSYKWH-TJYXSYJTZSCDSS',
+                component: AddMedicinePromptCDSS,
+                name: 'AddMedicinePromptCDSS',
+            }, //医学术语提示信息维护添加
+            { path: 'LT-CDSSSJWH-YXSYGLWH', component: MedicalTerm, name: 'MedicalTermCDSS' }, //医学术语关联维护
+            { path: 'YXSYK-ZDGLWH', component: Disease, name: 'Disease' }, //诊断关联维护
+            { path: 'LT-ZDGLWH-TJHYDXXYGBXDY', component: AddDisease, name: 'AddDisease' }, //诊断关联维护--添加关联
+            { path: 'YXSYK-JYGLWH', component: Lis, name: 'Lis' }, //检验关联维护
+            { path: 'LT-JYGLWH-TJHYDXXYGBXDY', component: AddLis, name: 'AddLis' }, //检验关联维护--添加关联
+            { path: 'YXSYK-JCGLWH', component: Pacs, name: 'Pacs' }, //检查关联维护
+            { path: 'LT-JCGLWH-TJHYDXXYGBXDY', component: AddPacs, name: 'AddPacs' }, //检查关联维护--添加关联
+            { path: 'YXSYK-YPGLWH', component: DrugManage, name: 'DrugManage' }, //药品关联维护
+            { path: 'LT-YPGLWH-TJHYDXXYGBXDY', component: AddScale, name: 'AddDrug' }, //药品关联维护--添加关联
+            { path: 'YXSYK-YPGLWH', component: ScaleManage, name: 'ScaleManage' }, //药品关联维护
+            { path: 'LT-YPGLWH-TJHYDXXYGBXDY', component: AddScale, name: 'AddScale' }, //药品关联维护--添加关联
+            { path: 'YXSYK-SSCZGLWH', component: Operation, name: 'Operation' }, //手术/操作关联维护
+            { path: 'LT-SSCZGLWH-TJHYDXXYGBXDY', component: AddOperation, name: 'AddOperation' }, //手术/操作关联维护--添加关联
+            { path: 'YXSYK-SXGLWH', component: Fusion, name: 'Fusion' }, //输血关联维护
+            { path: 'LT-SXGLWH-TJHYDXXYGBXDY', component: AddFusion, name: 'AddFusion' }, //输血关联维护--添加关联
+            { path: 'YXSYK-KSGLWH', component: DeptManage, name: 'DeptManage' }, //科室关联维护
+            { path: 'LT-KSGLWH-TJHYDXXYGBXDY', component: AddDept, name: 'AddDept' }, //科室关联维护--添加关联
+            { path: 'YXSYK-HLGLWH', component: Nursing, name: 'Nursing' }, //护理关联维护
+            { path: 'LT-HLGLWH-TJHYDXXYGBXDY', component: AddNursing, name: 'AddNursing' }, //护理关联维护--添加关联
+            // { path: 'YXSYK-GLWH', component: Correlation, name: 'Correlation' }, //关联维护设置
+            { path: 'LT-CDSSSJWH-DZBLFAPZ', component: Plan, name: 'Plan' }, //电子病历方案配置
+            { path: 'LT-CDSSSJWH-DZBLFAPZEDIT', component: AddPlan, name: 'AddPlan' }, //电子病历方案配置--新增编辑
+            { path: 'LT-CDSSSJWH-ZSTPBZSYWH', component: KnowledgeManage, name: 'KnowledgeManage' }, //知识图谱标准术语维护
+            { path: 'LT-CDSSSJWH-ZSTPBZSYWHEDIT', component: AddKnowledge, name: 'AddKnowledge' }, //知识图谱标准术语维护--新增编辑
+
+            { path: 'LT-CDSSSJWH-YYGL', component: HospitalCDSS, name: 'HospitalCDSS' }, //医院管理
+            { path: 'LT-CDSSSJWH-YYGLEDIT', component: AddHospitalCDSS, name: 'AddHospitalCDSS' }, //医院管理--新增编辑
+            { path: 'LT-CDSSSJWH-YYYHGL', component: HospitalUserCDSS, name: 'HospitalUserCDSS' }, //医院用户管理
+            {
+                path: 'LT-CDSSSJWH-YYYHGLEDIT',
+                component: AddHospitalUserCDSS,
+                name: 'AddHospitalUserCDSS',
+            }, //医院用户管理--添加用户
+            { path: 'LT-CDSSSJWH-BBWH', component: VersionCDSS, name: 'VersionCDSS' }, //CDSS版本信息维护
+            { path: 'LT-CDSSSJWH-BBWHEDIT', component: AddVersionCDSS, name: 'AddVersionCDSS' }, //CDSS版本信息维护--新增编辑
+            { path: 'LT-CDSSSJWH-BBWHDETAIL', component: VersionDetailCDSS, name: 'VersionDetailCDSS' }, //CDSS版本信息维护--详情
+            { path: 'LT-CDSSSJWH-MZSMWH', component: DisclaimerCDSS, name: 'DisclaimerCDSS' }, //免责声明维护
+            { path: 'LT-CDSSSJWH-MZSMWHEDIT', component: AddDisclaimerCDSS, name: 'AddDisclaimerCDSS' }, //免责声明维护--新增编辑
+            {
+                path: 'LT-CDSSSJWH-MZSMWHDETAIL',
+                component: DisclaimerDetailCDSS,
+                name: 'DisclaimerDetailCDSS',
+            }, //免责声明维护--新增编辑
+            {
+                path: 'LT-YYSYZDHCS-JTZSYSCS',
+                component: StaticKnowledgeMapTest,
+                name: 'StaticKnowledgeMapTest',
+            }, //静态知识映射测试
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-SXGZCS',
+                component: BillFusionTest,
+                name: 'BillFusionTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-SYSJCGZCS',
+                component: CriticalLabTest,
+                name: 'CriticalLabTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-FZJCGZCS',
+                component: CriticalAuxTest,
+                name: 'CriticalAuxTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-GWYPGZCS',
+                component: HighRiskDrugTest,
+                name: 'HighRiskDrugTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-GWSSZHGZCS',
+                component: HighRiskOperationTest,
+                name: 'HighRiskOperationTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-QTHYGZCS',
+                component: OtherAssayRuleTest,
+                name: 'OtherAssayRuleTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-QTFJGZCS',
+                component: OtherAuxRuleTest,
+                name: 'OtherAuxRuleTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-ZSTPGZCS-QTFXGZCS',
+                component: OtherFusionRuleTest,
+                name: 'OtherFusionRuleTest',
+            },
+            {
+                path: 'LT-YYSYZDHCS-JTZSYSCS-WYSZD',
+                component: LessStaticOrNoMap,
+                name: 'LessStaticOrNoMap',
+            },
+            {
+                path: 'LT-ZSKJCWH-JCSYWH',
+                component: BasicTermsMaintenance,
+                name: 'BasicTermsMaintenance',
+            },
+            {
+                path: 'LT-ZSKJCWH-JCCXWH',
+                component: BasicPartOfSpeech,
+                name: 'BasicPartOfSpeech',
+            },
+            {
+                path: 'LT-ZSKJCWH-JCGXLXWH',
+                component: BasicRelationship,
+                name: 'BasicRelationship',
+            },
+            {
+                path: 'LT-ZSKJCWH-JCSYWH-EDIT',
+                component: AddTerm,
+                name: 'AddTerm',
+            },
+            {
+                path: 'LT-ZSKKZWH-GZWH',
+                component: ZskRuleManager,
+                name: 'ZskRuleManager',
+            },
+            {
+                path: 'LT-ZSKKZWH-TJGZ',
+                component: AddZskRule,
+                name: 'AddZskRule',
+            },
+            {
+                path: 'LT-ZSKKZWH-ZUYJ',
+                component: ZskDiagBase,
+                name: 'ZskDiagBase',
+            },
+            {
+                path: 'LT-ZSKKZWH-TJZDYJ',
+                component: AddZskDiagBase,
+                name: 'AddZskDiagBase',
+            },
+    {
+        path: 'LT-ZSKKZWH-JTXXWH',
+        component: StaticInfo,
+        name: 'StaticInfo',
+    },
+    {
+        path: 'LT-ZSKKZWH-JTXXWH-EDIT',
+        component: AddDevKnow,
+        name: 'AddDevKnow',
+    },
+    {
+        path: 'LT-ZSKKZWH-SXJGWH',
+        component: KnowledgeAll,
+        name: 'KnowledgeAll',
+    }, //树形结构维护
+    {
+        path: 'LT-ZSKJCWH-JCSYLXWH',
+        component: KnowledgeBaseType,
+        name: 'KnowledgeBaseType',
+    }, //基础术语类型维护
+    {
+        path: 'LT-ZSKKZWH-JBXGWH',
+        component: AboutDisease,
+        name: 'AboutDisease',
+    }, //疾病相关维护
+    {
+        path: 'LT-ZSKKZWH-JBXGWH-EDIT',
+        component: DiseaseTree,
+        name: 'DiseaseTree',
+    }, //疾病相关维护, 
+    {
+        path: 'LT-YYSYZDHCS-ZSTPGZCS',
+        component: AutoKnowledgeMapRuleTest,
+        name: 'AutoKnowledgeMapRuleTest',
+    }, 
+    {
+        path: 'LT-YYSYZDHCS-ZSTPGZCS-TYGZCS',
+        component: AutoBillCommonTest,
+        name: 'AutoBillCommonTest',
+    },
+],
+},
+];

+ 23 - 23
vue.config.js

@@ -1,32 +1,32 @@
 const path = require('path');
-const proxy_path = 'http://192.168.2.241:80';
-// const proxy_path = 'http://192.168.2.241:88';
+// const proxy_path = 'http://192.168.2.236:80';
+const proxy_path = 'http://192.168.2.241:88';
 // const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
 // const proxy_path = 'http://192.168.3.113:5050'; //王峰
 
 module.exports = {
-    lintOnSave: false,
-    devServer: {
-        historyApiFallback: true,
-        disableHostCheck: true,
-        proxy: {
-            '/api': {
-                target: proxy_path,
-                changeOrigin: true,
-                secure: false
-            }
-        }
+  lintOnSave: false,
+  devServer: {
+    historyApiFallback: true,
+    disableHostCheck: true,
+    proxy: {
+      '/api': {
+        target: proxy_path,
+        changeOrigin: true,
+        secure: false,
+      },
     },
-    configureWebpack:{
-        resolve:{
-            alias: {
-                '@components': path.resolve(__dirname,'./src/components/'),
-                '@less': path.resolve(__dirname,'./src/less/'),
-                '@base':path.resolve(__dirname,'./src/components/base/'),
-                '@api': path.resolve(__dirname,'./src/api/')
-            }
-        }
+  },
+  configureWebpack: {
+    resolve: {
+      alias: {
+        '@components': path.resolve(__dirname, './src/components/'),
+        '@less': path.resolve(__dirname, './src/less/'),
+        '@base': path.resolve(__dirname, './src/components/base/'),
+        '@api': path.resolve(__dirname, './src/api/'),
+      },
     },
-};
+  },
+};