Browse Source

Merge branch 'master' into referMaster

luolei 4 years ago
parent
commit
39fa59d325
67 changed files with 16103 additions and 1380 deletions
  1. 403 0
      src/api/cdss.js
  2. 401 198
      src/api/config.js
  3. 3 3
      src/api/index.js
  4. 15 0
      src/api/qualityControl.js
  5. 856 0
      src/components/cdssManage/AddMedicinePrompt.vue
  6. 341 0
      src/components/cdssManage/MedicalTerm.vue
  7. 266 0
      src/components/cdssManage/MedicineInfoPg.vue
  8. 423 0
      src/components/cdssManage/MedicinePrompt.vue
  9. 415 0
      src/components/cdssManage/dept/AddDept.vue
  10. 531 0
      src/components/cdssManage/dept/DeptManage.vue
  11. 276 0
      src/components/cdssManage/disclaimer/AddDisclaimer.vue
  12. 321 0
      src/components/cdssManage/disclaimer/Disclaimer.vue
  13. 62 0
      src/components/cdssManage/disclaimer/DisclaimerDetail.vue
  14. 432 0
      src/components/cdssManage/disease/AddDisease.vue
  15. 520 0
      src/components/cdssManage/disease/Disease.vue
  16. 445 0
      src/components/cdssManage/drug/AddDrug.vue
  17. 533 0
      src/components/cdssManage/drug/DrugManage.vue
  18. 405 0
      src/components/cdssManage/fusion/AddFusion.vue
  19. 529 0
      src/components/cdssManage/fusion/Fusion.vue
  20. 273 0
      src/components/cdssManage/hospital/AddHospital.vue
  21. 380 0
      src/components/cdssManage/hospital/Hospital.vue
  22. 254 0
      src/components/cdssManage/hospitalUser/AddHospitalUser.vue
  23. 340 0
      src/components/cdssManage/hospitalUser/HospitalUser.vue
  24. 469 0
      src/components/cdssManage/lis/AddLis.vue
  25. 536 0
      src/components/cdssManage/lis/Lis.vue
  26. 405 0
      src/components/cdssManage/operation/AddOperation.vue
  27. 537 0
      src/components/cdssManage/operation/Operation.vue
  28. 405 0
      src/components/cdssManage/pacs/AddPacs.vue
  29. 530 0
      src/components/cdssManage/pacs/Pacs.vue
  30. 693 0
      src/components/cdssManage/plan/AddPlan.vue
  31. 493 0
      src/components/cdssManage/plan/Plan.vue
  32. 241 0
      src/components/cdssManage/version/AddVersion.vue
  33. 257 0
      src/components/cdssManage/version/Version.vue
  34. 426 0
      src/components/cdssManage/version/VersionDesc.vue
  35. 58 0
      src/components/cdssManage/version/VersionDetail.vue
  36. 58 37
      src/components/common/Crumbs.vue
  37. 1 0
      src/components/common/HomePage.vue
  38. 65 41
      src/components/common/Menu.vue
  39. 293 26
      src/components/icss/AddMedicinePrompt.vue
  40. 2 2
      src/components/icss/MedicineInfoPg.vue
  41. 2 2
      src/components/icss/MedicinePrompt.vue
  42. 1 1
      src/components/preTreat/AddSimpleQuestion.vue
  43. 16 15
      src/components/preTreat/PubSelect.vue
  44. 6 4
      src/components/qualityControl/AddCombineFeild.vue
  45. 87 22
      src/components/qualityControl/AddQcType.vue
  46. 651 500
      src/components/qualityControl/AddQualityControlTemp.vue
  47. 4 4
      src/components/qualityControl/BaseFieldList.vue
  48. 4 4
      src/components/qualityControl/CombineFeildList.vue
  49. 6 4
      src/components/qualityControl/FieldMatch.vue
  50. 5 4
      src/components/qualityControl/ItemDataType.vue
  51. 10 8
      src/components/qualityControl/ItemDataTypeRelation.vue
  52. 455 0
      src/components/qualityControl/OtherQcTypePour.vue
  53. 100 11
      src/components/qualityControl/QCTypeMang.vue
  54. 384 315
      src/components/qualityControl/QualityControlTemp.vue
  55. 131 25
      src/components/recordInput/AddRecordItem.vue
  56. 50 6
      src/components/recordInput/ManageItemBatch.vue
  57. 65 13
      src/components/recordInput/RecordItemList.vue
  58. BIN
      src/images/icon_default_down.png
  59. BIN
      src/images/icon_default_top.png
  60. BIN
      src/images/icon_hover_down.png
  61. BIN
      src/images/icon_hover_top.png
  62. BIN
      src/images/multi.png
  63. BIN
      src/images/spread.png
  64. BIN
      src/images/up.png
  65. 23 0
      src/less/admin.less
  66. 208 133
      src/routes.js
  67. 2 2
      vue.config.js

+ 403 - 0
src/api/cdss.js

@@ -0,0 +1,403 @@
+import axios from 'axios';
+import config from '@api/config.js';
+const urls = config.urls;
+export default {
+  getTremList(param) {
+    return axios.post(urls.getConceptKnowledgeCDSS, param);
+  },
+  getAllConcept(param) {
+    //医学术语--获取所有概念(标准术语)
+    return axios.post(urls.getAllConceptCDSS, param);
+  },
+  saveTermPrompts(param) {
+    return axios.post(urls.saveConceptInfoCDSS, param);
+  },
+
+  delLisMappingById(param) {
+    //医学数据-化验大小项与公表项维护-单个删除
+    return axios.post(urls.delLisMappingByIdCDSS, param);
+  },
+  getConceptInfoAssay(param) {
+    return axios.post(urls.getConceptInfoAssayCDSS, param); //化验子项-搜索术语
+  },
+  getAllLisConcept(param) {
+    //医学数据-化验大小项与公表项维护-获取所有化验公表项
+    return axios.post(urls.getAllLisConceptCDSS, param);
+  },
+  saveLisMapping(param) {
+    //医学数据-化验大小项与公表项维护-新增
+    return axios.post(urls.saveLisMappingCDSS, param);
+  },
+  hasLisMapping(param) {
+    //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
+    return axios.post(urls.hasLisMappingCDSS, param);
+  },
+  delConceptInfo(param) {
+    return axios.post(urls.delConceptInfoCDSS, param);
+  },
+  getConceptKnowledgeList(param) {
+    return axios.post(urls.getConceptKnowledgeListCDSS, param);
+  },
+
+
+
+
+  retrievalSearch(param) {
+    // 术语搜索
+    return axios.post(urls.retrievalSearchCDSS, param);
+  },
+  getLisMappingPage(param) {
+    //诊断列表-列表
+    return axios.post(urls.getLisMappingPageCDSS, param);
+  },
+  diseaseIsExistRecord(param) {
+    return axios.post(urls.diseaseIsExistRecordCDSS, param);
+  },
+  saveOrUpdateDiseaseRecord(param) {
+    return axios.post(urls.saveOrUpdateDiseaseRecordCDSS, param);
+  },
+  deleteDiseaseRecord(param) {
+    return axios.post(urls.deleteDiseaseRecordCDSS, param);
+  },
+  exportDiseaseRecord(param) {
+    return axios.post(urls.exportDiseaseRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importDiseaseRecord(param) {
+    return axios.post(urls.importDiseaseRecordCDSS, param);
+  },
+
+
+
+  getLisPage(param) {
+    //检验列表-列表
+    return axios.post(urls.getLisPageCDSS, param);
+  },
+  lisIsExistRecord(param) {
+    return axios.post(urls.lisIsExistRecordCDSS, param);
+  },
+  saveOrUpdateLisRecord(param) {
+    return axios.post(urls.saveOrUpdateLisRecordCDSS, param);
+  },
+  deleteLisRecord(param) {
+    return axios.post(urls.deleteLisRecordCDSS, param);
+  },
+  exportLisRecord(param) {
+    return axios.post(urls.exportLisRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importLisRecord(param) {
+    return axios.post(urls.importLisRecordCDSS, param);
+  },
+  getpacsPage(param) {
+    //检查列表-列表
+    return axios.post(urls.getpacsPageCDSS, param);
+  },
+  pacsIsExistRecord(param) {
+    return axios.post(urls.pacsIsExistRecordCDSS, param);
+  },
+  saveOrUpdatePacsRecord(param) {
+    return axios.post(urls.saveOrUpdatePacsRecordCDSS, param);
+  },
+  deletePacsRecord(param) {
+    return axios.post(urls.deletePacsRecordCDSS, param);
+  },
+  exportPacsRecord(param) {
+    return axios.post(urls.exportPacsRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importPacsRecord(param) {
+    return axios.post(urls.importPacsRecordCDSS, param);
+  },
+  getDrugPage(param) {
+    //药品列表-列表
+    return axios.post(urls.getDrugPageCDSS, param);
+  },
+  drugIsExistRecord(param) {
+    return axios.post(urls.drugIsExistRecordCDSS, param);
+  },
+  saveOrUpdateDrugRecord(param) {
+    return axios.post(urls.saveOrUpdateDrugRecordCDSS, param);
+  },
+  deleteDrugRecord(param) {
+    return axios.post(urls.deleteDrugRecordCDSS, param);
+  },
+  exportDrugRecord(param) {
+    return axios.post(urls.exportDrugRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importDrugRecord(param) {
+    return axios.post(urls.importDrugRecordCDSS, param);
+  },
+  getOperationPage(param) {
+    //手术/操作列表-列表
+    return axios.post(urls.getOperationPageCDSS, param);
+  },
+  operationIsExistRecord(param) {
+    return axios.post(urls.operationIsExistRecordCDSS, param);
+  },
+  saveOrUpdateOperationRecord(param) {
+    return axios.post(urls.saveOrUpdateOperationRecordCDSS, param);
+  },
+  deleteOperationRecord(param) {
+    return axios.post(urls.deleteOperationRecordCDSS, param);
+  },
+  exportOperationRecord(param) {
+    return axios.post(urls.exportOperationRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importOperationRecord(param) {
+    return axios.post(urls.importOperationRecordCDSS, param);
+  },
+  getFusionPage(param) {
+    //输血列表-列表
+    return axios.post(urls.getFusionPageCDSS, param);
+  },
+  fusionIsExistRecord(param) {
+    return axios.post(urls.fusionIsExistRecordCDSS, param);
+  },
+  saveOrUpdateFusionRecord(param) {
+    return axios.post(urls.saveOrUpdateFusionRecordCDSS, param);
+  },
+  deleteFusionRecord(param) {
+    return axios.post(urls.deleteFusionRecordCDSS, param);
+  },
+  exportFusionRecord(param) {
+    return axios.post(urls.exportFusionRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importFusionRecord(param) {
+    return axios.post(urls.importFusionRecordCDSS, param);
+  },
+  getDeptPage(param) {
+    //科室列表-列表
+    return axios.post(urls.getDeptPageCDSS, param);
+  },
+  deptIsExistRecord(param) {
+    return axios.post(urls.deptIsExistRecordCDSS, param);
+  },
+  saveOrUpdateDeptRecord(param) {
+    return axios.post(urls.saveOrUpdateDeptRecordCDSS, param);
+  },
+  deleteDeptRecord(param) {
+    return axios.post(urls.deleteDeptRecordCDSS, param);
+  },
+  exportDeptRecord(param) {
+    return axios.post(urls.exportDeptRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importDeptRecord(param) {
+    return axios.post(urls.importDeptRecordCDSS, param);
+  },
+  exportDeptModule(param) {
+    return axios.post(urls.exportDeptModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+
+  exportDiseaseModule(param) {
+    return axios.post(urls.exportDiseaseModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  exportLisModule(param) {
+    return axios.post(urls.exportLisModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  exportPacsModule(param) {
+    return axios.post(urls.exportPacsModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  exportDrugModule(param) {
+    return axios.post(urls.exportDrugModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  exportOperationModule(param) {
+    return axios.post(urls.exportOperationModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  exportFusionModule(param) {
+    return axios.post(urls.exportFusionModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+
+
+
+  getHospitalInfo(param) {
+    return axios.post(urls.getHospitalInfoCDSS, param);
+  },
+  saveHospitalInfoRecord(param) {
+    return axios.post(urls.saveHospitalInfoRecordCDSS, param);
+  },
+
+
+  getPlanInfoPages(param) {
+    //分页获取方案配置信息
+    return axios.post(urls.getPlanInfoPagesCDSS, param);
+  },
+  getDefaultPlans(param) {
+    return axios.post(urls.getDefaultPlansCDSS, param);
+  },
+  savePlanInfoDatas(param) {
+    return axios.post(urls.savePlanInfoDatasCDSS, param);
+  },
+  cancelPlanDatas(param) {
+    return axios.post(urls.cancelPlanDatasCDSS, param);
+  },
+  getPlanInfoIds(param) {
+    return axios.post(urls.getPlanInfoIdsCDSS, param);
+  },
+  revStopPlans(param) {
+    return axios.post(urls.revStopPlansCDSS, param);
+  },
+
+
+
+  getMappingListPageCDSS(param) {
+    return axios.post(urls.getMappingListPageCDSS, param);
+  },
+  modifyConnectStatusCDSS(param) {
+    return axios.post(urls.modifyConnectStatusCDSS, param);
+  },
+  getHospitalPageCDSS(param) {
+    return axios.post(urls.getHospitalPageCDSS, param);
+  },
+  saveOrUpdateHosRecordCDSS(param) {
+    return axios.post(urls.saveOrUpdateHosRecordCDSS, param);
+  },
+  deleteHosRecordCDSS(param) {
+    return axios.post(urls.deleteHosRecordCDSS, param);
+  },
+  getUserRoleCDSS(param) {
+    return axios.post(urls.getUserRoleCDSS, param);
+  },
+  cancelUserRoleCDSS(param) {
+    return axios.post(urls.cancelUserRoleCDSS, param);
+  },
+  addUserRoleCDSS(param) {
+    return axios.post(urls.addUserRoleCDSS, param);
+  },
+  getVersionInfoAllsCDSS(param) {
+    return axios.post(urls.getVersionInfoAllsCDSS, param);
+  },
+  saveVersionInfoAllsCDSS(param) {
+    return axios.post(urls.saveVersionInfoAllsCDSS, param);
+  },
+  cancelVersionInfoAllsCDSS(param) {
+    return axios.post(urls.cancelVersionInfoAllsCDSS, param);
+  },
+  updateVersionInfoAllsCDSS(param) {
+    return axios.post(urls.updateVersionInfoAllsCDSS, param);
+  },
+  addVersionDetailsCDSS(param) {
+    return axios.post(urls.addVersionDetailsCDSS, param);
+  },
+  cancelVersionDetailsCDSS(param) {
+    return axios.post(urls.cancelVersionDetailsCDSS, param);
+  },
+  getDetailByIdCDSS(param) {
+    return axios.post(urls.getDetailByIdCDSS, param);
+  },
+  updateVersionDetailsCDSS(param) {
+    return axios.post(urls.updateVersionDetailsCDSS, param);
+  },
+
+  addDisclaimerInfosCDSS(param) {
+    return axios.post(urls.addDisclaimerInfosCDSS, param);
+  },
+  cancelDisclaimerInformationsCDSS(param) {
+    return axios.post(urls.cancelDisclaimerInformationsCDSS, param);
+  },
+  endDisclaimerInformationsCDSS(param) {
+    return axios.post(urls.endDisclaimerInformationsCDSS, param);
+  },
+  getDisclaimerPagesCDSS(param) {
+    return axios.post(urls.getDisclaimerPagesCDSS, param);
+  },
+  startDisclaimerInformationsCDSS(param) {
+    return axios.post(urls.startDisclaimerInformationsCDSS, param);
+  },
+  updateDisclaimerInformationsCDSS(param) {
+    return axios.post(urls.updateDisclaimerInformationsCDSS, param);
+  },
+  getKlmEnumsDataCDSS(param) {
+    return axios.post(urls.getKlmEnumsDataCDSS, param);
+  },
+  changeStatusCDSS(param) {
+    return axios.post(urls.changeStatusCDSS, param);
+  },
+  getListDicCDSS(param) {
+    return axios.post(urls.getListDicCDSS, param);
+  },
+
+
+
+  precDeptDataMatch(param) {
+    return axios.post(urls.precDeptDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+  precDrugDataMatch(param) {
+    return axios.post(urls.precDrugDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+  precDiseaseDataMatch(param) {
+    return axios.post(urls.precDiseaseDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+  precLisDataMatch(param) {
+    return axios.post(urls.precLisDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+  precPacsDataMatch(param) {
+    return axios.post(urls.precPacsDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+  precOperationDataMatch(param) {
+    return axios.post(urls.precOperationDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+  precFusionDataMatch(param) {
+    return axios.post(urls.precFusionDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+  dataDeptVerify(param) {
+    return axios.post(urls.dataDeptVerify, param);
+  },
+  dataFusionVerify(param) {
+    return axios.post(urls.dataFusionVerify, param);
+  },
+  dataOperationVerify(param) {
+    return axios.post(urls.dataOperationVerify, param);
+  },
+  dataDrugVerify(param) {
+    return axios.post(urls.dataDrugVerify, param);
+  },
+  dataPacsVerify(param) {
+    return axios.post(urls.dataPacsVerify, param);
+  },
+  dataLisVerify(param) {
+    return axios.post(urls.dataLisVerify, param);
+  },
+  dataDiseaseVerify(param) {
+    return axios.post(urls.dataDiseaseVerify, param);
+  },
+};

+ 401 - 198
src/api/config.js

@@ -17,17 +17,17 @@ export default {
     'registry': '/api/user/user/registry',
     'getSmsWithResetPassword': '/api/user/userver/getSmsWithResetPassword',
     'resetPassword': '/api/user/user/resetPassword',
-    'getAccessdMenu': testUrl+'/api/user/user/getUserOrgMenu',  //获取左侧菜单项
-    'getVersionInner':testUrl+'api/knowledgeman/versionInfo/getVersionInfoInner',  //获取内部版本信息
-    'getVersionOuter':'api/knowledgeman/versionInfo/getVersionInfoOuter',  //获取外部版本信息
+    'getAccessdMenu': testUrl + '/api/user/user/getUserOrgMenu',  //获取左侧菜单项
+    'getVersionInner': testUrl + 'api/knowledgeman/versionInfo/getVersionInfoInner',  //获取内部版本信息
+    'getVersionOuter': 'api/knowledgeman/versionInfo/getVersionInfoOuter',  //获取外部版本信息
     'getUserEnumsData': '/api/user/getUserEnumsData',   //获取用户枚举数据
-    'getDiagbotManEnumsData':'/api/diagbotman/getDiagbotManEnumsData',      //获取产品枚举类型
-    'saveUserOper':'/api/diagbotman/optInfo/save',    //保存用户记录
+    'getDiagbotManEnumsData': '/api/diagbotman/getDiagbotManEnumsData',      //获取产品枚举类型
+    'saveUserOper': '/api/diagbotman/optInfo/save',    //保存用户记录
     /* 朗通后台相关接口 */
     'getUserAuthenticationStatus': '/api/user/userAuthentication/getUserAuthenticationStatus',         //获取用户认证状态
-		'getPersonInfo':'/api/user/user/getPersonInfo',
-		'updatePersonInfo':'/api/user/user/updatePersonInfo',
-		'midifyPassword':'/api/user/user/midifyPassword',
+    'getPersonInfo': '/api/user/user/getPersonInfo',
+    'updatePersonInfo': '/api/user/user/updatePersonInfo',
+    'midifyPassword': '/api/user/user/midifyPassword',
     'queryUserInfo': '/api/user/userInfo/queryUserInformation', //注册用户
     'exportUserInfo': '/api/user/report/exportUserInfo', //导出用户信息
     'exportKema': '/api/user/report/exportKema', //导出认证中用户
@@ -35,11 +35,11 @@ export default {
     'renewalsInfos': '/api/diagbotman/userRenewals/renewalsInfos', // 续费列表
     'modifyOpeningTime': '/api/diagbotman/productOrder/modifyOpeningTime', //确定续费
     'deleteRenewalsInfos': '/api/diagbotman/userRenewals/cancelRenewalsInfos', //取消续费
-    'getOrganizationInfo':'/api/user/userInfo/queryMechanismInformation',//获取机构信息
-    'addOrganization':'/api/user/userInfo/addOrganization',//添加机构信息
-    'modifineOrganization':'/api/user/userInfo/updateOrganizations',//修改机构信息
-		'getuserAuthenticationInfo' : '/api/user/userAuthentication/getuserAuthenticationInfo',
-		'userAuthentication':'/api/user/userAuthentication/userAuthentication',   //用户认证
+    'getOrganizationInfo': '/api/user/userInfo/queryMechanismInformation',//获取机构信息
+    'addOrganization': '/api/user/userInfo/addOrganization',//添加机构信息
+    'modifineOrganization': '/api/user/userInfo/updateOrganizations',//修改机构信息
+    'getuserAuthenticationInfo': '/api/user/userAuthentication/getuserAuthenticationInfo',
+    'userAuthentication': '/api/user/userAuthentication/userAuthentication',   //用户认证
     'waitExamOrderCou': '/api/diagbotman/productOrder/waitExamOrderCou',
     'waitAuthen': '/api/user/userAuthentication/waitAuthen',
     'getAllProductOrder': '/api/diagbotman/productOrder/getAllProductOrder',  //获取产品线列表
@@ -48,23 +48,23 @@ export default {
     'getOrgList': '/api/user/userInfo/findOrganization',      //获取未绑定超管的机构列表
     'exportProductOrderInfo': '/api/diagbotman/reporExcel/exportProductOrderInfo',  //导出产品线列表
     'exportAdminInfo': '/api/user/report/exportUserInfo',         //导出超管信息
-    'auditUserInfoAll':'/api/user/userInfo/auditUserInfoAllNopass',     //超管审核不通过
-    'auditUserInfoAllPass':'/api/user/userInfo/auditUserInfoAllPass',     //超管审核通过
-    'getAuthenticated':'/api/user/userInfo/queryVerifiedUserOrganizationProduct',  //已认证超管信息    //获取已认证超管信息
-    'getProductLinesManage':'/api/diagbotman/diagLantoneProduct/selectProduct',  //产品线管理列表,
-    'delProductLine':'/api/diagbotman/diagLantoneProduct/deleteProduct',  //产品线删除
-    'updateServiceStatus':'/api/diagbotman/diagLantoneProduct/updateServiceStatus',    //产品线启用停用
-    'exportAuthedAdmin':'/api/user/report/exportVerified',   //导出已认证超管
-    'delSuperAdmin':'/api/user/userInfo/updateDeleted',     //删除已认证超管
-    'updateUserInfoAll':'/api/user/userInfo/updateUserInfo',  //修改超管
-    'startAndendByuserId':'/api/diagbotman/productOrder/startAndendByuserId',    //已认证超管展开-启用停用
-    'delInformationAvailable':'/api/diagbotman/productOrder/delInformationAvailable',   //已认证超管展开-删除
-    'auditProductStatus':'/api/diagbotman/diagOrderDetails/auditStatus',   //产品线审核
-    'addProductLine':'/api/diagbotman/diagLantoneProduct/addProducts',    //添加产品线
-    'editProductLine':'/api/diagbotman/diagLantoneProduct/updateProduct',       //修改产品线
-    'getProductDetail':'/api/diagbotman/diagLantoneProduct/opendedProduct',    //产品线详情
-    'contineBuy':'/api/diagbotman/productOrder/modifyOpeningTime',    //已认证超管-续费
-    'proDetails':'/api/diagbotman/diagOrderDetails/getAllOrderDetials',      //产品申请-详情
+    'auditUserInfoAll': '/api/user/userInfo/auditUserInfoAllNopass',     //超管审核不通过
+    'auditUserInfoAllPass': '/api/user/userInfo/auditUserInfoAllPass',     //超管审核通过
+    'getAuthenticated': '/api/user/userInfo/queryVerifiedUserOrganizationProduct',  //已认证超管信息    //获取已认证超管信息
+    'getProductLinesManage': '/api/diagbotman/diagLantoneProduct/selectProduct',  //产品线管理列表,
+    'delProductLine': '/api/diagbotman/diagLantoneProduct/deleteProduct',  //产品线删除
+    'updateServiceStatus': '/api/diagbotman/diagLantoneProduct/updateServiceStatus',    //产品线启用停用
+    'exportAuthedAdmin': '/api/user/report/exportVerified',   //导出已认证超管
+    'delSuperAdmin': '/api/user/userInfo/updateDeleted',     //删除已认证超管
+    'updateUserInfoAll': '/api/user/userInfo/updateUserInfo',  //修改超管
+    'startAndendByuserId': '/api/diagbotman/productOrder/startAndendByuserId',    //已认证超管展开-启用停用
+    'delInformationAvailable': '/api/diagbotman/productOrder/delInformationAvailable',   //已认证超管展开-删除
+    'auditProductStatus': '/api/diagbotman/diagOrderDetails/auditStatus',   //产品线审核
+    'addProductLine': '/api/diagbotman/diagLantoneProduct/addProducts',    //添加产品线
+    'editProductLine': '/api/diagbotman/diagLantoneProduct/updateProduct',       //修改产品线
+    'getProductDetail': '/api/diagbotman/diagLantoneProduct/opendedProduct',    //产品线详情
+    'contineBuy': '/api/diagbotman/productOrder/modifyOpeningTime',    //已认证超管-续费
+    'proDetails': '/api/diagbotman/diagOrderDetails/getAllOrderDetials',      //产品申请-详情
     /* 用户后台相关接口 */
     'getTrialProduct': '/api/diagbotman/morServices/showProductInfo',//更多服务
     'exportOrganizeInfo': '/api/user/report/exportOrganization',//导出机构信息
@@ -94,7 +94,7 @@ export default {
     'getTagList': 'api/icssman/questionInfo/list', //标签列表
     'searchTagList': 'api/icssman/questionInfo/index', //标签池检索
     'detailsTagList': 'api/icssman/questionInfo/getByIds', //根据多个标签ID返回标签内容
-    'detailsTag':'api/icssman/questionInfo/getById',      //根据标签ID返回标签内容
+    'detailsTag': 'api/icssman/questionInfo/getById',      //根据标签ID返回标签内容
     'getDeptInfo': 'api/icssman/deptInfo/getDeptInfo', //科室维护
     'getDeptInfoDetials': 'api/icssman/deptInfo/getDeptInfoDetials', //科室维护-详情
     'deleteDeptInfo': 'api/icssman/deptInfo/deleteDeptInfo', //科室维护-删除
@@ -102,12 +102,12 @@ export default {
     'modifDeptInfo': 'api/icssman/deptInfo/updateDeptInfo', //科室维护-修改
     'saveOrUpdate': 'api/icssman/questionInfo/saveOrUpdate', //添加标签保存
     'deleteTagGroup': 'api/icssman/questionInfo/delete', //删除标签组
-    'getPromptList':'api/icssman/introduceInfo/getIntroducePage',//提示信息列表
-    'addPromptInfo':'api/icssman/introduceInfo/saveIntroduce',//新增提示信息
-    'delPromptInfo':'api/icssman/introduceInfo/deleteRecord',//删除提示信息
-    'PromptInfoDetail':'api/icssman/introduceInfo/getIntroduceById',//提示信息详情
-    'getIcssEnumsData':'api/icssman/getIcssEnumsData',//icss枚举
-	  'similarName': 'api/icssman/retrieval/retrievalList', //别名维护
+    'getPromptList': 'api/icssman/introduceInfo/getIntroducePage',//提示信息列表
+    'addPromptInfo': 'api/icssman/introduceInfo/saveIntroduce',//新增提示信息
+    'delPromptInfo': 'api/icssman/introduceInfo/deleteRecord',//删除提示信息
+    'PromptInfoDetail': 'api/icssman/introduceInfo/getIntroduceById',//提示信息详情
+    'getIcssEnumsData': 'api/icssman/getIcssEnumsData',//icss枚举
+    'similarName': 'api/icssman/retrieval/retrievalList', //别名维护
     'delSimilarName': 'api/icssman/retrieval/delRetrievalsByQuesId', //别名维护-删除
     'similarNameDetl': 'api/icssman/retrieval/getRetrievalsByTag', //别名维护-详情
     'addSimilarName': 'api/icssman/retrieval/addTagRetrieval', //别名维护-添加、修改
@@ -115,8 +115,8 @@ export default {
     'searchLable': 'api/icssman/questionInfo/indexRev', //标签检索--过滤别名?
     'uploadFile': 'api/icssman/retrieval/retrievalExcelIm', //别名维护-导入
     'commonSymptomList': 'api/icssman/questionUsual/getDeptInfos', //常见症状维护-常见症状列表
-    'getDepartmentList':'api/icssman/questionUsual/getDeptName', //常见症状维护-科室列表
-    'getSymptomList':'api/icssman/questionUsual/getQuestionInfo', //常见科室症状维护--获取症状列表
+    'getDepartmentList': 'api/icssman/questionUsual/getDeptName', //常见症状维护-科室列表
+    'getSymptomList': 'api/icssman/questionUsual/getQuestionInfo', //常见科室症状维护--获取症状列表
     'addCommonSymptom': 'api/icssman/questionUsual/addQuestionUsual',  //常见科室症状维护--添加科室症状
     'getCommonSymptomById': 'api/icssman/questionUsual/getQuestionUsualByDept', //常见科室症状维护--修改、详情
     'delCommonSymptom': 'api/icssman/questionUsual/deleteQuestionUsual',  //常见科室症状维护--删除科室症状
@@ -136,13 +136,13 @@ export default {
     'delTemplate': 'api/icssman/moduleInfo/delete', //模板维护系统删除单个模板信息
     'getDeptShortListSearh': 'api/icssman/deptVital/getDeptShortList_Searh', //查体模板--科室下拉
     'getPhysicalExamTempList': 'api/icssman/deptVital/getDeptVitalPage', //查体模板列表
-    'getPhysicalExamTempDepartList':'api/icssman/deptVital/getDeptShortList_create' , //查体模板科室列表--新增
-    'getPhysicalExamTempByDepId':'api/icssman/deptVital/getModuleByDeptId', //通过科室id获取查体模板
-    'savePhysicalExamTemp':'api/icssman/deptVital/saveDeptVitals',//保存查体模板
-    'delPhysicalExamTemp':'api/icssman/deptVital/delAllDeptVitalList',//删除查体模板
-    'getConceptKnowledgeList':'/api/knowledgeman/conceptDetail/page', //  术语静态知识列表
-    'getConceptKnowledge':'/api/knowledgeman/conceptDetail/getByConceptId',//术语静态知识详情
-    'getConceptInfo':'/api/knowledgeman/concept/getConceptInfo', //  搜索术语
+    'getPhysicalExamTempDepartList': 'api/icssman/deptVital/getDeptShortList_create', //查体模板科室列表--新增
+    'getPhysicalExamTempByDepId': 'api/icssman/deptVital/getModuleByDeptId', //通过科室id获取查体模板
+    'savePhysicalExamTemp': 'api/icssman/deptVital/saveDeptVitals',//保存查体模板
+    'delPhysicalExamTemp': 'api/icssman/deptVital/delAllDeptVitalList',//删除查体模板
+    'getConceptKnowledgeList': '/api/knowledgeman/conceptDetail/page', //  术语静态知识列表
+    'getConceptKnowledge': '/api/knowledgeman/conceptDetail/getByConceptId',//术语静态知识详情
+    'getConceptInfo': '/api/knowledgeman/concept/getConceptInfo', //  搜索术语
     // 'versionInfo': 'api/icssman/versionInfo/getVersionInfoAlls', //版本信息
     'versionInfo': 'api/knowledgeman/versionInfo/getVersionInfoAlls', //版本信息
     'addVersInfo': 'api/knowledgeman/versionInfo/saveVersionInfoAlls', //版本信息-添加
@@ -151,11 +151,11 @@ export default {
     'addVersionInfo': 'api/knowledgeman/versionDetail/addVersionDetails', //版本信息-添加版本说明
     'modiVersionInfo': 'api/knowledgeman/versionDetail/updateVersionDetails', //版本信息-修改版本说明
     'getVersionDetlInfo': 'api/knowledgeman/versionDetail/getDetailById', //版本信息-版本说明列表获取
-    'promptServer':'/api/knowledgeman/file/uploadImage',    //静态知识富文本图片上传
+    'promptServer': '/api/knowledgeman/file/uploadImage',    //静态知识富文本图片上传
     /**************医学术语维护****************/
-    'getKnowledgeEnums':testUrl+'/api/knowledgeman/getKlmEnumsData', //术语库枚举
-	  'saveConceptInfo':'/api/knowledgeman/conceptDetail/insertOrUpdate',   //保存术语静态知识
-    'delConceptInfo':'/api/knowledgeman/conceptDetail/delete',   //删除术语静态知识
+    'getKnowledgeEnums': testUrl + '/api/knowledgeman/getKlmEnumsData', //术语库枚举
+    'saveConceptInfo': '/api/knowledgeman/conceptDetail/insertOrUpdate',   //保存术语静态知识
+    'delConceptInfo': '/api/knowledgeman/conceptDetail/delete',   //删除术语静态知识
     'knowledgeName': 'api/knowledgeman/concept/getAllInformation', //医学术语-命名维护
     'knowledgeUpload': 'api/knowledgeman/concept/conceptInfoExcelIm', //医学术语-命名维护-导入
     'allKnowledgeType': 'api/knowledgeman/lexicon/getAllLexicon', //医学术语-类型列表
@@ -177,8 +177,8 @@ export default {
     'getMedicalInfoDetail': '/api/knowledgeman/medical/getMedicalInfoDetail', //医学术语--属性维护--属性详情
     'addMedicalInfo': '/api/knowledgeman/medical/addMedicalInfo', //医学术语--属性维护--术语医学属性添加或者编辑
     'removeMedicalInfo': '/api/knowledgeman/medical/removeMedicalInfo', //医学术语--属性维护--术语医学属性删除
-    'getAllLexiconRelationship':'/api/knowledgeman/lexicon/getAllLexicon', //医学术语--获取所有关系类型
-    'getAllConcept':'/api/knowledgeman/conceptDetail/index',   //医学术语--获取所有概念(标准术语)
+    'getAllLexiconRelationship': '/api/knowledgeman/lexicon/getAllLexicon', //医学术语--获取所有关系类型
+    'getAllConcept': '/api/knowledgeman/conceptDetail/index',   //医学术语--获取所有概念(标准术语)
     'getAllBodypart': '/api/knowledgeman/bodypart/getAllBodypart',  //医学术语--获取所有部位
     'getAllDepts': '/api/knowledgeman/medical/getAllDepts',  //医学术语--获取所有科室
     'getLisMappingPage': '/api/knowledgeman/lisMapping/getLisMappingPage', //医学数据-化验大小项与公表项维护-列表
@@ -189,25 +189,25 @@ export default {
     'hasLisMapping': '/api/knowledgeman/lisMapping/hasLisMapping',  //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
     'getTypeList': 'api/knowledgeman/lexicon/getLexiconList', //术语类型-列表
     'addType': 'api/knowledgeman/lexicon/addLexicon', //术语类型-添加
-    'getAllLisConcept':'api/knowledgeman/concept/getAllLisConcept',  //医学数据-化验大小项与公表项维护-获取所有化验公表项
-    'queryIndexConfigPages':'api/knowledgeman/indexConfig/queryIndexConfigPages',  //医学数据-慢病指标值关联维护-列表
-    'getIndexConfigLists':'api/knowledgeman/indexConfig/getIndexConfigLists',  //医学数据-慢病指标值关联维护-获取慢病指标值关联
-    'cancelIndexConfigAlls':'api/knowledgeman/indexConfig/cancelIndexConfigAlls',  //医学数据-慢病指标值关联维护-删除慢病指标值关联
-    'saveIndexConfigLists':'api/knowledgeman/indexConfig/saveIndexConfigLists',  //医学数据-慢病指标值关联维护-添加关联
-    'updateIndexConfigList':'api/knowledgeman/indexConfig/updateIndexConfigList',  //医学数据-慢病指标值关联维护-修改关联
-    'queryIndexConfigDiseaseNames':'api/knowledgeman/indexConfig/queryIndexConfigDiseaseNames',  //医学数据-慢病指标值关联维护-慢病指标疾病标签查询
-    'getDisScaleAllInfo':'api/icssman/disScale/getDisScaleAllInfo',  //医学数据-诊断量表关联维护-列表
-    'addDisScaleInfo':'api/icssman/disScale/addDisScaleInfo',  //医学数据-诊断量表关联维护-添加和修改
-    'getDisScaleByDisId':'api/icssman/disScale/getDisScaleByDisId',  //医学数据-诊断量表关联维护-根据诊断id获取诊断量表关联信息(修改回读用)
-    'delDisScaleInfo':'api/icssman/disScale/delDisScaleInfo',  //医学数据-诊断量表关联维护-删除
+    'getAllLisConcept': 'api/knowledgeman/concept/getAllLisConcept',  //医学数据-化验大小项与公表项维护-获取所有化验公表项
+    'queryIndexConfigPages': 'api/knowledgeman/indexConfig/queryIndexConfigPages',  //医学数据-慢病指标值关联维护-列表
+    'getIndexConfigLists': 'api/knowledgeman/indexConfig/getIndexConfigLists',  //医学数据-慢病指标值关联维护-获取慢病指标值关联
+    'cancelIndexConfigAlls': 'api/knowledgeman/indexConfig/cancelIndexConfigAlls',  //医学数据-慢病指标值关联维护-删除慢病指标值关联
+    'saveIndexConfigLists': 'api/knowledgeman/indexConfig/saveIndexConfigLists',  //医学数据-慢病指标值关联维护-添加关联
+    'updateIndexConfigList': 'api/knowledgeman/indexConfig/updateIndexConfigList',  //医学数据-慢病指标值关联维护-修改关联
+    'queryIndexConfigDiseaseNames': 'api/knowledgeman/indexConfig/queryIndexConfigDiseaseNames',  //医学数据-慢病指标值关联维护-慢病指标疾病标签查询
+    'getDisScaleAllInfo': 'api/icssman/disScale/getDisScaleAllInfo',  //医学数据-诊断量表关联维护-列表
+    'addDisScaleInfo': 'api/icssman/disScale/addDisScaleInfo',  //医学数据-诊断量表关联维护-添加和修改
+    'getDisScaleByDisId': 'api/icssman/disScale/getDisScaleByDisId',  //医学数据-诊断量表关联维护-根据诊断id获取诊断量表关联信息(修改回读用)
+    'delDisScaleInfo': 'api/icssman/disScale/delDisScaleInfo',  //医学数据-诊断量表关联维护-删除
     'insertOrUpdate': 'api/knowledgeman/scaleContent/insertOrUpdate',  //量表结构维护 -- 添加或者更新
     'rebuildOrUpdate': 'api/knowledgeman/scaleContent/getByConceptId',  //量表结构维护 -- 添加或者更新
     'deleteScale': 'api/knowledgeman/scaleContent/delete',  //量表结构维护 -- 删除
     'searchKnowledgeLis': 'api/knowledgeman/scaleContent/index', //量表结构检索
     'getknowledgeList': 'api/knowledgeman/dictionaryInfo/getList', //量表结构字典信息
     'getModuleType': 'api/icssman/moduleInfo/getModuleType',  //模板维护 -- 类型筛选
-    'indexByLexicon': testUrl+'/'+'api/icssman/questionInfo/indexByLexicon',  //知识库标准化-根据名称和术语库词性类型搜索
-    'indexByLexiconStandWord':'api/knowledgeman/commonconcept/indexByLexicon',  //知识库标准化-根据名称搜索
+    'indexByLexicon': testUrl + '/' + 'api/icssman/questionInfo/indexByLexicon',  //知识库标准化-根据名称和术语库词性类型搜索
+    'indexByLexiconStandWord': 'api/knowledgeman/commonconcept/indexByLexicon',  //知识库标准化-根据名称搜索
     'getAssaySon': 'api/knowledgeman/lisSonContact/lisSonContactList',  //化验子项维护
     'getAssaySonDetail': 'api/knowledgeman/lisSonContact/relationContactDetail',  //化验子项维护-详情
     'getConceptInfoAssay': '/api/knowledgeman/concept/getAllForRelation',  //化验子项维护-搜索术语
@@ -232,146 +232,349 @@ export default {
     'assistCheckGetPacsContactDetail': '/api/knowledgeman/pacsSonContact/getPacsContactDetail', //医学术语维护-辅检子项维护-详情
     'assistCheckRemoveRelationPacs': '/api/knowledgeman/pacsSonContact/removeRelationPacs', //医学术语维护-辅检子项维护-删除或恢复
 
+<<<<<<< HEAD
+=======
 
-	  /*********预问诊相关接口**********/
-	  'questionList':testUrl+'/api/precman/questionInfo_prec/page',     //预问诊-填写单列表
-    'questionAdd':testUrl+'/api/precman/questionInfo_prec/saveOrUpdate',      //预问诊-填写单添加
-    'questionSearch':testUrl+'/api/precman/questionInfo_prec/index',    //预问诊-填写单检索
-    'preTypeList':testUrl+'/api/precman/dictionaryInfo_prec/getList',   //类型枚举
-    'questionDel':'/api/precman/questionInfo_prec/delete',      //删除
-    'uploadImg':'/api/precman/file_prec/uploadImage',       //图片上传
-    'fileDel':'/api/precman/file_prec/deleteRemoteFile',          //图片删除
-    'questionDetail':testUrl+'/api/precman/questionInfo_prec/getById',                //填写单详情
-    'moduleList':testUrl+'/api/precman/moduleInfo_prec/getModuleInfoList',        //模板列表
-    'addModule':'/api/precman/moduleInfo_prec/saveOrUpdateModuleInfo',        //模板添加
-    'delModule':'/api/precman/moduleInfo_prec/delete',        //模板删除
-    'moduleDetail':'/api/precman/moduleInfo_prec/getModuleInfoOne',    //模板详情
-    'deptList':testUrl+'/api/precman/moduleInfo_prec/getAllDeptAndDisInfo',    //模板-科室列表
-    'getPrecModuleType':testUrl+'/api/precman/moduleInfo_prec/getModuleType',     //获取未创建的模板类型
-    'getByIds':'/api/prec/questionInfo/getByIds',// 获取多个问题
-    'getBySubQuestionId':testUrl+'/api/precman/questionInfo_prec/getBySubQuestionId',// 获取是否被关联
-     /*********诊断依据*********/
-     'exportDiagnosticAll': '/api/knowledgeman/diagnose/exportDiagnosticAll', //诊断依据--导出诊断依据
-     'exportDiagnosticBasis': '/api/knowledgeman/diagnose/exportDiagnosticBasis', //诊断依据--导出诊断依据问题
-     'importDiagnosticBasis': '/api/knowledgeman/diagnose/importDiagnosticBasis', //诊断依据--导入诊断依据数据
-     'queryQuestionPage': '/api/knowledgeman/diagnoseQuestion/queryQuestionPage', //诊断依据--问题词分页查询
-     'diagBaseDelete': '/api/knowledgeman/diagnose/delete', //诊断依据--删除
-     'diagBaseGetDetail': '/api/knowledgeman/diagnose/getDetail', //诊断依据--获取详情
-     'diagBaseIndex': '/api/knowledgeman/diagnose/index', //诊断依据--诊断检索
-     'diagBasePage': '/api/knowledgeman/diagnose/page', //诊断依据--分页
-     'diagBaseUpdateNeo': '/api/knowledgeman/diagnose/updateNeo', //诊断依据--更新图谱
-     'diagBaseVerifyAllData': '/api/knowledgeman/diagnose/verifyAllData', //诊断依据--校验所有数据
-     'diagBaseVerifyData': '/api/knowledgeman/diagnose/verifyData', //诊断依据--校验数据
-     'tempSaveOrUpate':'/api/knowledgeman/diagnose/tempSaveOrUpate', //诊断依据-临时保存
-     'diagBaseSearch':'/api/knowledgeman/diagnose/search', //诊断依据-搜索标准词或者关联词
-     'getUniqueNameWithList': '/api/knowledgeman/lisMapping/getUniqueNameWithList', //医学数据-查找化验公表名
-      /*********数据统计  *********/
-      'statisticsCount': '/api/bi/statistics/count', //诊断依据--校验数据
-      /*********安全管理  *********/
-      'tokenList': '/api/mrqcman/mrqcToken/list',  // 令牌列表
-      'tokenSaveOrUpdate': '/api/mrqcman/mrqcToken/saveOrUpdate', // 令牌新增或修改
-      'tokenDetails': '/api/mrqcman/mrqcToken/getById', // 令牌明细
-      'tokenDelete': '/api/mrqcman/mrqcToken/delete', // 令牌删除
-      'tokenAnalysis': '/api/mrqcman/mrqcToken/analysis', //解析
-      'rulesList':'/api/knowledgeman/rulePub/pageRulePub',
-      'ruleDetail':'/api/knowledgeman/rulePub/getRulePub',
-      'ruleApplyDetail':'/api/knowledgeman/ruleApp/getRuleApp',
-      'rulesApplyList':'/api/knowledgeman/ruleApp/pageRuleApp',
-      'addRule':'/api/knowledgeman/rulePub/saveRulePub',
-      'ruleTypesList':'/api/knowledgeman/rulePub/pageRulePub',
-      'addRuleApply':'/api/knowledgeman/ruleApp/saveRuleApp',
-      'ruleApplyDelete':'/api/knowledgeman/ruleApp/removeRuleApp',
-      'ruleDelete':'/api/knowledgeman/rulePub/removeRulePub',
+    /*********预问诊相关接口**********/
+    'questionList': testUrl + '/api/precman/questionInfo_prec/page',     //预问诊-填写单列表
+    'questionAdd': testUrl + '/api/precman/questionInfo_prec/saveOrUpdate',      //预问诊-填写单添加
+    'questionSearch': testUrl + '/api/precman/questionInfo_prec/index',    //预问诊-填写单检索
+    'preTypeList': testUrl + '/api/precman/dictionaryInfo_prec/getList',   //类型枚举
+    'questionDel': '/api/precman/questionInfo_prec/delete',      //删除
+    'uploadImg': '/api/precman/file_prec/uploadImage',       //图片上传
+    'fileDel': '/api/precman/file_prec/deleteRemoteFile',          //图片删除
+    'questionDetail': testUrl + '/api/precman/questionInfo_prec/getById',                //填写单详情
+    'moduleList': testUrl + '/api/precman/moduleInfo_prec/getModuleInfoList',        //模板列表
+    'addModule': '/api/precman/moduleInfo_prec/saveOrUpdateModuleInfo',        //模板添加
+    'delModule': '/api/precman/moduleInfo_prec/delete',        //模板删除
+    'moduleDetail': '/api/precman/moduleInfo_prec/getModuleInfoOne',    //模板详情
+    'deptList': testUrl + '/api/precman/moduleInfo_prec/getAllDeptAndDisInfo',    //模板-科室列表
+    'getPrecModuleType': testUrl + '/api/precman/moduleInfo_prec/getModuleType',     //获取未创建的模板类型
+    'getByIds': '/api/prec/questionInfo/getByIds',// 获取多个问题
+    'getBySubQuestionId': testUrl + '/api/precman/questionInfo_prec/getBySubQuestionId',// 获取是否被关联
+    /*********诊断依据*********/
+    'exportDiagnosticAll': '/api/knowledgeman/diagnose/exportDiagnosticAll', //诊断依据--导出诊断依据
+    'exportDiagnosticBasis': '/api/knowledgeman/diagnose/exportDiagnosticBasis', //诊断依据--导出诊断依据问题
+    'importDiagnosticBasis': '/api/knowledgeman/diagnose/importDiagnosticBasis', //诊断依据--导入诊断依据数据
+    'queryQuestionPage': '/api/knowledgeman/diagnoseQuestion/queryQuestionPage', //诊断依据--问题词分页查询
+    'diagBaseDelete': '/api/knowledgeman/diagnose/delete', //诊断依据--删除
+    'diagBaseGetDetail': '/api/knowledgeman/diagnose/getDetail', //诊断依据--获取详情
+    'diagBaseIndex': '/api/knowledgeman/diagnose/index', //诊断依据--诊断检索
+    'diagBasePage': testUrl + '/api/knowledgeman/diagnose/page', //诊断依据--分页
+    'diagBaseUpdateNeo': '/api/knowledgeman/diagnose/updateNeo', //诊断依据--更新图谱
+    'diagBaseVerifyAllData': '/api/knowledgeman/diagnose/verifyAllData', //诊断依据--校验所有数据
+    'diagBaseVerifyData': '/api/knowledgeman/diagnose/verifyData', //诊断依据--校验数据
+    'tempSaveOrUpate': '/api/knowledgeman/diagnose/tempSaveOrUpate', //诊断依据-临时保存
+    'diagBaseSearch': '/api/knowledgeman/diagnose/search', //诊断依据-搜索标准词或者关联词
+    'getUniqueNameWithList': '/api/knowledgeman/lisMapping/getUniqueNameWithList', //医学数据-查找化验公表名
+    /*********数据统计  *********/
+    'statisticsCount': '/api/bi/statistics/count', //诊断依据--校验数据
+    /*********安全管理  *********/
+    'tokenList': '/api/mrqcman/mrqcToken/list',  // 令牌列表
+    'tokenSaveOrUpdate': '/api/mrqcman/mrqcToken/saveOrUpdate', // 令牌新增或修改
+    'tokenDetails': '/api/mrqcman/mrqcToken/getById', // 令牌明细
+    'tokenDelete': '/api/mrqcman/mrqcToken/delete', // 令牌删除
+    'tokenAnalysis': '/api/mrqcman/mrqcToken/analysis', //解析
+    'rulesList': '/api/knowledgeman/rulePub/pageRulePub',
+    'ruleDetail': '/api/knowledgeman/rulePub/getRulePub',
+    'ruleApplyDetail': '/api/knowledgeman/ruleApp/getRuleApp',
+    'rulesApplyList': '/api/knowledgeman/ruleApp/pageRuleApp',
+    'addRule': '/api/knowledgeman/rulePub/saveRulePub',
+    'ruleTypesList': '/api/knowledgeman/rulePub/pageRulePub',
+    'addRuleApply': '/api/knowledgeman/ruleApp/saveRuleApp',
+    'ruleApplyDelete': '/api/knowledgeman/ruleApp/removeRuleApp',
+    'ruleDelete': '/api/knowledgeman/rulePub/removeRulePub',
+
+    'getRecord': '/api/mrman/arRechome/getAllList',//病历管理
+    'getRecordDetail': '/api/mrman/arRechome/getBABLContent',//病历管理--病历详情
+    'saveRecord': '/api/mrman/arRechome/saveBABLContent',  //保存病例
+    'getTypes': '/api/mrman/getMrEnumsData',//枚举类型
+    'getFieldList': testUrl + "/api/mrman/qc/qcQuestionInfo/page",    //获取字段映射列表
+    'getFieldDetail': '/api/mrman/qc/qcQuestionInfo/getById',//获取标签详情
+    'addFieldMatch': "/api/mrman/qc/qcQuestionInfo/saveOrUpdate",    //添加字段映射
+    'getQcTypes': testUrl + "/api/mrman/qc/dictionaryInfo/getList",    //添加字段映射
+    'delFieldMatch': "/api/mrman/qc/qcQuestionInfo/delete",    //删除字段映射  
+    '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', //获取模板详情
+    'getQCName': '/api/mrman/qc/qcQuestionInfo/index', //获取字段名称
+    'getQcFlawList': '/api/mrman/qcCasesEntry/indexCaseEntry',   //获取缺陷列表
+    'getModuleTypeList': '/api/mrman/qc/qcModuleInfo/index', //获取模块类型列表
+    'getRecordInpList': '/api/mrman/qcInputcases/getAllInputcases',//获取全部病历录入
+    'removeRecordInpById': '/api/mrman/qcInputcases/cancelById',//删除病历录入
+    'addRecordInp': '/api/mrman/qcInputcases/saveOrUpdata', //保存和修改全部病历录入 
+    'getRecordInpModule': '/api/mrman/qcCases/getAll', //获取全部模块及条目
+    'getRecordInpModuleByHospital': '/api/mrman/qcCases/getAllByHospital', //获取全部模块及条目根据医院名称
+    'getRecordHopitalList': '/api/mrman/qcHospitalInfo/getHospitalInfoAll',//获取医院信息 
+    'getRecordCases': testUrl + '/api/mrman/qcCases/getCases', //获取全部模块
+    'getRecordIremList': testUrl + '/api/mrman/qcCasesEntry/getAll', //获取病例条目列表
+    'addRecordItem': '/api/mrman/casesEntryHospital/insertByHospital', //添加病例条目
+    'getRecordByHospital': '/api/mrman/casesEntryHospital/getAllByHospital', //获取指定医院的病例条目 
+    'updateRecordByHospital': '/api/mrman/casesEntryHospital/updateByHospital', //更新指定医院的病例条目 
+    'delRecordItem': '/api/mrman/qcCasesEntry/deleteQcCasesEntry', //删除病例条目
+    'getRecordItemDetail': '/api/mrman/qcCasesEntry/getUpdateInfo', //获取病例详情
+    'getInputcasesDetial': '/api/mrman/qcInputcases/getInputcasesDetial', //获取标注病例详情
+    'gethospitalModuleList': '/api/mrman/qcMode/getModes', //获取医院数据模块
+    'getQcTypeList': testUrl + '/api/mrman/qc/qcType/page', //获取质控类型列表
+    'addQcType': testUrl + '/api/mrman/qc/qcType/saveOrUpdate', //新增质控类型
+    'delQcType': '/api/mrman/qc/qcType/delete', //删除质控类型
+    'getQcTypeItem': testUrl + '/api/mrman/qc/qcType/getEntryByHospital', //获取质控条目
+    'getQcTypeDetail': testUrl + '/api/mrman/qc/qcType/getById', //获取质控类型明细
+    'getQcEntryTypeList': testUrl + '/api/mrman/qc/qcEntryType/page', //质控条目与质控类型关系--分页列表
+    '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',    //其他质控类型列表
+    'saveQcEntryType': '/api/mrman/qc/qcEntryType/saveOrUpdate', //质控条目与质控类型关系--保存
+    'getStdList': '/api/mrman/stdBehospitalInfo/getSthospitalInfoPage',//标准病例列表
+    'delStdRecord': '/api/mrman/stdBehospitalInfo/clearSthospitalInfo',//删除标准病例
+    'updateStdRecord': '/api/mrman/stdBehospitalInfo/updataSthospitalInfo',//更新标准病例
+    'findStdRecord': '/api/mrman/stdBehospitalInfo/findSthospitalInfo',//查找标准病例
+    'getStdDeptList': '/api/mrman/medBehospitalInfo/findhospitalDept', //获取科室列表
+    'getTestItems': '/api/mrman/stdBehospitalInfo/getStatistic',     //获取病例条目统计
+    'addTask': '/api/mrman/stdMissionDetail/addMissionDetail',   //添加任务
+    'getTaskList': '/api/mrman/stdMissionInfo/getMissionInfoPage',   //获取任务列表
+    'delTask': '/api/mrman/stdMissionInfo/clearMissionInfo',   //获取任务列表
+    'editTask': '/api/mrman/stdMissionInfo/getMissionInfoPage',   //获取任务列表
+    'getTaskDetailList': '/api/mrman/stdMissionDetail/getMissionDetailPage',   //获取任务详情列表
+    'getTaskDetail': '/api/mrman/stdMissionDetail/getMissionDetailPage',   //获取单个任务详情
+    'editTaskDetail': '/api/mrman/stdMissionDetail/updateMissionDetail',   //任务详情修改
+    'delTaskDetail': '/api/mrman/stdMissionDetail/clearMissionDetail',     //任务详情删除
+    'autoTest': '/api/mrman/stdBehospitalInfo/analyze',  //自动化测试
+    'saveDefaultModuleInfo': '/api/mrman/qc/qcModuleInfo/saveDefaultModuleInfo',  //模板列表首页
+    'ControModuleInfo': '/api/mrman/qc/qcType/ControModuleInfo',  //指控类型列表首页
+
+
+
+    // 'promptServer': '/sys/file/uploadImage',    //静态知识富文本图片上传
+    // 'midifyPassword': '/sys/user/midifyPassword',    //修改密码
+    'delConceptInfoCDSS': '/api/cdssman/graph/conceptInfo/changeStatus',   //静态知识启用禁用
+    'getConceptKnowledgeListCDSS': '/api/cdssman/graph/conceptInfo/getPage', //  术语静态知识列表
+    'getConceptKnowledgeCDSS': '/api/cdssman/graph/conceptInfo/getRecordById',//术语静态知识详情
+    'isExistCDSS': '/api/cdssman/graph/conceptInfo/isExist',// 静态知识是否存在
+    'saveConceptInfoCDSS': '/api/cdssman/graph/conceptInfo/saveOrUpdateRecord',   //保存术语静态知识
+    'getAllConceptCDSS': '/api/cdssman/graph/conceptInfo/staticKnowledgeIndexWithoutInfo',   //医学术语检索-新增静态知识
+    // 'delLisMappingByIdCDSS': '/api/knowledgeman/lisMapping/delLisMappingById',  //医学数据-化验大小项与公表项维护-单个删除
+    // 'getConceptInfoAssayCDSS': '/api/knowledgeman/concept/getAllForRelation',  //化验子项维护-搜索术语
+    // 'getAllLisConceptCDSS': 'api/knowledgeman/concept/getAllLisConcept',  //医学数据-化验大小项与公表项维护-获取所有化验公表项
+    // 'hasLisMappingCDSS': '/api/knowledgeman/lisMapping/hasLisMapping',  //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
+
+
+    'getMappingListPageCDSS': '/api/cdssman/hospitalInfo/getMappingListPage',  //获取术语映射统计列表
+
+    'retrievalSearchCDSS': '/api/cdssman/demo/retrieval/index',   //术语检索
+    'getLisMappingPageCDSS': '/api/cdssman/tran/diseaseConfig/getPage', //诊断列表
+    'diseaseIsExistRecordCDSS': '/api/cdssman/tran/diseaseConfig/isExistRecord',   //诊断-映射关系是否已存在
+    'saveOrUpdateDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/saveOrUpdateRecord',   //诊断-保存或修改映射关系
+    'deleteDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/deleteRecord',   //诊断-删除映射关系
+    'exportDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/exportExcel',   //诊断-数据导出
+    'importDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/importExcel',   //诊断-数据导入
+    'exportDiseaseModuleCDSS': '/api/cdssman/tran/diseaseConfig/exportExcelModule',   
+    'precDiseaseDataMatch': '/api/cdssman/tran/diseaseConfig/precDataMatch',   
+    'dataDiseaseVerify': '/api/cdssman/tran/diseaseConfig/dataVerify',   
+
+    'getLisPageCDSS': '/api/cdssman/tran/lisConfig/getPage',   //检验列表
+    'lisIsExistRecordCDSS': '/api/cdssman/tran/lisConfig/isExistRecord',   //检验-映射关系是否已存在
+    'saveOrUpdateLisRecordCDSS': '/api/cdssman/tran/lisConfig/saveOrUpdateRecord',   //检验-保存或修改映射关系
+    'deleteLisRecordCDSS': '/api/cdssman/tran/lisConfig/deleteRecord',   //检验-删除映射关系
+    'exportLisRecordCDSS': '/api/cdssman/tran/lisConfig/exportExcel',   //检验-数据导出
+    'importLisRecordCDSS': '/api/cdssman/tran/lisConfig/importExcel',   //检验-数据导入
+    'exportLisModuleCDSS': '/api/cdssman/tran/lisConfig/exportExcelModule',   
+    'precLisDataMatch': '/api/cdssman/tran/lisConfig/precDataMatch',   
+    'dataLisVerify': '/api/cdssman/tran/lisConfig/dataVerify',   
+
+    'getpacsPageCDSS': '/api/cdssman/tran/pacsConfig/getPage',   //检查列表
+    'pacsIsExistRecordCDSS': '/api/cdssman/tran/pacsConfig/isExistRecord',   //检查-映射关系是否已存在
+    'saveOrUpdatePacsRecordCDSS': '/api/cdssman/tran/pacsConfig/saveOrUpdateRecord',   //检查-保存或修改映射关系
+    'deletePacsRecordCDSS': '/api/cdssman/tran/pacsConfig/deleteRecord',   //检查-删除映射关系
+    'exportPacsRecordCDSS': '/api/cdssman/tran/pacsConfig/exportExcel',   //检查-数据导出
+    'importPacsRecordCDSS': '/api/cdssman/tran/pacsConfig/importExcel',   //检查-数据导入
+    'exportPacsModuleCDSS': '/api/cdssman/tran/pacsConfig/exportExcelModule', 
+    'precPacsDataMatch': '/api/cdssman/tran/pacsConfig/precDataMatch', 
+    'dataPacsVerify': '/api/cdssman/tran/pacsConfig/dataVerify', 
+
+    'getDrugPageCDSS': '/api/cdssman/tran/drugConfig/getPage',   //药品列表
+    'drugIsExistRecordCDSS': '/api/cdssman/tran/drugConfig/isExistRecord',   //药品-映射关系是否已存在
+    'saveOrUpdateDrugRecordCDSS': '/api/cdssman/tran/drugConfig/saveOrUpdateRecord',   //药品-保存或修改映射关系
+    'deleteDrugRecordCDSS': '/api/cdssman/tran/drugConfig/deleteRecord',   //药品-删除映射关系
+    'exportDrugRecordCDSS': '/api/cdssman/tran/drugConfig/exportExcel',   //药品-数据导出
+    'importDrugRecordCDSS': '/api/cdssman/tran/drugConfig/importExcel',   //药品-数据导入
+    'exportDrugModuleCDSS': '/api/cdssman/tran/drugConfig/exportExcelModule',   
+    'precDrugDataMatch': '/api/cdssman/tran/drugConfig/precDataMatch',  
+    'dataDrugVerify': '/api/cdssman/tran/drugConfig/dataVerify',  
+
+    'getOperationPageCDSS': '/api/cdssman/tran/operationConfig/getPage',   //手术/操作列表
+    'operationIsExistRecordCDSS': '/api/cdssman/tran/operationConfig/isExistRecord',   //手术/操作-映射关系是否已存在
+    'saveOrUpdateOperationRecordCDSS': '/api/cdssman/tran/operationConfig/saveOrUpdateRecord',   //手术/操作-保存或修改映射关系
+    'deleteOperationRecordCDSS': '/api/cdssman/tran/operationConfig/deleteRecord',   //手术/操作-删除映射关系
+    'exportOperationRecordCDSS': '/api/cdssman/tran/operationConfig/exportExcel',   //手术/操作-数据导出
+    'importOperationRecordCDSS': '/api/cdssman/tran/operationConfig/importExcel',   //手术/操作-数据导入
+    'exportOperationModuleCDSS': '/api/cdssman/tran/operationConfig/exportExcelModule', 
+    'precOperationDataMatch': '/api/cdssman/tran/operationConfig/precDataMatch', 
+    'dataOperationVerify': '/api/cdssman/tran/operationConfig/dataVerify', 
+
+    'getFusionPageCDSS': '/api/cdssman/tran/transfusionConfig/getPage',   //输血列表
+    'fusionIsExistRecordCDSS': '/api/cdssman/tran/transfusionConfig/isExistRecord',   //输血-映射关系是否已存在
+    'saveOrUpdateFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/saveOrUpdateRecord',   //输血-保存或修改映射关系
+    'deleteFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/deleteRecord',   //输血-删除映射关系
+    'exportFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/exportExcel',   //输血-数据导出
+    'importFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/importExcel',   //输血-数据导入
+    'exportFusionModuleCDSS': '/api/cdssman/tran/transfusionConfig/exportExcelModule',  
+    'precFusionDataMatch': '/api/cdssman/tran/transfusionConfig/precDataMatch',  
+    'dataFusionVerify': '/api/cdssman/tran/transfusionConfig/dataVerify',  
+
+    'getDeptPageCDSS': '/api/cdssman/tran/deptConfig/getPage',   //科室列表
+    'deptIsExistRecordCDSS': '/api/cdssman/tran/deptConfig/isExistRecord',   //科室-映射关系是否已存在
+    'saveOrUpdateDeptRecordCDSS': '/api/cdssman/tran/deptConfig/saveOrUpdateRecord',   //科室-保存或修改映射关系
+    'deleteDeptRecordCDSS': '/api/cdssman/tran/deptConfig/deleteRecord',   //科室-删除映射关系
+    'exportDeptRecordCDSS': '/api/cdssman/tran/deptConfig/exportExcel',   //科室-数据导出
+    'importDeptRecordCDSS': '/api/cdssman/tran/deptConfig/importExcel',   //科室-数据导入
+    'exportDeptModuleCDSS': '/api/cdssman/tran/deptConfig/exportExcelModule',   //科室-数据导入模板导出
+    'precDeptDataMatch': '/api/cdssman/tran/deptConfig/precDataMatch',   
+    'dataDeptVerify': '/api/cdssman/tran/deptConfig/dataVerify',   
+   
+    // 'saveHospitalInfoRecordCDSS': '/api/cdssman/tran/hospitalInfo/saveRecord',   //医院信息——修改医院信息
+
+    'modifyConnectStatusCDSS': '/api/cdssman/hospitalInfo/modifyConnectStatus',   //医院信息——修改医院信息 
+    'changeStatusCDSS': '/api/cdssman/hospitalInfo/changeStatus',   //医院信息——启用禁用
+    'getHospitalPageCDSS': '/api/cdssman/hospitalInfo/getPage',   //医院信息——分页查询
+    'saveOrUpdateHosRecordCDSS': '/api/cdssman/hospitalInfo/saveOrUpdateRecord',   //医院信息——保存或修改映射关系
+    'deleteHosRecordCDSS': '/api/cdssman/hospitalInfo/deleteRecord',   //医院信息——删除映射关系
+    'getHospitalInfoCDSS': '/api/cdssman/hospitalInfo/getHospitalInfo',   //医院信息——获取医院信息
+    'getUserRoleCDSS': '/api/cdssman/userRole/getUserRole',   //医院管理员列表
+    'cancelUserRoleCDSS': '/api/cdssman/userRole/cancelUserRole',   //删除医院管理员
+    'addUserRoleCDSS': '/api/cdssman/userRole/addUserRole',   //添加医院管理员
+
+    'cancelPlanDatasCDSS': '/api/cdssman/plan/cancelPlanDatas',   //删除方案配置信息
+    'getPlanInfoIdsCDSS': '/api/cdssman/plan/getPlanInfoIds',   //根据方案id获取配置信息
+    'getPlanInfoPagesCDSS': '/api/cdssman/plan/getPlanInfoPages',   //分页获取方案配置信息
+    'getDefaultPlansCDSS': '/api/cdssman/plan/getPlansDefault',   //获取默认方案配置
+    'getSysPlanInfoDatasCDSS': '/api/cdssman/plan/getSysPlanInfoDatas',   //根据医院获取方案配置信息
+    'revStopPlansCDSS': '/api/cdssman/plan/revStopPlans',   //停用启用方案配置
+    'savePlanInfoDatasCDSS': '/api/cdssman/plan/savePlanInfoDatas',   //保存更新方案配置信息
+
+
+
+
+    
+    'getVersionInfoAllsCDSS': '/api/cdssman/versionInfo/getVersionInfoAlls',   //获取版本信息
+    'saveVersionInfoAllsCDSS': '/api/cdssman/versionInfo/saveVersionInfoAlls',   //保存版本信息
+    'cancelVersionInfoAllsCDSS': '/api/cdssman/versionInfo/cancelVersionInfoAlls',   //删除版本信息
+    'updateVersionInfoAllsCDSS': '/api/cdssman/versionInfo/updateVersionInfoAlls',   //更新版本信息
+    'addVersionDetailsCDSS': '/api/cdssman/versionDetail/addVersionDetails',   //增加版本详情信息
+    'cancelVersionDetailsCDSS': '/api/cdssman/versionDetail/cancelVersionDetails',   //删除版本详情信息
+    'getDetailByIdCDSS': '/api/cdssman/versionDetail/getDetailById',   //根据版本id获取版本详情信息
+    'updateVersionDetailsCDSS': '/api/cdssman/versionDetail/updateVersionDetails',   //更新版本详情信息
+>>>>>>> master
+
+    'addDisclaimerInfosCDSS': '/api/cdssman/disclaimerInfo/addDisclaimerInfos',   //增加免责申明详情
+    'cancelDisclaimerInformationsCDSS': '/api/cdssman/disclaimerInfo/cancelDisclaimerInformations',   //删除免责申明详情
+    'endDisclaimerInformationsCDSS': '/api/cdssman/disclaimerInfo/endDisclaimerInformations',   //停用免责申明详情
+    'getDisclaimerPagesCDSS': '/api/cdssman/disclaimerInfo/getDisclaimerPages',   //分页查询获取免责申明
+    'startDisclaimerInformationsCDSS': '/api/cdssman/disclaimerInfo/startDisclaimerInformations',   //启用免责申明详情
+    'updateDisclaimerInformationsCDSS': '/api/cdssman/disclaimerInfo/updateDisclaimerInformations',   //修改免责申明详情
+
+    'getListDicCDSS': '/api/cdssman/sys/dictionaryInfo/getList',   //返回字典信息(界面返回)
+
+    'getKlmEnumsDataCDSS': '/api/cdssman/getKlmEnumsData',   //枚举数据获取
 
-      'getRecord':'/api/mrman/arRechome/getAllList',//病历管理
-      'getRecordDetail':'/api/mrman/arRechome/getBABLContent',//病历管理--病历详情
-      'saveRecord':'/api/mrman/arRechome/saveBABLContent',  //保存病例
-      'getTypes':'/api/mrman/getMrEnumsData',//枚举类型
-      'getFieldList':"/api/mrman/qc/qcQuestionInfo/page",    //获取字段映射列表
-      'getFieldDetail':'/api/mrman/qc/qcQuestionInfo/getById',//获取标签详情
-      'addFieldMatch':"/api/mrman/qc/qcQuestionInfo/saveOrUpdate",    //添加字段映射
-      'getQcTypes':"/api/mrman/qc/dictionaryInfo/getList",    //添加字段映射
-      'delFieldMatch':"/api/mrman/qc/qcQuestionInfo/delete",    //删除字段映射  
-      'getQCTemplist':'/api/mrman/qc/qcModuleInfo/page', // 获取模板列表
-      'saveOrUpdateQCTemp':'/api/mrman/qc/qcModuleInfo/saveOrUpdateModuleInfo', //新增或修改模板
-      'delQCTemp':'/api/mrman/qc/qcModuleInfo/delete', //删除模板
-      'getQCTempDetail':'/api/mrman/qc/qcModuleInfo/getById', //获取模板详情
-      'getQCName':'/api/mrman/qc/qcQuestionInfo/index', //获取字段名称
-      'getQcFlawList':'/api/mrman/qcCasesEntry/indexCaseEntry',   //获取缺陷列表
-      'getModuleTypeList':'/api/mrman/qc/qcModuleInfo/index', //获取模块类型列表
-      'getRecordInpList':'/api/mrman/qcInputcases/getAllInputcases',//获取全部病历录入
-      'removeRecordInpById':'/api/mrman/qcInputcases/cancelById',//删除病历录入
-      'addRecordInp':'/api/mrman/qcInputcases/saveOrUpdata', //保存和修改全部病历录入 
-      'getRecordInpModule':'/api/mrman/qcCases/getAll', //获取全部模块及条目
-      'getRecordInpModuleByHospital':'/api/mrman/qcCases/getAllByHospital', //获取全部模块及条目根据医院名称
-      'getRecordHopitalList':'/api/mrman/qcHospitalInfo/getHospitalInfoAll',//获取医院信息 
-      'getRecordCases':'/api/mrman/qcCases/getCases', //获取全部模块
-      'getRecordIremList': '/api/mrman/qcCasesEntry/getAll', //获取病例条目列表
-      'addRecordItem':'/api/mrman/casesEntryHospital/insertByHospital', //添加病例条目
-      'getRecordByHospital':'/api/mrman/casesEntryHospital/getAllByHospital', //获取指定医院的病例条目 
-      'updateRecordByHospital':'/api/mrman/casesEntryHospital/updateByHospital', //更新指定医院的病例条目 
-      'delRecordItem':'/api/mrman/qcCasesEntry/deleteQcCasesEntry', //删除病例条目
-      'getRecordItemDetail':'/api/mrman/qcCasesEntry/getUpdateInfo', //获取病例详情
-      'getInputcasesDetial':'/api/mrman/qcInputcases/getInputcasesDetial', //获取标注病例详情
-      'gethospitalModuleList': '/api/mrman/qcMode/getModes', //获取医院数据模块
-      'getQcTypeList': '/api/mrman/qc/qcType/page', //获取质控类型列表
-      'addQcType': '/api/mrman/qc/qcType/saveOrUpdate', //新增质控类型
-      'delQcType': '/api/mrman/qc/qcType/delete', //删除质控类型
-      'getQcTypeItem': '/api/mrman/qc/qcType/getEntryByHospital', //获取质控条目
-      'getQcTypeDetail':'/api/mrman/qc/qcType/getById', //获取质控类型明细
-      'getQcEntryTypeList': '/api/mrman/qc/qcEntryType/page', //质控条目与质控类型关系--分页列表
-      'getQcEntryTypeDetail': '/api/mrman/qc/qcEntryType/getById', //质控条目与质控类型关系--根据entryId和医院id返回内容
-      'getQcEntryTypeByHospital': '/api/mrman/qc/qcEntryType/getTypeByHospital', //质控条目与质控类型关系--根据医院获取质控类型列表
-      'getQcEntryTypeIndex': '/api/mrman/qc/qcEntryType/index', //质控条目与质控类型关系--根据医院和条目检索未被选择的质控类型
-      'saveQcEntryType': '/api/mrman/qc/qcEntryType/saveOrUpdate', //质控条目与质控类型关系--保存
-      'getStdList':'/api/mrman/stdBehospitalInfo/getSthospitalInfoPage' ,//标准病例列表
-      'delStdRecord':'/api/mrman/stdBehospitalInfo/clearSthospitalInfo',//删除标准病例
-      'updateStdRecord':'/api/mrman/stdBehospitalInfo/updataSthospitalInfo',//更新标准病例
-      'findStdRecord':'/api/mrman/stdBehospitalInfo/findSthospitalInfo',//查找标准病例
-      'getStdDeptList':'/api/mrman/medBehospitalInfo/findhospitalDept', //获取科室列表
-      'getTestItems':'/api/mrman/stdBehospitalInfo/getStatistic',     //获取病例条目统计
-      'addTask':'/api/mrman/stdMissionDetail/addMissionDetail',   //添加任务
-      'getTaskList':'/api/mrman/stdMissionInfo/getMissionInfoPage',   //获取任务列表
-      'delTask':'/api/mrman/stdMissionInfo/clearMissionInfo',   //获取任务列表
-      'editTask':'/api/mrman/stdMissionInfo/getMissionInfoPage',   //获取任务列表
-      'getTaskDetailList':'/api/mrman/stdMissionDetail/getMissionDetailPage',   //获取任务详情列表
-      'getTaskDetail':'/api/mrman/stdMissionDetail/getMissionDetailPage',   //获取单个任务详情
-      'editTaskDetail':'/api/mrman/stdMissionDetail/updateMissionDetail',   //任务详情修改
-      'delTaskDetail':'/api/mrman/stdMissionDetail/clearMissionDetail',     //任务详情删除
-      'autoTest':'/api/mrman/stdBehospitalInfo/analyze',  //自动化测试
 
   },
-	menuIconList: { //菜单对应图标
-		'YH-KZT': 'el-icon-menu',
-		'YH-GDFW': 'el-icon-service',
-		'YH-JGZX': 'el-icon-goods',
-		'LT-KHZX': 'el-icon-document',
-		'LT-KZT': 'el-icon-edit-outline',
-		'LT-DDXT': 'el-icon-setting',
-		'LT-CPXGL': 'el-icon-upload',
-		'LT-GRZX': 'el-icon-news'
+  menuIconList: { //菜单对应图标
+    'YH-KZT': 'el-icon-menu',
+    'YH-GDFW': 'el-icon-service',
+    'YH-JGZX': 'el-icon-goods',
+    'LT-KHZX': 'el-icon-document',
+    'LT-KZT': 'el-icon-edit-outline',
+    'LT-DDXT': 'el-icon-setting',
+    'LT-CPXGL': 'el-icon-upload',
+    'LT-GRZX': 'el-icon-news'
   },
   labelTypesMaps: {       //// 归属和填写单类型限制
-    '1':['2','3','4','11'],
-    '3':['2','4','6'],
-    '4':['2','3'],
-    '5':['7'],
-    '6':['9'],
-    '7':['9'],
-    '8':['9']
+    '1': ['2', '3', '4', '11'],
+    '3': ['2', '4', '6'],
+    '4': ['2', '3'],
+    '5': ['7'],
+    '6': ['9'],
+    '7': ['9'],
+    '8': ['9']
   },
-  groupParams:[
-    {controlType:[0,1,2],tagType:[1]},     //多列多选(杂音/初为)     notTagType为文字标签剔除
-    {controlType:[0,1,2,5,6,7,8],tagType:[1]},  //多项统一横铺标签(血压)
-    {controlType:[0,1,2,5,6,7,8,11],tagType:[1,2,3]},  //症状详细(症状尾巴)
-    {controlType:[0,1,2],tagType:[1,4]}, //组合项标签(既往史)
-    {controlType:[0,1,6],tagType:[1]},    //化验组合
-    {controlType:[0,1,2,99],tagType:[1]},   //症状推送类型(添加症状)
+  groupParams: [
+    { controlType: [0, 1, 2], tagType: [1] },     //多列多选(杂音/初为)     notTagType为文字标签剔除
+    { controlType: [0, 1, 2, 5, 6, 7, 8], tagType: [1] },  //多项统一横铺标签(血压)
+    { controlType: [0, 1, 2, 5, 6, 7, 8, 11], tagType: [1, 2, 3] },  //症状详细(症状尾巴)
+    { controlType: [0, 1, 2], tagType: [1, 4] }, //组合项标签(既往史)
+    { controlType: [0, 1, 6], tagType: [1] },    //化验组合
+    { controlType: [0, 1, 2, 99], tagType: [1] },   //症状推送类型(添加症状)
   ],
-  msg:{
-    imgTip:'无法上传图片,图片大小不可超过2M'
+  msg: {
+    imgTip: '无法上传图片,图片大小不可超过2M'
   },
-  pageSizeArr:[10,50,100,500,1000,5000],         //分页每页显示条数选项
-  pageSize:10,      //初始每页显示条数
-  pageLayout:"total,sizes,prev, pager, next, jumper",        //分页组件成分
+  pageSizeArr: [10, 50, 100, 500, 1000, 5000],         //分页每页显示条数选项
+  pageSize: 10,      //初始每页显示条数
+  pageLayout: "total,sizes,prev, pager, next, jumper",        //分页组件成分
+  drugForm: [
+    // { "name": "","val": "0"},
+    { "name": "注射剂", "val": "1" },
+    { "name": "片剂", "val": "2" },
+    { "name": "缓释片", "val": "3" },
+    { "name": "胶囊剂", "val": "4" },
+    { "name": "滴丸剂", "val": "5" },
+  ],
+  contentTypes: [
+    {
+      "name": "静态信息",
+      "key": 1
+    },
+    {
+      "name": "注意事项",
+      "key": 2
+    },
+    {
+      "name": "临床路径",
+      "key": 3
+    },
+    {
+      "name": "一般治疗",
+      "key": 4
+    },
+
+  ],
+  emData: [
+    {
+      "name": "诊断",
+      "key": 1
+    },
+    {
+      "name": "检验套餐",
+      "key": 3
+    },
+    {
+      "name": "检验细项",
+      "key": 4
+    },
+    {
+      "name": "检查",
+      "key": 5
+    },
+    {
+      "name": "药品",
+      "key": 2
+    },
+
+    {
+      "name": "检查子项",
+      "key": 6
+    },
+    {
+      "name": "手术和操作",
+      "key": 7
+    },
+    // {
+    //     "name":"科室",
+    //     "key":18
+    // },
+  ],
 }

+ 3 - 3
src/api/index.js

@@ -1,9 +1,10 @@
 import axios from 'axios';
 import config from './config.js';
 
-axios.default.timeout = 5000;
+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.241';
+// axios.defaults.baseURL = 'http://192.168.2.241';
 // axios.defaults.baseURL = 'http://192.168.3.117:5050';
 
 const urls = config.urls;
@@ -78,7 +79,6 @@ export default {
       }
     )
   },
-
   /**************************找回密码****************************/
 
   forgetPswGetMobileCode(data) {//忘记密码获取短信验证码

+ 15 - 0
src/api/qualityControl.js

@@ -120,4 +120,19 @@ export default {
   autoTest(param){
     return axios.post(urls.autoTest,param);
   },
+  saveDefaultModuleInfo(param){
+    return axios.post(urls.saveDefaultModuleInfo,param);
+  },
+  saveOrUpdateModuleInfo(param){
+    return axios.post(urls.saveOrUpdateModuleInfo,param);
+  },
+  ControModuleInfo(param){
+    return axios.post(urls.ControModuleInfo,param);
+  },
+  ifNeedUnbind(param){
+    return axios.post(urls.ifNeedUnbind,param);
+  },
+  qcTypeList(param){
+    return axios.post(urls.qcTypeList,param);
+  },
 }

+ 856 - 0
src/components/cdssManage/AddMedicinePrompt.vue

@@ -0,0 +1,856 @@
+<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="MedicinePromptCDSS"
+      ></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="conceptId"
+              @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)"
+            :label="titleChange"
+            prop="titleChange"
+            label-width="160px"
+          >
+            <el-input v-model="form.titleChange"></el-input>
+          </el-form-item>
+          <p class="line"></p>
+          <InfoParagraph
+            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"
+            ref="subForm"
+            @add="addParagraph(i)"
+            @del="delParagraph"
+            @reOrder="reOrder"
+            :showType="showType"
+          ></InfoParagraph>
+          <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/cdss.js';
+import InfoParagraph from './MedicineInfoPg';
+import config from '@api/config';
+
+export default {
+  name: 'AddMedicinePrompt',
+  components: {
+    InfoParagraph
+  },
+  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.length > 30) {
+                callback(new Error('标题名称不能超过30字'));
+              } else {
+                callback();
+              }
+            },
+            trigger: 'change'
+          }
+        ],
+        fileList: [
+          { required: true, message: '请上传文件', trigger: 'change' }
+        ],
+        titleChange: [{ 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手术和操作
+      editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
+      startCount: -1,
+      isSaveSuccess: false // 是否保存成功
+    };
+  },
+  watch: {
+    showType: {
+      handler(newVal, oldVal) {
+        // console.log('newVal============', newVal, 'oldVal============', 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 && this.changeWord(data);
+      api
+        .getTremList({ 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.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
+          ? '注意事项标题:'
+          : '';
+      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.getAllConcept({ 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) &&
+        isVisFlag
+      ) {
+        //若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
+        this.$refs.groups.clearValidate();
+        this.rules.titleChange.push({
+          required: true,
+          message: '请输入注意事项标题',
+          trigger: 'change'
+        });
+        this.$refs.groups.validateField('titleChange');
+        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.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 ? 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) {
+      api
+        .saveTermPrompts(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: 'MedicinePromptCDSS',
+              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>
+

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

@@ -0,0 +1,341 @@
+<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.name" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">检索</el-button>
+          <!-- <el-button size="mini" type="warning" @click="addRelation">添加方案</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="name" label="医院名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="connect" label="术语关联">
+          <template slot-scope="scope">
+            <el-switch
+              v-model="scope.row.connect"
+              @change="handleStatusChange(scope.row)"
+              :active-value="1"
+              :inactive-value="0"
+              active-color="#4BC4D7"
+              inactive-color="#BBBBBB"
+            ></el-switch>
+            <span class="titlwSwitchStatus">{{scope.row.connect === 1 ? '开' : '关'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="diseaseNum" label="诊断关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('Disease',scope.row)"
+            >{{scope.row.diseaseNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="lisNum" label="检验关联">
+          <template slot-scope="scope">
+            <span class="relation" @click="goRelationPage('Lis',scope.row)">{{scope.row.lisNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="pacsNum" label="检查关联">
+          <template slot-scope="scope">
+            <span class="relation" @click="goRelationPage('Pacs',scope.row)">{{scope.row.pacsNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="drugNum" label="药品关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('DrugManage',scope.row)"
+            >{{scope.row.drugNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="operationNum" label="手术/操作关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('Operation',scope.row)"
+            >{{scope.row.operationNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="transfusionNum" label="输血关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('Fusion',scope.row)"
+            >{{scope.row.transfusionNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="deptNum" label="科室关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('DeptManage',scope.row)"
+            >{{scope.row.deptNum}}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination">
+        <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: 'Plan',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        name: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0
+    };
+  },
+  created() {
+    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: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    async getDataList(isTurnPage) {
+      let params = await 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.getMappingListPageCDSS(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;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    async getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        name: this.filter.name.trim()
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+
+    // 页面跳转
+    goRelationPage(from, 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: from,
+        // params: Object.assign(pam, { from, data: item })
+        params: { data: { ...item } }
+      });
+    },
+
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        name: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+
+    // 医院关联处理
+    handleStatusChange(row) {
+      console.log(row, '=状态');
+      let connectInfo = row.connect == 1 ? '开启' : '关闭';
+      this.$alert(`确定要${connectInfo}${row.name}的术语关联吗?`, '提示', {
+        confirmButtonText: '确定',
+        // cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          api
+            .modifyConnectStatusCDSS({
+              connect: row.connect,
+              id: row.hospitalId
+            })
+            .then(res => {
+              if (res.data.code === '0') {
+                this.getDataList();
+                this.$message({
+                  type: 'success',
+                  message: '操作成功!'
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.getDataList();
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
+        });
+    }
+  }
+};
+</script>
+
+
+<style lang="less" scoped>
+@import '../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.disable {
+  border-color: transparent;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/ .delBtn {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+  /deep/ .confirmBtn2 {
+    position: relative;
+    right: 0px !important;
+  }
+}
+.exportBoxL {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    text-align: left;
+  }
+  /deep/ .el-message-box__btns {
+    // text-align: center;
+    margin-bottom: 24px;
+  }
+  /deep/ .leftbtn {
+    margin-right: 46px;
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/ .cancelSureL {
+    // text-align: center;
+    display: none;
+  }
+  /deep/ .sureL {
+    float: right;
+  }
+}
+.contents {
+  .is-plain {
+    color: #dad7d7;
+  }
+  .is-plain:hover {
+    color: #dad7d7;
+  }
+}
+
+.el-table__row {
+  /deep/ .is-disabled {
+    border-color: transparent !important;
+  }
+}
+.relation {
+  color: #009dd9;
+  cursor: pointer;
+}
+.titlwSwitchStatus {
+  margin-left: 16px;
+}
+</style>

+ 266 - 0
src/components/cdssManage/MedicineInfoPg.vue

@@ -0,0 +1,266 @@
+<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">
+      <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', 'total', 'showType'],
+  name: 'MedicineInfoParagraph',
+  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) {
+      setTimeout(() => {
+        this.rules = {
+          position: [
+            { required: true, message: '请选择内容类型', trigger: 'change' }
+          ],
+          title: [
+            { required: true, message: '请输入段落标题', 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: [
+          { required: true, message: '请输入段落标题', trigger: 'change' },
+          { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
+        ],
+        content: [
+          { required: true, message: '请输入段落内容', trigger: 'change' }
+        ]
+      };
+    }
+  },
+  mounted() {},
+  methods: {
+    reOrder(i) {
+      this.$emit('reOrder', i, this.index);
+    },
+    addEmit() {
+      this.$emit('add');
+    },
+    delEmit() {
+      this.$emit('del', this.index);
+    },
+    // 渲染内容类型
+    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.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>

+ 423 - 0
src/components/cdssManage/MedicinePrompt.vue

@@ -0,0 +1,423 @@
+<template>
+  <div>
+    <crumbs title="医学术语静态知识维护">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="术语分类:" class="selectMedicine">
+          <el-select size="mini" v-model="filter.libType" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in typeList"
+              :label="item.name"
+              :value="item.orderNo"
+              :key="item.orderNo"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="标准术语:">
+          <el-input size="mini" maxlength="50" v-model="filter.term" 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-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="gmtModified" label="操作时间" width="180" ></el-table-column>
+        <el-table-column prop="name" label="标准术语" :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column prop="typeName" label="术语分类" width="120"></el-table-column>
+        <el-table-column prop="title" label="内容概览" width="240" :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column label="状态" width="160">
+          <template slot-scope="scope">
+            <span v-if="scope.row.status===1">启用</span>
+            <span v-if="scope.row.status===0">禁用</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="140">
+          <template slot-scope="scope">
+            <el-button v-if="scope.row.status===0" type="text" size="small" class="is-disabled">修改</el-button>
+            <el-button
+              v-if="scope.row.status===1"
+              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>-->
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              v-if="scope.row.status===0"
+              type="text"
+              size="small"
+              @click="showReuseDialog(scope.row)"
+            >启用</el-button>
+            <el-button
+              v-if="scope.row.status===1"
+              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"
+        class="pagepage pagepage"
+        :page-sizes="pageSizeArr"
+        @size-change="handleSizeChange"
+        :layout="pageLayout"
+        :total="total"
+      ></el-pagination>
+    </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: 'MedicinePrompt',
+  data: function() {
+    return {
+      list: [],
+      cacheData: {},
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      linkIn: [],
+      pays: [],
+      typeList: [],
+      stateList: [
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' }
+      ],
+      searched: false,
+      filter: {
+        term: '',
+        title: '',
+        status: '',
+        libType: ''
+      }
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+      that.getListDicCDSS()
+    });
+    // this.typeList = config.emData;
+    // 非首页 编辑页返回 设置 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: {
+     getListDicCDSS() {
+      api.getListDicCDSS().then(res => {
+        if (res.data.code === '0') {
+          this.typeList = res.data.data && res.data.data['10'];
+        }
+      });
+    },
+
+    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: 'AddMedicinePromptCDSS', 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: 'AddMedicinePromptCDSS',
+        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: 'AddMedicinePrompt',
+        params: Object.assign(pam, { data: row, isCopy: true })
+      });
+    },
+    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
+        .getConceptKnowledgeList(param)
+        .then(res => {
+          loading.close();
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            // 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项  7-手术和操作
+            let temp = [
+              '',
+              '诊断',
+              '药品',
+              '检验套餐',
+              '检验细项',
+              '检查',
+              '检查子项',
+              '手术和操作',
+            ];
+            this.list = data.records = data.records.filter(item => {
+              item.typeName = temp[item.type];
+              return item;
+            });
+            this.cacheData[param.current] = data.records;
+            this.total = data.total;
+            if (this.inCurrentPage !== undefined) {
+              this.currentPage = this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        })
+        .catch(error => {
+          if (error.code === '900010001') {
+            return false;
+          }
+          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(),
+        title: this.filter.title,
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        status: this.filter.status,
+        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, type) {
+      let showInfo = '启用';
+      let btnNameClass = 'confirmBtn1';
+      if (type === 'Del') {
+        showInfo = '禁用';
+        btnNameClass = 'delBtn';
+      }
+
+      this.$alert(msg, '提示', {
+        confirmButtonText: showInfo,
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'cancelBtn',
+        // confirmButtonClass: btnNameClass,
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    showDelDialog(row) {
+      this.showConfirmDialog(
+        '确定禁用该静态知识?',
+        () => {
+          api
+            .delConceptInfo({ 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 => {
+              if (error.code === '900010001') {
+                return false;
+              }
+              this.warning(error);
+            });
+        },
+        'Del'
+      );
+    },
+    showReuseDialog(row) {
+      this.showConfirmDialog(
+        '确定启用该静态知识?',
+        () => {
+          api
+            .delConceptInfo({ 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 => {
+              if (error.code === '900010001') {
+                return false;
+              }
+              this.warning(error);
+            });
+        },
+        'Reuse'
+      );
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+@import '../../less/admin.less';
+.status-span {
+  font-size: 12px;
+  margin-right: 10px;
+  color: unset;
+}
+.dododo {
+  margin-top: 1px !important;
+}
+.pagepage {
+  .el-input.el-input--mini.el-input--suffix input {
+    height: 28px;
+    line-height: 28px;
+  }
+  .el-pagination__sizes {
+    margin-right: 20px !important;
+  }
+}
+.el-message-box {
+  /deep/ .cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/ .delBtn {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+  /deep/ .confirmBtn1 {
+    position: relative;
+    right: 0px !important;
+  }
+}
+
+.selectMedicine {
+  // /deep/ .el-input__suffix-inner {
+  //   position: relative;
+  //   top: -1px;
+  // }
+  /deep/ .el-icon-circle-close {
+    position: relative;
+    // top: -2px;
+    left:12px;
+  }
+}
+
+body {
+  .el-tooltip__popper{
+    max-width: 400px;
+  }
+}
+</style>

+ 415 - 0
src/components/cdssManage/dept/AddDept.vue

@@ -0,0 +1,415 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '科室关联维护--修改关联 | '+ hospitaiName : '科室关联维护--添加关联 | '+ hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="DeptManage"
+    ></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-form-item label="科室编码:" prop="hisCode">
+                <el-input v-model.trim="form.hisCode" clearable style="minWidth: 240px"></el-input>
+              </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"
+                    :value="item"
+                    :title="item"
+                  ></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: 'AddDept',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+        hisCode: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入科室名称', trigger: 'change' },
+          { max: 80, message: '科室名称最多80字', trigger: 'change' }
+        ],
+        hisCode: [{ max: 80, message: '科室编码最多80字', trigger: 'change' }],
+        searchText: [
+          { required: true, message: '请选择科室名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      searchInfo: '',
+      hospitalId: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data, hospitaiName } = this.$route.params;
+    // console.log(data, 'data');
+    this.hospitalId = data && data.hospitalId;
+    this.hospitaiName = hospitaiName;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+      this.form.hisCode = data.hisCode;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.searchInfo = query;
+      this.showDrop = true;
+      let params = {
+        type: 7, //科室
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.deptNames;
+        }
+      });
+    },
+    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, hisCode } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            hisCode: hisCode,
+            hospitalId: this.hospitalId
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .deptIsExistRecord(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.saveOrUpdateDeptRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'DeptManage',
+            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>

+ 531 - 0
src/components/cdssManage/dept/DeptManage.vue

@@ -0,0 +1,531 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <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="hisCode" label="医院科室编码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="hisName" label="医院科室名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准科室名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <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: 'DeptManage',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      fileName: '',
+      formData: {},
+      headers: {},
+      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.dataDeptVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDeptDataMatch(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.getDeptPage(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: 'AddDept',
+        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: 'AddDept',
+        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
+          .deleteDeptRecord({ 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 = '导出中...';
+        //     done()
+        //     api.exportDeptRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '科室关联数据.xls');
+        //           // done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportDeptRecord({ hospitalId: this.hospitalId }).then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '科室关联数据.xls');
+            }
+          });
+        })
+        .catch(() => {});
+    },
+
+    // 导入模板
+    exportModule() {
+      api.exportDeptModule().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];
+      // this.fileName = e.target.files[0].name; // 表单同步显示
+      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.importDeptRecord(formData, header).then(res => {
+        if (res.data.code === '00000001') {
+          this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
+          this.$alert(`导入成功`, '提示', {
+            confirmButtonText: '确定',
+            type: 'success'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            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;
+}
+#upFileMatch {
+  display: none;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+  /deep/.el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.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;
+  }
+}
+.exportConfirm {
+  .cancelSure {
+    display: none;
+  }
+}
+.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>

+ 276 - 0
src/components/cdssManage/disclaimer/AddDisclaimer.vue

@@ -0,0 +1,276 @@
+<!-- 免责声明修改 By_liucf -->
+<template>
+  <div>
+    <crumbs :title="topInfo" :param="$route.params" linkTo="DisclaimerCDSS"></crumbs>
+    <div class="contents">
+      <el-form
+        ref="form"
+        :label-position="labelPosition"
+        :model="form"
+        :rules="rules"
+        label-width="65px"
+        class="add-discl-form"
+      >
+        <el-form-item label="标题:" prop="title" class="discl-title">
+          <el-input v-model="form.title" placeholder="请输入标题" maxlength="30"></el-input>
+        </el-form-item>
+        <el-form-item label="内容:" prop="description" class="discDesc">
+          <el-input
+            type="textarea"
+            :rows="3"
+            placeholder="请输入内容述"
+            v-model="form.description"
+            maxlength="1024"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="归属:" prop="disclaimerCode">
+          <el-select v-model="form.disclaimerCode" clearable placeholder="请选择">
+            <el-option v-for="item in options" :key="item.key" :label="item.name" :value="item.key"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-button
+          class="disclButn"
+          size="small"
+          :disabled="saveDisable"
+          type="primary"
+          @click="addDiscl"
+        >{{text}}</el-button>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+export default {
+  name: 'AddDisclaimerCDSS',
+  data() {
+    const titleVaild = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('请输入标题'));
+      }
+      if (value.length >= 30) {
+        this.form.name = value.substr(0, 30);
+        this.$message({
+          showClose: true,
+          type: 'warning',
+          message: '标题已超过最大字数限制'
+        });
+      }
+      callback();
+    };
+    const descVaild = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('请输入内容'));
+      }
+      if (value.length >= 1024) {
+        this.form.name = value.substr(0, 1024);
+        this.$message({
+          showClose: true,
+          type: 'warning',
+          message: '内容已超过最大字数限制'
+        });
+      }
+      callback();
+    };
+    const disclVaild = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('请选择归属'));
+      }
+      callback();
+    };
+    return {
+      id: null,
+      labelPosition: 'right',
+      options: [],
+      form: {
+        title: '',
+        description: '', //内容
+        disclaimerCode: '' //归属
+      },
+      rules: {
+        title: [
+          { required: true, validator: titleVaild, trigger: ['change'] },
+          { required: true, message: '请输入标题', trigger: ['blur', 'change'] }
+        ],
+        description: [
+          { required: true, validator: descVaild, trigger: ['change'] },
+          { required: true, message: '请输入内容', trigger: ['blur', 'change'] }
+        ],
+        disclaimerCode: [
+          {
+            required: true,
+            validator: disclVaild,
+            trigger: ['blur', 'change']
+          },
+          { required: true, message: '请选择归属', trigger: ['blur', 'change'] }
+        ]
+      },
+      text: '确定添加',
+      topInfo: '免责声明维护-添加免责声明',
+      toast: '添加成功',
+      saveDisable: false
+    };
+  },
+  created() {
+    // const params = JSON.parse(localStorage.getItem('knowledgeEnumsData'));
+    // this.options = params.disclaimerCodeEnum;
+    // api.getKlmEnumsDataCDSS().then(res => {
+    //   console.log(res, '===========');
+    //   if (res.data.code === '0') {
+    //     this.options = res.data.data.disclaimerCodeAllEnum;
+    //   }
+    // });
+    // 修改
+    // console.log(this.$route.params, 'this.$route.params');
+    this.options = this.$route.params.options
+    const data = this.$route.params.info;
+
+    if (data) {
+      this.id = data.id;
+      this.text = '确定修改';
+      this.topInfo = '免责声明维护-修改';
+      this.toast = '修改成功';
+      this.form.title = data.title;
+      this.form.description = data.description;
+      this.form.disclaimerCode = +data.disclaimerCode;
+      
+    }
+  },
+  methods: {
+    addDiscl() {
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          // 过滤空格
+          if (!this.form.title.trim() || !this.form.description.trim()) {
+            this.$message({
+              message: '必填项不能为空',
+              type: 'warning'
+            });
+            return;
+          }
+          // 有id是修改,没有id是添加
+          if (this.id) {
+            let code = this.form.disclaimerCode;
+            // 修改没有操作时 code为字符串,需转成code
+            if (typeof code == 'string') {
+              for (let i in this.options) {
+                if (this.options[i].name == code) {
+                  code = this.options[i].key;
+                }
+              }
+            }
+            let param = {
+              id: this.id,
+              title: this.form.title.trim(),
+              description: this.form.description.trim(),
+              disclaimerCode: code
+            };
+            this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+            api
+              .updateDisclaimerInformationsCDSS(param)
+              .then(res => {
+                if (res.data.code == '0') {
+                  this.$message({
+                    showClose: true,
+                    message: this.toast,
+                    type: 'success'
+                  });
+                  this.$router.push({
+                    name: 'DisclaimerCDSS',
+                    params: Object.assign({}, this.$route.params, {
+                      currentPage: 1
+                    })
+                  });
+                } else {
+                  this.$message({
+                    showClose: true,
+                    message: res.data.msg,
+                    type: 'warning'
+                  });
+                }
+                this.saveDisable = false;
+              })
+              .catch(error => {
+                this.$message({
+                  showClose: true,
+                  message: '服务器正忙...',
+                  type: 'warning'
+                });
+              });
+          } else {
+            let param = {
+              title: this.form.title.trim(),
+              description: this.form.description.trim(),
+              disclaimerCode: this.form.disclaimerCode
+            };
+            this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+            api
+              .addDisclaimerInfosCDSS(param)
+              .then(res => {
+                if (res.data.code == '0') {
+                  this.$message({
+                    showClose: true,
+                    message: this.toast,
+                    type: 'success'
+                  });
+                  this.$router.push({
+                    name: 'DisclaimerCDSS',
+                    params: Object.assign({}, this.$route.params, {
+                      currentPage: 1
+                    })
+                  });
+                } else {
+                  this.$message({
+                    showClose: true,
+                    message: res.data.msg,
+                    type: 'warning'
+                  });
+                }
+                this.saveDisable = false;
+              })
+              .catch(error => {
+                this.$message({
+                  showClose: true,
+                  message: '服务器正忙...',
+                  type: 'warning'
+                });
+              });
+          }
+        }
+      });
+    },
+    back() {
+      this.$router.go(-1);
+    }
+  }
+};
+</script>
+
+<style lang="less" >
+@import '../../../less/admin.less';
+
+.add-discl-form {
+  background: #fff;
+  padding: 20px 20px 30px;
+  .discl-title {
+    width: 500px;
+  }
+}
+
+// .el-button{
+.disclButn {
+  margin: 30px 0 0 20px;
+}
+
+.discDesc {
+  // .el-textarea{
+  //   width: 97%;
+  // }
+  margin-top: 10px;
+  margin-bottom: 25px;
+  .el-form-item__error {
+    top: 70px;
+  }
+}
+</style>

+ 321 - 0
src/components/cdssManage/disclaimer/Disclaimer.vue

@@ -0,0 +1,321 @@
+<template>
+  <div>
+    <crumbs title="免责声明维护">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="标题:">
+          <el-input size="mini" v-model="filter.title" placeholder="输入标题"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">确认</el-button>
+          <el-button size="mini" type="warning" @click="addDisclInfo" style="margin:0 10px">添加</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="gmtCreate" label="操作时间" :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column prop="modifier" label="操作人"></el-table-column>
+        <el-table-column prop="title" label="标题" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="disclaimerCode" label="归属">
+          <template slot-scope="scope">
+            <span>{{ renderDisclaimerCode(scope.row) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="状态">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              :class="{forbid:scope.row.status==0}"
+              @click="toOpen(scope.row)"
+            >启用</el-button>
+            <!-- <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              :class="['delete',{'forbid':scope.row.status==1}]"
+              @click="toClose(scope.row)"
+            >停用</el-button> -->
+          </template>
+        </el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="toEditDiscl(scope.row)">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              :class="['delete',{'forbid':scope.row.status==1}]"
+              @click="showDelDialog(scope.row)"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="详情">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="getDetail(scope.row)">详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        v-if="total>pageSize"
+        :current-page.sync="currentPage"
+        @current-change="currentChange"
+        background
+        :page-size="pageSize"
+        layout="total,prev, pager, next, jumper"
+        :total="total"
+      ></el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+
+export default {
+  name: 'DisclaimerCDSS',
+  data: function() {
+    return {
+      list: [],
+      cacheData: {},
+      currentPage: 1,
+      pageSize: 10,
+      total: 0,
+      linkIn: [],
+      pays: [],
+      searched: false,
+      filter: {
+        title: ''
+      },
+      options: []
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+
+    api.getKlmEnumsDataCDSS().then(res => {
+      // console.log(res, '===========');
+      if (res.data.code === '0') {
+        this.options = res.data.data.disclaimerCodeAllEnum;
+      }
+    });
+  },
+  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: {
+    renderDisclaimerCode(row) {
+      let showInfo = '';
+      this.options &&
+        this.options.forEach(item => {
+          if (item.key == row.disclaimerCode) {
+            showInfo = item.name;
+          }
+        });
+
+      return showInfo;
+    },
+
+    addDisclInfo() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage };
+      // this.$router.push({ name: 'AddDisclaimerCDSS', params: pam });
+      this.$router.push({
+        name: 'AddDisclaimerCDSS',
+        params: Object.assign(pam, { options: this.options })
+      });
+    },
+    toEditDiscl(row) {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage };
+      this.$router.push({
+        name: 'AddDisclaimerCDSS',
+        params: Object.assign(pam, { info: row, options: this.options })
+      });
+    },
+    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
+        .getDisclaimerPagesCDSS(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);
+        });
+    },
+    getDetail(item) {
+      this.$router.push({
+        name: 'DisclaimerDetailCDSS',
+        params: { info: item, options: this.options }
+      });
+    },
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.filter.title = '';
+      }
+      const param = {
+        title: this.filter.title.trim(),
+        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) {
+      // 启用状态下不能删除
+      if (item.status == 1) {
+        return;
+      }
+      this.showConfirmDialog('是否删除该免责声明?', () => {
+        api
+          .cancelDisclaimerInformationsCDSS({ id: item.id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.filter = {
+                  title: ''
+                };
+              }
+              this.warning(res.data.msg || '操作成功', 'success');
+              this.getDataList();
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            this.warning(error);
+          });
+      });
+    },
+    toOpen(item) {
+      // status=0停用,status=1启用
+      if (item.status == 0) {
+        this.showConfirmDialog('是否启用该免责声明?', () => {
+          api
+            .startDisclaimerInformationsCDSS({ id: item.id })
+            .then(res => {
+              if (res.data.code == 0) {
+                //恢复成功后跳转到筛选条件的首页
+                this.currentPage = 1;
+                this.$message({
+                  type: 'success',
+                  message: res.data.msg || '启用成功'
+                });
+                this.getDataList();
+              }
+            })
+            .catch(error => {
+              this.warning(error);
+            });
+        });
+      }
+    },
+    toClose(item) {
+      if (item.status == 1) {
+        this.showConfirmDialog('是否停用该免责声明?', () => {
+          api
+            .endDisclaimerInformationsCDSS({ id: item.id })
+            .then(res => {
+              if (res.data.code == 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.msg || '停用成功'
+                });
+                this.getDataList();
+              }
+            })
+            .catch(error => {
+              this.warning(error);
+            });
+        });
+      }
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.delete {
+  color: red !important;
+}
+.forbid {
+  color: #bfbfbf !important;
+}
+</style>

+ 62 - 0
src/components/cdssManage/disclaimer/DisclaimerDetail.vue

@@ -0,0 +1,62 @@
+<template>
+  <div>
+    <crumbs title="免责声明维护-详情" linkTo="DisclaimerCDSS"></crumbs>
+    <div class="contents">
+      <div class="deptbox">
+        <p class="titl">标题</p>
+        <p>{{data.title}}</p>
+        <p class="titl marg">内容</p>
+        <p v-html="data.description">{{data.description}}</p>
+        <p class="titl marg">归属</p>
+        <p>{{renderDisclaimerCode(data)}}</p>
+      </div>
+    </div>
+  </div>
+</template>
+<script type="text/javascript">
+export default {
+  name: 'DisclaimerDetailCDSS',
+  data() {
+    return {
+      data: {
+        options: []
+      }
+    };
+  },
+  created() {
+    // console.log(this.$route.params.options);
+    this.options = this.$route.params.options;
+    this.data = this.$route.params.info;
+  },
+  methods: {
+    renderDisclaimerCode(row) {
+      let showInfo = '';
+      this.options &&
+        this.options.forEach(item => {
+          if (item.key == row.disclaimerCode) {
+            showInfo = item.name;
+          }
+        });
+
+      return showInfo;
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.deptbox {
+  // width: 100%;
+  background: #fff;
+  padding: 20px 20px 30px;
+  font-size: 14px;
+  // color: #545455;
+  text-align: left;
+  .titl {
+    font-weight: bold;
+  }
+  .marg {
+    margin-top: 20px;
+  }
+}
+</style>

+ 432 - 0
src/components/cdssManage/disease/AddDisease.vue

@@ -0,0 +1,432 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '诊断关联维护--修改关联 | '+ hospitaiName : '诊断关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Disease"
+    ></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 in uniqueNameList"
+                    :key="item.icd10Code"
+                    :label="item.name"
+                    :value="item"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="诊断名称预览:">
+                <!-- <span class="previewInfo">{{!isEdit ? form.searchText.name : form.searchText}}</span> -->
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+              <el-form-item label="ICD编码:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.icdCode}}</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: 'AddDisease',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+        icdCode: ''
+      },
+
+      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;
+    // console.log(data, 'data===================');
+    this.hospitalId = data && data.hospitalId;
+    this.hospitaiName = hospitaiName;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+      this.form.icdCode = data.icdCode;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 4, //诊断
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.diseaseNames;
+        }
+      });
+    },
+    changeWord(newValue) {
+      this.form.searchText = newValue.name;
+      this.form.icdCode = newValue.icd10Code;
+    },
+
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+    // 获取焦点
+    handleFocus() {},
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+      this.form.icdCode = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName, icdCode } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            icdCode: icdCode,
+            hospitalId: this.hospitalId
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .diseaseIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '保存成功', 'success');
+          } else {
+            // 已存在,提示修改
+            this.warning('该条关联已存在,无法添加');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateDiseaseRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Disease',
+            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;
+    }
+  }
+}
+// body {
+//   .el-select-dropdown {
+//     /deep/ .el-select-dropdown__item {
+//       span {
+//         color: #333;
+//       }
+//     }
+//     ul {
+//       max-width: 200px;
+//     }
+//   }
+// }
+</style>

+ 520 - 0
src/components/cdssManage/disease/Disease.vue

@@ -0,0 +1,520 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <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="icdCode" label="ICD-10编码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准诊断名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <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: 'Disease', //化验大小项和公表维护
+  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.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(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.getLisMappingPage(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(),
+        icdCode: '',
+        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: 'AddDisease',
+        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: 'AddDisease',
+        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: 'cancelBtn1',
+        // confirmButtonClass: 'confirmC1',
+        type: 'warning',
+        customClass: 'cdssMessage'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteDiseaseRecord({ 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: 'exportBox',
+        title: '提示',
+        type: 'warning'
+      })
+        .then(() => {
+          api.exportDiseaseRecord({ 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.exportDiseaseModule().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.importDiseaseRecord(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">
+@import '../../../less/admin.less';
+</style>
+
+<style lang="less" scoped>
+.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;
+}
+.cdssMessage {
+  /deep/.el-message-box__btns {
+    .cancelBtn1 {
+      background-color: #d7d7d7 !important;
+      border-color: transparent !important;
+    }
+    .confirmC1 {
+      background-color: #ff545b !important;
+      border-color: transparent !important;
+    }
+  }
+}
+.exportBox {
+  /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>

+ 445 - 0
src/components/cdssManage/drug/AddDrug.vue

@@ -0,0 +1,445 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '药品关联维护--修改关联 | '+ hospitaiName : '药品关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="DrugManage"
+    ></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-form-item label="药品剂型:">
+                <el-select
+                  v-model="form.form"
+                  placeholder="请选择"
+                  clearable
+                  style="width:100%;minWidth: 240px"
+                >
+                  <el-option
+                    v-for="item in drugList"
+                    :key="item.val"
+                    :label="item.name"
+                    :value="item.name"
+                  ></el-option>
+                </el-select>
+              </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: 'AddDrug',
+  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, //下拉框显示文字
+      drugForm: config.drugForm,
+      drugList: [],
+      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;
+    }
+
+    this.getListDicCDSS()
+  },
+  methods: {
+    getListDicCDSS() {
+      api.getListDicCDSS().then(res => {
+        if (res.data.code === '0') {
+          let dragData = []
+          res.data.data && res.data.data['9'].forEach(item=>{
+            if(item.val !== '0'){
+              dragData.push(item)
+            }
+          })
+          this.drugList = dragData
+        }
+      });
+    },
+
+
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 5, //药品
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.drugNames;
+        }
+      });
+    },
+    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
+        .drugIsExistRecord(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.saveOrUpdateDrugRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'DrugManage',
+            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>

+ 533 - 0
src/components/cdssManage/drug/DrugManage.vue

@@ -0,0 +1,533 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <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="form" 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: 'DrugManage', //化验大小项和公表维护
+  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.dataDrugVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDrugDataMatch(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.getDrugPage(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: 'AddDrug',
+        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: 'AddDrug',
+        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
+          .deleteDrugRecord({ 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.exportDrugRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '药品关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportDrugRecord({ 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.exportDrugModule().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.importDrugRecord(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>

+ 405 - 0
src/components/cdssManage/fusion/AddFusion.vue

@@ -0,0 +1,405 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '输血关联维护--修改关联 | ' + hospitaiName : '输血关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Fusion"
+    ></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"
+                    :value="item"
+                    :title="item"
+                  ></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: 'AddFusion',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      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, //下拉框显示文字
+      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;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 8, //输血
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.transfusionNames;
+        }
+      });
+    },
+    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 } = 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
+        .fusionIsExistRecord(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.saveOrUpdateFusionRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Fusion',
+            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>

+ 529 - 0
src/components/cdssManage/fusion/Fusion.vue

@@ -0,0 +1,529 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <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: 'Fusion', //化验大小项和公表维护
+  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.dataFusionVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precFusionDataMatch(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.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) {
+      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: 'AddFusion',
+        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: 'AddFusion',
+        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
+          .deleteFusionRecord({ 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.exportFusionRecord({ 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.exportFusionModule().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.importFusionRecord(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>

+ 273 - 0
src/components/cdssManage/hospital/AddHospital.vue

@@ -0,0 +1,273 @@
+<template>
+  <div class="AddPlanWrapper clearfix">
+    <crumbs
+      :title="!isEdit ? '医院管理-添加医院' : '医院管理-修改医院'"
+      class="topBack"
+      :param="$route.params"
+      linkTo="HospitalCDSS"
+    ></crumbs>
+    <div class="AddPlanBox">
+      <el-row :gutter="20">
+        <el-col :span="16">
+          <el-form ref="form" :model="form" label-width="110px" :rules="rules">
+            <el-form-item label="医院名称" prop="hospitalName">
+              <el-input v-model="form.hospitalName" placeholder="2-30位,可输入汉字、字母、数字和下划线" @blur="handlePinyin($event)"></el-input>
+            </el-form-item>
+            <el-form-item label="医院名称拼音" prop="spell">
+              <el-input v-model="form.spell" placeholder="请输入医院名称拼音"></el-input>
+            </el-form-item>
+            <!-- <el-form-item label="医院编码" prop="hospitalCode">
+              <el-input v-model="form.hospitalCode" placeholder="4-15位,可输入字母、数字和下划线"></el-input>
+            </el-form-item> -->
+            <el-form-item label="医院地址" prop="address">
+              <el-input type="textarea" :rows="2" v-model="form.address" placeholder="请输入医院地址"></el-input>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit" :disabled="saveDisable">确定</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import pinyin from '../../../js/Convert_Pinyin.js';
+export default {
+  name: 'AddHospital',
+  data() {
+    var numreg = /^[a-zA-Z0-9_\u4e00-\u9fa5]+$/;
+    var numreg1 = /^[0-9a-zA-Z_]{1,}$/;
+    var validatePass = (rule, value, callback) => {
+      if (!numreg.test(value)) {
+        callback(new Error('汉字、字母、数字和下划线'));
+      } else {
+        callback();
+      }
+    };
+    var validatePass1 = (rule, value, callback) => {
+      if (!numreg1.test(value)) {
+        callback(new Error('字母、数字和下划线'));
+      } else {
+        callback();
+      }
+    };
+    return {
+      form: {
+        hospitalName: '',
+        spell: '',
+        // hospitalCode: '',
+        address: ''
+      },
+      rules: {
+        hospitalName: [
+          { required: true, message: '医院名称不能为空', trigger: 'change' },
+          { min: 2, max: 30, message: '长度2-30位', trigger: 'blur' },
+          { required: true, validator: validatePass, trigger: 'blur' }
+        ],
+        // hospitalCode: [
+        //   { required: true, message: '医院编码不能为空', trigger: 'change' },
+        //   { min: 4, max: 15, message: '长度4-15位', trigger: 'blur' },
+        //   { required: true, validator: validatePass1, trigger: 'blur' }
+        // ],
+        address:[
+          {  max: 200, message: '长度最多200字', trigger: 'change' },
+        ],
+        spell:[
+          {  max: 30, message: '医院名称拼音长度最多30位', trigger: 'change' },
+        ],
+      },
+      hospitalId: '',
+      isEdit: false,
+      saveDisable: false
+    };
+  },
+  created() {
+    const { isEdit, data } = this.$route.params;
+    this.isEdit = isEdit;
+    if (isEdit) {
+      this.form.hospitalName = data.name;
+      this.form.spell = data.spell;
+      // this.form.hospitalCode = data.code;
+      this.form.address = data.address;
+      this.hospitalId = data.id;
+    }
+  },
+
+  methods: {
+    onSubmit() {
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          this.saveDisable = true;
+          let params = {
+            connect: 1,
+            address: this.form.address,
+            name: this.form.hospitalName,
+            spell: this.form.spell,
+            // code: this.form.hospitalCode
+          };
+          if (this.isEdit) {
+            params = Object.assign({}, params, {
+              id: this.hospitalId
+            });
+          }
+          api.saveOrUpdateHosRecordCDSS(params).then(res => {
+            if (res.data.code === '0') {
+              this.$message({
+                showClose: true,
+                message: '保存成功',
+                type: 'success',
+                duration: 1000
+              });
+              this.isSaveSuccess = true; // 保存成功,可正常退出
+              this.$router.push({
+                name: 'HospitalCDSS',
+                params: Object.assign({}, this.$route.params, {
+                  currentPage: 1
+                })
+              });
+            } else {
+              this.$message({
+                showClose: true,
+                message: res.data.msg,
+                type: 'error',
+                duration: 1000
+              });
+            }
+            this.saveDisable = false;
+          });
+        }
+      });
+    },
+
+    // 处理拼音转换
+    handlePinyin(e){
+      // console.log(e.target.value,'==========');
+      this.form.spell = pinyin.getCamelChars(e.target.value)
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+.AddPlanWrapper {
+  min-width: 940px;
+  .AddPlanBox {
+    padding: 20px 60px 120px 60px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .title {
+    background-color: #f2f2f2;
+    display: flex;
+    .handleIcon {
+      width: 30px;
+      cursor: pointer;
+      height: 40px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      img {
+        width: 20px;
+        height: 20px;
+      }
+      .open {
+        transform: rotate(180deg);
+      }
+      .close {
+        transform: rotate(0deg);
+      }
+    }
+    .titlwSwitch {
+      width: 120px;
+    }
+    h4 {
+      flex: 1;
+    }
+    .titlwSwitchStatus {
+      margin-left: 16px;
+    }
+  }
+  .sub {
+    .planItem {
+      display: flex;
+      .sort {
+        width: 60px;
+        display: flex;
+        .top {
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          width: 30px;
+          cursor: pointer;
+          img {
+            width: 10px;
+            height: 14px;
+          }
+        }
+        .down {
+          width: 30px;
+          cursor: pointer;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          img {
+            width: 10px;
+            height: 14px;
+          }
+        }
+      }
+      .openOrClose {
+        display: flex;
+        flex: 1;
+        .planInfo {
+          width: 140px;
+        }
+        .switch {
+        }
+        .planStatus {
+          margin-left: 16px;
+        }
+      }
+      .showNum {
+        display: flex;
+        width: 160px;
+        /deep/.el-input--small {
+          width: 60px;
+        }
+      }
+    }
+  }
+  .el-button {
+    float: right;
+  }
+  .plus-icon-enter-active {
+    transition: all 0.8s;
+  }
+  .plus-icon-enter {
+    opacity: 0;
+    margin-top: 12px;
+  }
+  .plus-icon-leave-active {
+    transition: all 0.8s;
+  }
+  .plus-icon-leave-active {
+    opacity: 0;
+    margin-top: 12px;
+  }
+}
+.leaveBox {
+  /deep/ .leaveBtn {
+    // margin-right: 46px;
+    background-color: #d7d7d7 !important;
+    border-color: transparent;
+  }
+}
+</style>

+ 380 - 0
src/components/cdssManage/hospital/Hospital.vue

@@ -0,0 +1,380 @@
+<template>
+  <div>
+    <crumbs title="医院管理" style="min-width: 960px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="医院名称:" class="selectMedicine">
+          <el-select size="mini" v-model="filter.hospitalName" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in HospitalInfoList"
+              :label="item.name"
+              :value="item.name"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </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>
+    </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="code" label="医院编码" width="180"></el-table-column> -->
+        <el-table-column :resizable="false" prop="name" label="医院名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="spell" label="医院名称拼音" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="address" label="医院地址" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="status"
+          label="状态"
+          show-overflow-tooltip
+          width="180"
+        >
+          <template slot-scope="scope">{{scope.row.status == 1 ? '已启用': '已禁用'}}</template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="startOrEndHos(scope.row,'start')"
+              type="text"
+              size="small"
+              v-if="scope.row.status === 0"
+            >启用</el-button>
+            <el-button
+              @click="startOrEndHos(scope.row,'end')"
+              class="delete"
+              type="text"
+              size="small"
+              v-if="scope.row.status === 1"
+            >禁用</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button @click="showDelDialog(scope.row)" 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: 'HospitalCDSS',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hospitalName: '' // 医院名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      HospitalInfoList: []
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+
+    this._getHospitalInfo();
+  },
+  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();
+    },
+
+    // 启用/禁用医院
+    startOrEndHos(row, type) {
+      let msg = '';
+      let status = 1;
+      if (type === 'start') {
+        msg = `确定要启用${row.name}吗?`;
+        status = 1;
+      } else {
+        msg = `确定要禁用${row.name}吗?`;
+        status = 0;
+      }
+
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+        .then(() => {
+          api
+            .changeStatusCDSS({
+              id: row.id,
+              status: status
+            })
+            .then(res => {
+              if (res.data.code === '0') {
+                this.getDataList();
+                this.$message({
+                  showClose: true,
+                  message: '保存成功',
+                  type: 'success',
+                  duration: 1000
+                });
+              }
+            });
+        })
+        .catch(() => {});
+    },
+
+    // 获取列表数据
+    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.getHospitalPageCDSS(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,
+        name: this.filter.hospitalName.trim()
+      };
+      return param;
+    },
+
+    // 获取医院下拉列表
+    _getHospitalInfo() {
+      api.getHospitalInfo().then(res => {
+        if (res.data.code === '0') {
+          this.HospitalInfoList = res.data.data;
+        }
+      });
+    },
+
+    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: 'AddHospitalCDSS',
+        params: Object.assign(pam, {
+          isEdit: false
+        })
+      });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    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: 'AddHospitalCDSS',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item }
+          // hospitaiName: this.hospitaiName
+        })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hospitalName: ''
+      };
+    },
+
+    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(row) {
+      // console.log(row); return 
+      this.showConfirmDialog(`医院删除后无法恢复,确定要删除${row.name}吗?`, () => {
+        api
+          .deleteHosRecordCDSS({ id: row.id })
+          .then(res => {
+            // console.log(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._getHospitalInfo();  // 更新下拉列表
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    }
+  }
+};
+</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;
+}
+.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>

+ 254 - 0
src/components/cdssManage/hospitalUser/AddHospitalUser.vue

@@ -0,0 +1,254 @@
+<template>
+  <div class="AddPlanWrapper clearfix">
+    <crumbs title="医院用户管理-添加用户" class="topBack" :param="$route.params" linkTo="HospitalUserCDSS"></crumbs>
+    <div class="AddPlanBox">
+      <el-row :gutter="20">
+        <el-col :span="16">
+          <el-form ref="form" :model="form" label-width="110px" :rules="rules">
+            <el-form-item label="所属医院:" class="selectMedicine" prop="hospitalId">
+              <el-select v-model="form.hospitalId" placeholder="请选择" clearable style="width: 100%">
+                <el-option
+                  v-for="item in HospitalInfoList"
+                  :label="item.name"
+                  :value="item.id"
+                  :key="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="用户名" prop="userName">
+              <el-input v-model="form.userName" placeholder="用作登录,6-20位,可输入字母、数字和符号"></el-input>
+            </el-form-item>
+
+            <el-form-item label="联系人姓名">
+              <el-input v-model="form.linkman" placeholder="请输入"></el-input>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit" :disabled="saveDisable">确定</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+export default {
+  name: 'AddHospitalUserCDSS',
+  data() {
+    var numreg = /^[a-zA-Z0-9_\u4e00-\u9fa5]+$/;
+    var numreg1 = /^[0-9a-zA-Z_]{1,}$/;
+    var validatePass = (rule, value, callback) => {
+      if (!numreg.test(value)) {
+        callback(new Error('汉字、字母、数字和下划线'));
+      } else {
+        callback();
+      }
+    };
+    var validatePass1 = (rule, value, callback) => {
+      if (!numreg1.test(value)) {
+        callback(new Error('字母、数字和下划线'));
+      } else {
+        callback();
+      }
+    };
+    return {
+      form: {
+        hospitalId: '',
+        userName: '',
+        linkman: ''
+      },
+      rules: {
+        userName: [
+          { required: true, message: '用户名不能为空', trigger: 'change' },
+          { min: 6, max: 20, message: '长度6-20位', trigger: 'blur' },
+          { required: true, validator: validatePass, trigger: 'blur' }
+        ],
+        hospitalId: [
+          { required: true, message: '请选择所属医院', trigger: 'change' },
+          // { min: 2, max: 30, message: '长度4-15位', trigger: 'blur' },
+          // { required: true, validator: validatePass1, trigger: 'blur' }
+        ]
+      },
+
+      saveDisable: false,
+      HospitalInfoList: []
+    };
+  },
+  created() {
+    this._getHospitalInfo();
+  },
+
+  methods: {
+    onSubmit() {
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          this.saveDisable = true;
+          let params = {
+            hospitalId: this.form.hospitalId,
+            linkman: this.form.linkman,
+            username: this.form.userName
+          };
+
+          api.addUserRoleCDSS(params).then(res => {
+            if (res.data.code === '0') {
+              this.$message({
+                showClose: true,
+                message: '保存成功',
+                type: 'success',
+                duration: 1000
+              });
+              this.isSaveSuccess = true; // 保存成功,可正常退出
+              this.$router.push({
+                name: 'HospitalUserCDSS',
+                params: Object.assign({}, this.$route.params, {
+                  currentPage: 1
+                })
+              });
+            } else {
+              this.$message({
+                showClose: true,
+                message: res.data.msg,
+                type: 'error',
+                duration: 1000
+              });
+            }
+            this.saveDisable = false;
+          });
+        }
+      });
+    },
+
+    // 获取医院下拉列表
+    _getHospitalInfo() {
+      api.getHospitalInfo().then(res => {
+        if (res.data.code === '0') {
+          this.HospitalInfoList = res.data.data;
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+.AddPlanWrapper {
+  min-width: 940px;
+  .AddPlanBox {
+    padding: 20px 60px 120px 60px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .title {
+    background-color: #f2f2f2;
+    display: flex;
+    .handleIcon {
+      width: 30px;
+      cursor: pointer;
+      height: 40px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      img {
+        width: 20px;
+        height: 20px;
+      }
+      .open {
+        transform: rotate(180deg);
+      }
+      .close {
+        transform: rotate(0deg);
+      }
+    }
+    .titlwSwitch {
+      width: 120px;
+    }
+    h4 {
+      flex: 1;
+    }
+    .titlwSwitchStatus {
+      margin-left: 16px;
+    }
+  }
+  .sub {
+    .planItem {
+      display: flex;
+      .sort {
+        width: 60px;
+        display: flex;
+        .top {
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          width: 30px;
+          cursor: pointer;
+          img {
+            width: 10px;
+            height: 14px;
+          }
+        }
+        .down {
+          width: 30px;
+          cursor: pointer;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          img {
+            width: 10px;
+            height: 14px;
+          }
+        }
+      }
+      .openOrClose {
+        display: flex;
+        flex: 1;
+        .planInfo {
+          width: 140px;
+        }
+        .switch {
+        }
+        .planStatus {
+          margin-left: 16px;
+        }
+      }
+      .showNum {
+        display: flex;
+        width: 160px;
+        /deep/.el-input--small {
+          width: 60px;
+        }
+      }
+    }
+  }
+  .el-button {
+    float: right;
+  }
+  .plus-icon-enter-active {
+    transition: all 0.8s;
+  }
+  .plus-icon-enter {
+    opacity: 0;
+    margin-top: 12px;
+  }
+  .plus-icon-leave-active {
+    transition: all 0.8s;
+  }
+  .plus-icon-leave-active {
+    opacity: 0;
+    margin-top: 12px;
+  }
+}
+.leaveBox {
+  /deep/ .leaveBtn {
+    // margin-right: 46px;
+    background-color: #d7d7d7 !important;
+    border-color: transparent;
+  }
+}
+</style>

+ 340 - 0
src/components/cdssManage/hospitalUser/HospitalUser.vue

@@ -0,0 +1,340 @@
+<template>
+  <div>
+    <crumbs title="医院用户管理" style="min-width: 960px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="所属医院:" class="selectMedicine">
+          <el-select size="mini" v-model="filter.hospitalId" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in HospitalInfoList"
+              :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-button size="mini" type="warning" @click="addRelation">添加用户</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="gmModified" label="操作时间" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="modifier" label="操作人" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="hospitalName" label="所属医院" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="username" label="用户名" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="linkman" label="联系人姓名" show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column
+          :resizable="false"
+          prop="planStatus"
+          label="状态"
+          show-overflow-tooltip
+          width="180"
+        >
+          <template slot-scope="scope">{{scope.row.status == 1 ? '已启用': '已禁用'}}</template>
+        </el-table-column> -->
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <!-- <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>-->
+            <el-button @click="showDelDialog(scope.row)" 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: 'HospitalUserCDSS',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hospitalId: '' // 医院id
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      HospitalInfoList: []
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+    this._getHospitalInfo();
+  },
+  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.getUserRoleCDSS(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;
+        }
+      });
+    },
+
+    // 获取医院下拉列表
+    _getHospitalInfo() {
+      api.getHospitalInfo().then(res => {
+        if (res.data.code === '0') {
+          this.HospitalInfoList = res.data.data;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      const { data } = this.$route.params;
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hospitalId: this.filter.hospitalId
+        // pages: 1
+      };
+      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: 'AddHospitalUserCDSS',
+        params: Object.assign(pam, {
+          isEdit: false
+        })
+      });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    // 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: 'AddHospitalCDSS',
+    //     params: Object.assign(pam, {
+    //       isEdit: true,
+    //       data: { ...item }
+    //       // hospitaiName: this.hospitaiName
+    //     })
+    //   });
+    // },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hospitalId: ''
+      };
+    },
+
+    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(row) {
+      this.showConfirmDialog('是否删除该用户?', () => {
+        api
+          .cancelUserRoleCDSS({
+            hospitalId: row.hospitalId,
+            id: row.id,
+            userId: row.userId
+          })
+          .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);
+          });
+      });
+    }
+  }
+};
+</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;
+}
+.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;
+  }
+}
+.selectMedicine {
+  /deep/ .el-input__suffix-inner {
+    position: relative;
+    top: -1px;
+  }
+  /deep/ .el-icon-circle-close {
+    position: relative;
+    top: -2px;
+  }
+}
+</style>

+ 469 - 0
src/components/cdssManage/lis/AddLis.vue

@@ -0,0 +1,469 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '检验关联维护--修改关联 | '+ hospitaiName : '检验关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Lis"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="140px"
+      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="检验套餐预览:" style="marginTop: 24px">
+                <span class="previewInfo1" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="检验细项:" prop="hisDetailName">
+                <el-input v-model.trim="form.hisDetailName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="检验细项预览:">
+                <span class="previewInfo1" style="minWidth: 240px">{{form.hisDetailName}}</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"
+                  @clear="handleClear"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                  reserve-keyword
+                >
+                  <el-option
+                    v-for="(item,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
+                    :value="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
+                    :title="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
+                    @click.native="handleChoose(searchType === 2 ? item.uniqueName : item)"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="检验标准术语预览:">
+                <span class="previewInfo1" style="minWidth: 240px">{{form.searchTextPre}}</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: 'AddLis',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        searchTextPre: '', //术语预览
+        hisName: '',
+        hisDetailName: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入检验套餐', trigger: 'change' },
+          { max: 80, message: '检验套餐最多80字', trigger: 'change' }
+        ],
+        hisDetailName: [
+          { max: 80, message: '检验细项最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择检验标准术语', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      searchType: 2, // 1:套餐   2: 细项
+      hospitalId: ''
+      // queryText: ''
+    };
+  },
+  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.hisDetailName = data.hisDetailName;
+      this.form.searchTextPre = data.uniqueName;
+    }
+    if (isEdit && data.hisName !== '' && data.hisDetailName === '') {
+      this.searchType = 1;
+      // console.log('改变searchType为1');
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      // this.queryText = query;
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      const { hisName, hisDetailName } = this.form;
+      let type = 2; // 1-化验大项、2-化验小项
+      if (hisName !== '' && hisDetailName === '') {
+        type = 1;
+      }
+      this.searchType = type;
+      this.showDrop = true;
+      let params = {
+        type: type,
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList =
+            type === 1 ? res.data.data.lisNames : res.data.data.lisDetailNames;
+        }
+      });
+    },
+    changeWord() {},
+    // 获取焦点
+    handleFocus() {},
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+    handleClear() {
+      this.form.searchTextPre = '';
+    },
+    handleChoose(val) {
+      // console.log('点击选中option', val);
+      this.form.searchTextPre = val;
+      this.form.searchText = val;
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.hisDetailName = '';
+      this.form.searchText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      console.log(this.searchType, 'searchType');
+
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName, hisDetailName } = this.form;
+          // 当标准术语是套餐时,细项必须为空
+          if (this.searchType === 1 && hisDetailName !== '') {
+            this.warning('医院术语与标准术语类型不匹配,请修改');
+            return;
+          }
+
+          // 当标准术语是细项时,医院术语套餐和细项均不能为空
+          if (this.searchType === 2) {
+            if (hisName === '') {
+              this.warning('医院术语与标准术语类型不匹配,请修改');
+              return;
+            } else if (hisDetailName === '') {
+              this.warning('医院术语与标准术语类型不匹配,请修改');
+              return;
+            }
+          }
+
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            hisDetailName: hisDetailName,
+            hospitalId: this.hospitalId
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .lisIsExistRecord(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.saveOrUpdateLisRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Lis',
+            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;
+  // }
+  .previewInfo1 {
+    padding-left: 4px;
+    display: inline-block;
+    margin-top: 8px;
+    // width: calc(100% - 160px);s
+    line-height: 22px;
+    min-height: 22px;
+    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>

+ 536 - 0
src/components/cdssManage/lis/Lis.vue

@@ -0,0 +1,536 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <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.hisDetailName" 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="hisDetailName" label="检验细项" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准检验项" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <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: 'Lis', //化验大小项和公表维护
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 检验套餐
+        hisDetailName: '', //检验细项
+        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.dataLisVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precLisDataMatch(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.getLisPage(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: '',
+        hisDetailName: this.filter.hisDetailName.trim(),
+        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: 'AddLis',
+        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: 'AddLis',
+        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: '',
+        hisDetailName: ''
+      };
+    },
+
+    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
+          .deleteLisRecord({ 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.exportLisRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '检验数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportLisRecord({ 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.exportLisModule().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.importLisRecord(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;
+  }
+}
+#upFileMatch {
+  display: none;
+}
+#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;
+  }
+}
+.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>

+ 405 - 0
src/components/cdssManage/operation/AddOperation.vue

@@ -0,0 +1,405 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '手术/操作关联维护--修改关联 | ' +hospitaiName : '手术/操作关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Operation"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="160px"
+      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="20">
+              <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="20">
+              <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';
+export default {
+  name: 'AddOperation',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      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, //下拉框显示文字
+      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;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 6, //手术和操作
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.operationNames;
+        }
+      });
+    },
+    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 } = 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
+        .operationIsExistRecord(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.saveOrUpdateOperationRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Operation',
+            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>

+ 537 - 0
src/components/cdssManage/operation/Operation.vue

@@ -0,0 +1,537 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <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: 'Operation', //化验大小项和公表维护
+  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.dataOperationVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precOperationDataMatch(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.getOperationPage(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: 'AddOperation',
+        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: 'AddOperation',
+        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
+          .deleteOperationRecord({ 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.exportOperationRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '手术/操作关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api
+            .exportOperationRecord({ 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.exportOperationModule().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.importOperationRecord(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>

+ 405 - 0
src/components/cdssManage/pacs/AddPacs.vue

@@ -0,0 +1,405 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '检查关联维护--修改关联 | ' + hospitaiName: '检查关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Pacs"
+    ></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"
+                    :value="item"
+                    :title="item"
+                  ></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: 'AddPacs',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      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, //下拉框显示文字
+      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;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 3,
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.pacsNames;
+        }
+      });
+    },
+    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 } = 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
+        .pacsIsExistRecord(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.saveOrUpdatePacsRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Pacs',
+            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>

+ 530 - 0
src/components/cdssManage/pacs/Pacs.vue

@@ -0,0 +1,530 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <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: 'Pacs', //化验大小项和公表维护
+  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.dataPacsVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precPacsDataMatch(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.getpacsPage(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: 'AddPacs',
+        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: 'AddPacs',
+        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
+          .deletePacsRecord({ 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.exportPacsRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '检查关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportPacsRecord({ 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.exportPacsModule().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.importPacsRecord(formData, header).then(res => {
+        // code === '00000001'  导入失败统一提示 数据存在异常,导入失败,请修改后再试
+        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>

+ 693 - 0
src/components/cdssManage/plan/AddPlan.vue

@@ -0,0 +1,693 @@
+<template>
+  <el-scrollbar style="height: 100%" ref="elscrollbar">
+    <div class="AddPlanWrapper clearfix" @click="close">
+      <crumbs
+        :title="isEdit ? '电子病历方案配置-修改方案' : '电子病历方案配置-添加方案'"
+        class="topBack"
+        :param="$route.params"
+        linkTo="Plan"
+      ></crumbs>
+      <div class="AddPlanBox">
+        <el-row :gutter="20">
+          <el-col :span="16">
+            <el-form ref="form" :model="form" label-width="80px" :rules="rules">
+              <!-- <el-form-item label="医院名称" prop="hoipitalName">
+                <el-input v-model="form.planName" placeholder="2-30位,可输入汉字、字母、数字和下划线"></el-input>
+              </el-form-item>-->
+              <el-form-item label="医院名称" class="selectMedicine" prop="hospitalId">
+                <el-select
+                  v-model="form.hospitalId"
+                  placeholder="请选择"
+                  clearable
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in HospitalInfoList"
+                    :label="item.name"
+                    :value="item.id"
+                    :key="item.id"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="方案名称" prop="planName">
+                <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-form-item>
+              <el-form-item label="方案配置">
+                <ul>
+                  <li>
+                    <div class="title">
+                      <div class="handleIcon" @click="openPlanItems">
+                        <img
+                          src="../../../images/multi.png"
+                          alt="辅助信息"
+                          :class="{'open' : isOpenCloseItems}"
+                        />
+                      </div>
+                      <h4>辅助信息</h4>
+                      <div class="titlwSwitch">
+                        <el-switch
+                          v-model="switchSubStatus"
+                          :active-value="1"
+                          :inactive-value="0"
+                          active-color="#4BC4D7"
+                          inactive-color="#BBBBBB"
+                        ></el-switch>
+                        <span class="titlwSwitchStatus">{{switchSubStatus === 1 ? '启用中' : '未启用'}}</span>
+                      </div>
+                    </div>
+                    <transition name="plus-icon">
+                      <div v-if="isOpenCloseItems">
+                        <ul class="sub" v-for="(item,index) in  planDefaultList" :key="item.id">
+                          <li class="planItem">
+                            <div class="sort">
+                              <div class="top">
+                                <img
+                                  :src="isTopLight !== index ? require('../../../images/icon_default_top.png') : require('../../../images/icon_hover_top.png')"
+                                  alt="上升"
+                                  v-if="index !== 0"
+                                  @click="sortPlan(item,index,'top')"
+                                  @mouseover="handleMouseEnter1(index)"
+                                  @mouseleave="handleMouseLeave1(index)"
+                                />
+                              </div>
+                              <div class="down">
+                                <img
+                                  :src="isDownLight !== index ? require('../../../images/icon_default_down.png') : require('../../../images/icon_hover_down.png')"
+                                  alt="下降"
+                                  v-if="index !== planDefaultList.length - 1"
+                                  @click="sortPlan(item,index,'down')"
+                                  @mouseover="handleMouseEnter(index)"
+                                  @mouseleave="handleMouseLeave(index)"
+                                />
+                              </div>
+                            </div>
+                            <div class="openOrClose">
+                              <span class="planInfo">{{item.name}}</span>
+                              <div class="switch">
+                                <el-switch
+                                  v-model="item.status"
+                                  :active-value="1"
+                                  :inactive-value="0"
+                                  active-color="#4BC4D7"
+                                  inactive-color="#BBBBBB"
+                                ></el-switch>
+                              </div>
+                              <span class="planStatus">{{item.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>
+                  </li>
+                  <li>
+                    <div class="title">
+                      <div class="handleIcon">
+                        <img src="../../../images/multi.png" alt="医学知识" />
+                      </div>
+                      <h4>医学知识</h4>
+                      <div class="titlwSwitch">
+                        <el-switch
+                          v-model="switchMedStatus"
+                          :active-value="1"
+                          :inactive-value="0"
+                          active-color="#4BC4D7"
+                          inactive-color="#BBBBBB"
+                        ></el-switch>
+                        <span class="titlwSwitchStatus">{{switchMedStatus === 1 ? '启用中' : '未启用'}}</span>
+                      </div>
+                    </div>
+                  </li>
+                  <li>
+                    <div class="title">
+                      <div class="handleIcon">
+                        <img src="../../../images/multi.png" alt="医学知识" />
+                      </div>
+                      <h4>随访计划</h4>
+                      <div class="titlwSwitch">
+                        <el-switch
+                          v-model="switchFollowStatus"
+                          :active-value="1"
+                          :inactive-value="0"
+                          active-color="#4BC4D7"
+                          inactive-color="#BBBBBB"
+                        ></el-switch>
+                        <span class="titlwSwitchStatus">{{switchFollowStatus === 1 ? '启用中' : '未启用'}}</span>
+                      </div>
+                    </div>
+                  </li>
+                </ul>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="onSubmit" :disabled="saveDisable">确定</el-button>
+              </el-form-item>
+            </el-form>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+  </el-scrollbar>
+</template>
+<script>
+import api from '@api/cdss.js';
+
+export default {
+  name: 'AddPlan',
+  data() {
+    var numreg = /^[a-zA-Z0-9_\u4e00-\u9fa5]+$/;
+    var numreg1 = /^[0-9a-zA-Z_]{1,}$/;
+    var validatePass = (rule, value, callback) => {
+      if (!numreg.test(value)) {
+        callback(new Error('汉字、字母、数字和下划线'));
+      } else {
+        callback();
+      }
+    };
+    var validatePass1 = (rule, value, callback) => {
+      if (!numreg1.test(value)) {
+        callback(new Error('字母、数字和下划线'));
+      } else {
+        callback();
+      }
+    };
+    return {
+      form: {
+        hospitalId: '',
+        planName: '',
+        planCode: ''
+      },
+      saveDisable: false, //保存按钮禁止点击
+      rules: {
+        planName: [
+          { required: true, message: '方案名称不能为空', trigger: 'change' },
+          { min: 2, max: 30, message: '长度2-30位', trigger: 'blur' },
+          { required: true, validator: validatePass, trigger: 'blur' }
+        ],
+        hospitalId: [
+          { required: true, message: '医院名称不能为空', trigger: 'change' }
+          // { min: 2, max: 30, message: '长度2-30位', trigger: 'blur' },
+          // { required: true, validator: validatePass, trigger: 'blur' }
+        ],
+        planCode: [
+          { required: true, message: '方案编码不能为空', trigger: 'change' },
+          { min: 4, max: 15, message: '长度4-15位', trigger: 'blur' },
+          { required: true, validator: validatePass1, trigger: 'blur' }
+        ]
+      },
+      planDefaultList: [],
+      // hospitalId: '',
+      isEdit: false, // 是否处于编辑页面 false--新增   true--编辑
+      switchSubStatus: 0, // 辅助信息
+      switchMedStatus: 0, // 医学知识
+      switchFollowStatus: 0, //随访计划
+      isOpenCloseItems: true, // 是否展开方案配置项
+      isDownLight: -1,
+      isTopLight: -1,
+      flag: 1,
+      editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
+      isSaveSuccess: false, // 是否保存成功
+      HospitalInfoList: []
+    };
+  },
+  beforeRouteLeave(to, from, next) {
+    console.log(this.editCount,'this.editCount');
+    if (
+      (this.editCount > 3 && !this.isSaveSuccess && this.isEdit) ||
+      (this.editCount > 1 && !this.isSaveSuccess && !this.isEdit)
+    ) {
+      // console.log('页面被编辑了');
+      this.$alert('还有未保存的内容,确定要退出当前页面吗?', '提示', {
+        confirmButtonText: '确定',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'leaveBtn',
+        // customClass: 'leaveBox',
+        type: 'warning'
+      })
+        .then(() => {
+          next();
+        })
+        .catch(() => {});
+    } else {
+      next();
+    }
+  },
+  watch: {
+    form: {
+      handler(newName, oldName) {
+        this.editCount++;
+      },
+      deep: true
+      // immediate: true
+    },
+    planDefaultList: {
+      handler(newName, oldName) {
+        // console.log(newName,'newName');
+        // console.log(oldName,'oldName');
+        this.editCount++;
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  async created() {
+    const { isEdit, data } = this.$route.params;
+    console.log(data, '编辑页传递的data');
+    this._getHospitalInfo(); // 获取医院下拉列表
+    // let res = await api.getHospitalInfo(); // 同步获取医院信息
+    // this.hospitalId = res.data.data.id;
+    if (isEdit) {
+      // 编辑页面
+      this.isEdit = true;
+      this.form.hospitalId = data.hospitalId
+      let params = {
+        hospitalId: data.hospitalId,
+        id: data.id
+      };
+      this._getPlanInfoIds(params);
+    } else {
+      // 新增页面
+      this._getDefaultPlans(); // 获取默认配置信息
+    }
+  },
+  methods: {
+    close() {},
+    // 获取医院下拉列表
+    _getHospitalInfo() {
+      api.getHospitalInfo().then(res => {
+        if (res.data.code === '0') {
+          this.HospitalInfoList = res.data.data;
+        }
+      });
+    },
+    // 方案配置排序
+    sortPlan(item, index, type) {
+      // console.log('排序', item, index, type);
+      let tempList = [...this.planDefaultList];
+      if (type === 'down') {
+        // 降序
+        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];
+      } else {
+        // 升序
+        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];
+      }
+    },
+
+    // 展开列表项
+    openPlanItems() {
+      this.isOpenCloseItems = !this.isOpenCloseItems;
+    },
+
+    // 鼠标移入
+    handleMouseEnter(index) {
+      this.isDownLight = index;
+    },
+
+    // 鼠标移除
+    handleMouseLeave(index) {
+      this.isDownLight = -1;
+    },
+
+    // 鼠标移入
+    handleMouseEnter1(index) {
+      this.isTopLight = index;
+    },
+
+    // 鼠标移除
+    handleMouseLeave1(index) {
+      this.isTopLight = -1;
+    },
+
+    // 获取默认方案配置
+    _getDefaultPlans() {
+      api.getDefaultPlans().then(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;
+          this.switchSubStatus =
+            res.data.data &&
+            res.data.data.planDetailDefault.length !== 0 &&
+            res.data.data.planDetailDefault[0].status;
+          this.switchMedStatus =
+            res.data.data &&
+            res.data.data.planDetailDefault.length !== 0 &&
+            res.data.data.planDetailDefault[1].status;
+          this.switchFollowStatus =
+            res.data.data &&
+            res.data.data.planDetailDefault.length !== 0 &&
+            res.data.data.planDetailDefault[2].status;
+        }
+      });
+    },
+
+    // 编辑页面 根据id获取方案配置
+    async _getPlanInfoIds(params) {
+      // 先获取默认的所有方案
+      let tempArr = [];
+      let newPlan = [];
+      let res = await api.getDefaultPlans();
+      if (res.data.code === '0') {
+        tempArr =
+          res.data.data &&
+          res.data.data.planDetailDefault.length !== 0 &&
+          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;
+        this.form.planCode = res1.data.data[0].planCode;
+        this.switchSubStatus = res1.data.data[0].sysSetInfo[0].status;
+        this.switchMedStatus = res1.data.data[0].sysSetInfo[1].status;
+        this.switchFollowStatus = res1.data.data[0].sysSetInfo[2].status;
+        // this.planDefaultList = res1.data.data[0].sysSetInfo[0].planDetails;
+      }
+      let arr = [];
+      let arrTemp = [];
+      let arrTemp1 = []; // 不同index
+      for (var i = 0; i < tempArr.length; i++) {
+        arrTemp.push(i);
+      }
+      for (var i = 0; i < tempArr.length; i++) {
+        for (var j = 0; j < newPlan.length; j++) {
+          if (tempArr[i].code === newPlan[j].code) {
+            arr.push(i);
+          }
+        }
+      }
+      arrTemp1 = arr
+        .filter(x => arrTemp.indexOf(x) == -1)
+        .concat(arrTemp.filter(x => arr.indexOf(x) == -1));
+      let endArr = [...newPlan];
+      for (var j = 0; j < arrTemp1.length; j++) {
+        let temp = tempArr[arrTemp1[j]];
+        temp.orderNo = arr.length + j + 1;
+        temp.status = 0;
+        endArr.push(temp);
+      }
+      // console.log(endArr,'-=-=-=-=-=');
+      this.planDefaultList = endArr;
+    },
+
+    // format处理细项数据
+    handleSendData() {
+      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,
+          planId: item.planId,
+          remark: item.remark,
+          status: item.status,
+          value: item.value
+        };
+      });
+      return TempPlanDetail;
+      // console.log(TempPlanDetail, 'TempPlanDetail');
+    },
+
+    // 处理保存活动信息参数
+    _getParams() {
+      let params = {
+        hospitalId: this.form.hospitalId,
+        planCode: this.form.planCode,
+        planDetailParent: [
+          {
+            code: 'auxiliary',
+            hospitalId: this.form.hospitalId,
+            name: '辅助信息',
+            number: 0,
+            orderNo: 1,
+            planDetailSub: this.handleSendData(),
+            status: this.switchSubStatus
+          },
+          {
+            code: 'medical',
+            hospitalId: this.form.hospitalId,
+            name: '医学知识',
+            orderNo: 3,
+            planDetailSub: [{}],
+            status: this.switchMedStatus
+          },
+          {
+            code: 'followup',
+            hospitalId: this.form.hospitalId,
+            name: '随访计划',
+            orderNo: 4,
+            planDetailSub: [{}],
+            status: this.switchFollowStatus
+          }
+        ], // 方案配置信息
+        planName: this.form.planName,
+        planStatus: 1 // 1 启用    默认启用
+      };
+      if (this.isEdit) {
+        // 编辑状态,需要额外添加ID
+        const { data } = this.$route.params;
+        params = { ...params, id: data.id };
+      }
+      return params;
+    },
+
+    onSubmit() {
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          this.saveDisable = true;
+          let params = this._getParams();
+          // console.log(params, 'params');
+          // return;
+          api.savePlanInfoDatas(params).then(res => {
+            if (res.data.code === '0') {
+              this.$message({
+                showClose: true,
+                message: '保存成功',
+                type: 'success',
+                duration: 1000
+              });
+              this.isSaveSuccess = true; // 保存成功,可正常退出
+              this.$router.push({
+                name: 'Plan',
+                params: Object.assign({}, this.$route.params, {
+                  currentPage: 1
+                })
+              });
+            } else if (res.data.code === '00020007') {
+              // 方案名/方案编码已存在
+              this.$message({
+                showClose: true,
+                message: res.data.msg,
+                type: 'error',
+                duration: 1000
+              });
+            }
+            this.saveDisable = false;
+          });
+        } else {
+          this.saveDisable = false;
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
+          this.$nextTick(() => {
+            div.scrollTop = 0;
+          });
+          return false;
+        }
+      });
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+.AddPlanWrapper {
+  min-width: 940px;
+  .AddPlanBox {
+    padding: 20px 60px 120px 60px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .title {
+    background-color: #f2f2f2;
+    display: flex;
+    .handleIcon {
+      width: 30px;
+      cursor: pointer;
+      height: 40px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      img {
+        width: 20px;
+        height: 20px;
+      }
+      .open {
+        transform: rotate(180deg);
+      }
+      .close {
+        transform: rotate(0deg);
+      }
+    }
+    .titlwSwitch {
+      width: 120px;
+    }
+    h4 {
+      flex: 1;
+    }
+    .titlwSwitchStatus {
+      margin-left: 16px;
+    }
+  }
+  .sub {
+    .planItem {
+      display: flex;
+      .sort {
+        width: 60px;
+        display: flex;
+        .top {
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          width: 30px;
+          cursor: pointer;
+          img {
+            width: 10px;
+            height: 14px;
+          }
+        }
+        .down {
+          width: 30px;
+          cursor: pointer;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          img {
+            width: 10px;
+            height: 14px;
+          }
+        }
+      }
+      .openOrClose {
+        display: flex;
+        flex: 1;
+        .planInfo {
+          width: 140px;
+        }
+        .switch {
+        }
+        .planStatus {
+          margin-left: 16px;
+        }
+      }
+      .showNum {
+        display: flex;
+        width: 160px;
+        /deep/.el-input--small {
+          width: 60px;
+        }
+      }
+    }
+  }
+  .el-button {
+    float: right;
+  }
+  .plus-icon-enter-active {
+    transition: all 0.8s;
+  }
+  .plus-icon-enter {
+    opacity: 0;
+    margin-top: 12px;
+  }
+  .plus-icon-leave-active {
+    transition: all 0.8s;
+  }
+  .plus-icon-leave-active {
+    opacity: 0;
+    margin-top: 12px;
+  }
+}
+.leaveBox {
+  /deep/ .leaveBtn {
+    // margin-right: 46px;
+    background-color: #d7d7d7 !important;
+    border-color: transparent;
+  }
+}
+.selectMedicine {
+  /deep/ .el-input__suffix-inner {
+    position: relative;
+    top: -1px;
+  }
+  /deep/ .el-icon-circle-close {
+    position: relative;
+    top: -2px;
+  }
+}
+</style>

+ 493 - 0
src/components/cdssManage/plan/Plan.vue

@@ -0,0 +1,493 @@
+<template>
+  <div>
+    <crumbs title="电子病历方案配置" style="min-width: 980px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="所属医院:" class="selectMedicine">
+          <el-select size="mini" v-model="filter.hospitalId" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in HospitalInfoList"
+              :label="item.name"
+              :value="item.id"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="方案名称:">
+          <el-input size="mini" v-model="filter.planName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">检索</el-button>
+          <el-button size="mini" type="warning" @click="addRelation">添加方案</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="hospitalName" label="医院名称" show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column :resizable="false" prop="hospitalId" label="医院编码"></el-table-column> -->
+        <el-table-column :resizable="false" prop="planName" label="方案名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="planCode" label="方案编码" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="planDetail" label="模块配置" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtCreate"
+          label="创建时间"
+          show-overflow-tooltip
+          width="180"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="planStatus"
+          label="状态"
+          show-overflow-tooltip
+          width="180"
+        >
+          <template slot-scope="scope">{{scope.row.planStatus == 1 ? '已启用': '已禁用'}}</template>
+        </el-table-column>
+
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button
+              @click="modifyRelation(scope.row)"
+              type="text"
+              size="small"
+              v-if="scope.row.planStatus === 1"
+              class="disable"
+            >修改</el-button>
+            <el-button plain type="text" size="small" v-else disabled>修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              class="delete"
+              @click="enableOrAble(scope.row,0)"
+              v-if="scope.row.planStatus === 1"
+            >禁用</el-button>
+            <el-button type="text" size="small" @click="enableOrAble(scope.row,1)" v-else>启用</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              v-if="scope.row.planStatus !== 1"
+              @click="showDelDialog(scope.row.id,scope.row.planStatus,scope.row.planName,scope.row)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+            <el-button plain type="text" size="small" v-else disabled>删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination">
+        <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: 'Plan',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        planName: '', //标准诊断名称
+        hospitalId: ''
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      hospitalId: '',
+      HospitalInfoList: []
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+      that._getHospitalInfo();
+    });
+    // 非首页 编辑页返回 设置 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();
+    },
+
+    // 获取医院下拉列表
+    _getHospitalInfo() {
+      api.getHospitalInfo().then(res => {
+        if (res.data.code === '0') {
+          this.HospitalInfoList = res.data.data;
+        }
+      });
+    },
+
+    // 获取列表数据
+    async getDataList(isTurnPage) {
+      let params = await this.getFilterItems(isTurnPage);
+      // return;
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getPlanInfoPages(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;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    async getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      // let planName = this.filter.planName.trim();
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        planName: this.filter.planName.trim(),
+        hospitalId: this.filter.hospitalId
+      };
+      return param;
+    },
+
+    escapeRegExp(text) {
+      return text.replace(/[-[\]{}()*+?._,\\^$|#\s]/g, '\\$&');
+    },
+
+    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: 'AddPlan', params: pam });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    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: 'AddPlan',
+        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: '',
+        planName: ''
+      };
+    },
+
+    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, type) {
+      let showInfo = '启用';
+      let btnNameClass = 'confirmBtn2';
+      if (type === 'Del') {
+        showInfo = '禁用';
+        btnNameClass = 'delBtn';
+      } else if (type === 'Del1') {
+        showInfo = '删除';
+        btnNameClass = 'delBtn';
+      }
+
+      this.$alert(msg, '提示', {
+        confirmButtonText: showInfo,
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'cancelBtn',
+        // confirmButtonClass: btnNameClass,
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // // 获取医院信息
+    // _getHospital() {
+    //   api.getHospitalInfo().then(res => {
+    //     if (res.data.code === '0') {
+    //       this.hospitalId = res.data.data.id;
+    //     }
+    //   });
+    // },
+    // 删除关联
+    showDelDialog(id, status, info, row) {
+      if (status === 1) {
+        this.$alert(`${info}正在启用中,无法删除。`, '提示', {
+          confirmButtonText: '确定',
+          // cancelButtonText: '取消',
+          // cancelButtonClass: 'cancelSureL',
+          // confirmButtonClass: 'sureL',
+          // customClass: 'exportBoxL',
+          type: 'warning'
+        })
+          .then(() => {})
+          .catch(() => {});
+        return false;
+      }
+
+      if (id === -1) {
+        this.$alert(`该方案为默认方案,无法删除。`, '提示', {
+          confirmButtonText: '确定',
+          // cancelButtonText: '取消',
+          // cancelButtonClass: 'cancelSureL',
+          // confirmButtonClass: 'sureL',
+          // customClass: 'exportBoxL',
+          type: 'warning'
+        })
+          .then(() => {})
+          .catch(() => {});
+        return false;
+      }
+      // return
+      this.showConfirmDialog(
+        '是否删除该方案配置?',
+        () => {
+          let params = {
+            planId: id,
+            hospitalId: row.hospitalId
+          };
+          api
+            .cancelPlanDatas(params)
+            .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);
+            });
+        },
+        'Del1'
+      );
+    },
+
+    // 启用/禁用 数据请求
+    sendAbleOrEn(row, type) {
+      api
+        .revStopPlans({
+          id: row.id,
+          status: type
+        })
+        .then(res => {
+          if (res.data.code === '0') {
+            this.$message({
+              showClose: true,
+              message: '操作成功',
+              type: 'success',
+              duration: 1000
+            });
+            this.getDataList();
+          }
+        })
+        .catch(err => {});
+    },
+
+    // 启用/禁用
+    enableOrAble(row, type) {
+      // console.log('启用planName', row, type);
+      if (type === 1) {
+        // 启用
+        this.showConfirmDialog(
+          `确定要启用${row.planName}吗?`,
+          () => {
+            this.sendAbleOrEn(row, type);
+          },
+          'Reuse'
+        );
+      } else {
+        // 禁用
+        this.showConfirmDialog(
+          `方案禁用后前端页面将无法正常显示内容,确定要禁用${row.planName}吗?`,
+          () => {
+            this.sendAbleOrEn(row, type);
+          },
+          'Del'
+        );
+      }
+    }
+  }
+};
+</script>
+
+
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.disable {
+  border-color: transparent;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/ .delBtn {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+  /deep/ .confirmBtn2 {
+    position: relative;
+    right: 0px !important;
+  }
+}
+.exportBoxL {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    text-align: left;
+  }
+  /deep/ .el-message-box__btns {
+    // text-align: center;
+    margin-bottom: 24px;
+  }
+  /deep/ .leftbtn {
+    margin-right: 46px;
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/ .cancelSureL {
+    // text-align: center;
+    display: none;
+  }
+  /deep/ .sureL {
+    float: right;
+  }
+}
+.contents {
+  .is-plain {
+    color: #dad7d7;
+  }
+  .is-plain:hover {
+    color: #dad7d7;
+  }
+}
+
+.el-table__row {
+  /deep/ .is-disabled {
+    border-color: transparent !important;
+  }
+}
+.selectMedicine {
+  /deep/ .el-input__suffix-inner {
+    position: relative;
+    top: -1px;
+  }
+  /deep/ .el-icon-circle-close {
+    position: relative;
+    top: -2px;
+  }
+}
+</style>

+ 241 - 0
src/components/cdssManage/version/AddVersion.vue

@@ -0,0 +1,241 @@
+<template>
+  <div>
+    <crumbs :title="title" :param="$route.params" linkTo="VersionCDSS"></crumbs>
+    <div class="contents">
+      <div class="content">
+        <!-- <el-form ref="form" :label-position="labelPosition" label-width="95px" class="add-admin-form" :model="form" :rules="rules"> -->
+        <el-form ref="form" :label-position="labelPosition" label-width="108px" class="add-version-form" :model="form" :rules="rules">
+          <!-- <el-form-item label="版本号归属:" prop="productType">
+            <el-select v-model="form.productType" 
+                      placeholder="请选择" 
+                      size="small"
+                      :disabled="id && !copy?true:false">
+              <el-option 
+                v-for="item in typeList"
+                :key="item.key"
+                :label="item.name"
+                :value="item.key">
+              </el-option>
+            </el-select>
+          </el-form-item> -->
+          <el-form-item label="版本号:" prop="name" class="version-num">
+              <el-input v-model="form.name" placeholder="请输入版本号" maxlength="31"></el-input>
+          </el-form-item>
+          <el-form-item label="版本时间:" prop="refreshTime">
+            <el-date-picker
+              v-model="form.refreshTime"
+              type="date"
+              placeholder="选择日期"
+              value-format="yyyy-MM-dd"
+              :clearable='false'>
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="版本备注:" prop="remark" class="discDesc">
+              <el-input type="textarea" :rows="3" placeholder="请输入版本备注" v-model="form.remark" maxlength="121"></el-input>
+          </el-form-item>
+          <el-form-item label="版本说明:" v-if="list&&list.length>0">
+          </el-form-item>
+          <VersionDesc :detail="list" :versionId="id" :isFirst="isFirst" :isCopy="copy" @func="getDetailList"/>
+          <el-button class="disclButn" size="small" type="primary" :disabled = 'saveDisable' @click="comfirn('form')">确定</el-button>
+        </el-form>
+        <!-- <VersionDesc :detail="list" :versionId="id" :isFirst="isFirst" :isCopy="copy" @func="getDetailList"/>
+        <el-button class="disclButn" size="small" type="primary" @click="comfirn">确定</el-button> -->
+      </div>    
+    </div>
+  </div>
+</template>
+<script type="text/javascript">
+  import api from '@api/cdss.js';
+  import VersionDesc from './VersionDesc.vue';
+  export default {
+    name:'AddVersionCDSS',
+    data(){
+      const titleVaild = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请输入版本号'));
+        }
+        if (value.length > 30) {
+           this.form.name = value.substr(0, 30);
+           this.$message({
+             showClose: true,
+             type: 'warning',
+             message: '版本号已超过最大限制30字'
+           })
+        }
+        callback();
+      };
+      const remarkVaild = (rule, value, callback) => {
+        if (value.length > 120) {
+           this.form.remark = value.substr(0, 120);
+           this.$message({
+             showClose: true,
+             type: 'warning',
+             message: '版本备注已超过最大限制120字'
+           })
+        }
+        callback();
+      };
+      return{
+        // data:{},
+        list:[],
+        labelPosition:'left',
+        isFirst:true,
+        title:'版本信息维护-添加版本信息',
+        form:{
+          name:'',
+          refreshTime:'',
+          remark:'',
+          // productType:null
+        },
+        id:null,
+        rules:{
+          name:[{ required: true, validator: titleVaild, trigger: [ 'change'] },
+                { required: true, message: '请输入版本号',trigger: ['blur', 'change'] }],
+          remark:{ required: false, validator: remarkVaild, trigger: [ 'change'] },
+          refreshTime:{ required: true, message: '请选择时间', trigger: ['blur', 'change'] },
+          // productType:{ required: true, message: '请选择版本号归属', trigger: ['blur', 'change'] },
+        },
+        pickerOptions1:{
+          disabledDate(time) {
+            return time.getTime() < Date.now();
+          },
+        },
+        copy:null,
+        saveDisable: false,  //保存按钮禁止点击
+        typeList:[]
+      }
+    },
+    created(){
+      let info = this.$route.params.info;
+      this.copy = this.$route.params.copy;
+      if(info){
+        this.id = info.id;
+        this.form.name = info.name;
+        this.form.refreshTime = info.refreshTime;
+        this.form.remark = info.remark;
+        // this.form.productType = info.productType && !this.copy?info.productType:null;
+        this.title = this.copy?"版本信息维护-复制版本信息":"版本信息维护-修改版本信息";
+        // this.getList();
+        this.list = info.detail;
+      }
+      // let typeList = JSON.parse(localStorage.getItem("knowledgeEnumsData"));
+      // this.typeList = typeList.productTypeEnum;
+    },
+    methods:{
+      /*getList(){
+        api.getVersionDetlInfo({id:this.id}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.list = result.data;
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
+        })
+      },*/
+      getDetailList(data){//子组件数据
+        this.list = data;
+      },
+      comfirn(form){
+        /*if(!this.form.name.trim() || !this.form.refreshTime.trim()){
+          this.$message({
+            message:'请填写相关内容',
+            type:'warning'
+          });
+          return
+        }*/
+        this.$refs[form].validate((valid) => {
+          if (valid) {
+            if(this.id && !this.copy){//修改
+              const param = Object.assign({},this.form,{id:this.id})
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+              api.updateVersionInfoAllsCDSS(param).then((res)=>{
+                if(res.data.code==0){
+                  this.$message({
+                    message:"修改成功",
+                    type:'success'
+                  });
+                  //返回带搜索条件的首页
+                  this.$router.push({
+                    name: 'VersionCDSS',
+                    params: Object.assign({}, this.$route.params, {currentPage: 1})
+                  });
+                }else{
+                  this.$message({
+                    message:res.data.msg,
+                    type:'warning'
+                  });
+                }
+                this.saveDisable = false
+              })
+            }else{//添加
+              // 复制时把list多余字段过滤掉,如id等
+              const detail = this.list;
+              let copyDetail=[];
+              let item={};
+              if(detail && detail.length>0){
+                for(let i=0; i<detail.length; i++){
+                  item.title = detail[i].title;
+                  item.description = detail[i].description;
+                  copyDetail.push(item);
+                  item={};
+                }
+              }
+              const params = Object.assign({},this.form,{'versionDetail':copyDetail});
+              // api.addVersInfo(this.form).then((res)=>{
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+              api.saveVersionInfoAllsCDSS(params).then((res)=>{
+                if(res.data.code==0){
+                  this.$message({
+                    message:"添加成功",
+                    type:'success'
+                  })
+                  // this.$router.push({path: 'LT-GBBXXWH-BBXXWH'});
+                  this.$router.push({name: 'VersionCDSS'});
+                }else{
+                  this.$message({
+                    message:res.data.msg,
+                    type:'warning'
+                  });
+                }
+                this.saveDisable = false
+              })
+            }  
+          } else {
+            return false;
+          }
+        });   
+      },
+    },
+    components:{
+      VersionDesc
+    }
+  }
+</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;
+    .discDesc{
+      margin-bottom: 20px;
+    }
+    .disclButn{
+      position: absolute;
+      right: 80px;
+      bottom: 10px;
+    }
+  }
+  .add-version-form{
+    .version-num{
+      width: 500px;
+    }
+  }
+
+</style>

+ 257 - 0
src/components/cdssManage/version/Version.vue

@@ -0,0 +1,257 @@
+<template>
+  <div>
+    <crumbs title="版本信息维护">
+      <el-form :inline="true" class="demo-form-inline">
+        <!-- <el-form-item label="版本号归属:">
+          <el-select v-model="filter.type" placeholder="请选择" size="mini" clearable>
+            <el-option
+              v-for="item in typeList"
+              :key="item.key"
+              :label="item.name"
+              :value="item.key"
+            ></el-option>
+          </el-select>
+        </el-form-item> -->
+        <el-form-item label="版本号:">
+          <el-input size="mini" v-model="filter.name" placeholder="输入版本号"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">确认</el-button>
+          <!-- <router-link to="/admin/LT-YXSJWH-TJBBXX" style="margin:0 10px">
+                      <el-button size="mini" type="warning">添加版本信息</el-button>
+          </router-link>-->
+          <el-button size="mini" type="warning" style="margin:0 10px" @click="addVersion">添加版本信息</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="gmtCreate" label="操作时间" :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column prop="name" label="版本号" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="refreshTime" label="版本时间"></el-table-column>
+        <!-- <el-table-column label="版本号归属">
+          <template slot-scope="scope">
+            <span>{{getProdType(scope.row)}}</span>
+          </template>
+        </el-table-column> -->
+        <el-table-column prop="modifierid" label="操作人"></el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <!-- <el-button type="text" size="small" :class="{forbid:scope.row.id != canModiId}" @click="scope.row.id ==canModiId?toEditVersion(scope.row,false):''">修改</el-button> -->
+            <el-button
+              type="text"
+              size="small"
+              :class="{forbid:scope.row.status != 1}"
+              @click="scope.row.status == 1?toEditVersion(scope.row,false):''"
+            >修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              :class="{forbid:scope.row.status != 1}"
+              @click="scope.row.status ==1?toEditVersion(scope.row,true):''"
+            >复制</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="详情">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="getDetail(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/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'VersionCDSS',
+  data: function() {
+    return {
+      list: [],
+      cacheData: {},
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      searched: false,
+      filter: {
+        name: '',
+        // type: null
+      },
+      canModiId: null, //标识列表中的第一个可修改和复制项,区分分页和搜索
+      flag: true,
+      // typeList: []
+    };
+  },
+  created() {
+      this.$nextTick(()=>{
+        this.getDataList();
+        // let typeList = JSON.parse(localStorage.getItem("knowledgeEnumsData"));
+        // this.typeList = typeList.productTypeEnum;
+    })
+  },
+  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();
+    },
+    // getProdType(item) {
+    //   let name = '';
+    //   let type = item.productType;
+    //   for (let i in this.typeList) {
+    //     if (this.typeList[i].key == type) {
+    //       name = this.typeList[i].name;
+    //     }
+    //   }
+    //   return name;
+    // },
+    addVersion() {
+      // 添加版本信息
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({
+        name: 'AddVersionCDSS',
+        params: pam
+      });
+    },
+    toEditVersion(row, flag) {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({
+        name: 'AddVersionCDSS',
+        params: Object.assign(pam, { info: row, copy: flag })
+      });
+    },
+    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
+        .getVersionInfoAllsCDSS(param)
+        .then(res => {
+          // console.log(res,'=========');
+          // return 
+          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.flag) {
+              this.canModiId = this.list[0].id;
+            }
+            this.flag = false;
+            if (this.inCurrentPage !== undefined) {
+              this.currentPage = this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    getDetail(item) {
+      //详情页内不能修改明细 4-11
+      // let isFirst = item.id==this.list[0].id?true:false;
+      let isFirst = false;
+      this.$router.push({
+        name: 'VersionDetailCDSS',
+        params: { info: item, isFirst }
+      });
+    },
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.filter.name = '';
+        this.filter.type = null;
+      }
+      const param = {
+        name: this.filter.name.trim(),
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        // productType: this.filter.type ? this.filter.type : 0
+      };
+      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);
+      }
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.delete {
+  color: red !important;
+}
+.forbid {
+  color: #bfbfbf !important;
+}
+</style>

+ 426 - 0
src/components/cdssManage/version/VersionDesc.vue

@@ -0,0 +1,426 @@
+<template>
+  <div class="version-desc">
+    <el-table v-if="list&&list.length>0" :data="list" border style="width: 100%">
+      <el-table-column type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+      <el-table-column v-if="!isCopy" prop="gmtCreate" label="建立时间" :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column prop="title" label="标题"></el-table-column>
+      <el-table-column v-if="!isCopy" prop="modifierid" label="操作人"></el-table-column>
+      <el-table-column v-if="isFirst" label="操作">
+        <template slot-scope="scope">
+          <el-button type="text" size="small" @click="toEditDesc(scope.row,scope.$index)">修改</el-button>
+          <span style="margin:0 3px;">|</span>
+          <el-button
+            type="text"
+            size="small"
+            class="delete"
+            @click="showDelDialog(scope.row,scope.row.id,scope.$index)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="详情">
+        <template slot-scope="scope">
+          <el-button type="text" size="small" @click="getDetail(scope.row)">明细</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-button v-if="isFirst" class="disclButn1" size="small" type="primary" @click="addDesc">+ 添加说明</el-button>
+    <div class="boxMark" v-if="showBox">
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="showDesc?{}:rules"
+        label-width="65px"
+        class="add-desc-form"
+      >
+        <p class="top">
+          {{minTitle}}
+          <span v-if="tip" class="tip">(&lt;br /&gt;代表换行符,如果需要可在需要处输入)</span>
+          <img src="../../../images/close.png" height="12" width="12" @click="cancel" />
+        </p>
+        <el-form-item label="标题:" prop="title">
+          <p v-if="showDesc" class="cont">{{form.title}}</p>
+          <el-input v-else v-model="form.title" placeholder="请输入标题" maxlength="31"></el-input>
+        </el-form-item>
+        <el-form-item label="内容:" prop="description" class="discDesc">
+          <p v-if="showDesc" v-html="form.description" class="cont">{{form.description}}</p>
+          <el-input
+            v-else
+            type="textarea"
+            :rows="3"
+            placeholder="请输入内容"
+            v-model="form.description"
+            maxlength="501"
+            @keydown.native="contentInp"
+          ></el-input>
+        </el-form-item>
+        <el-button
+          class="disclButn1"
+          size="small"
+          type="primary"
+          :disabled="confirmDisable"
+          @click="comfirn('form')"
+        >确定</el-button>
+        <!-- <el-button class="disclButn can" size="small" type="primary" @click="cancel">取消</el-button> -->
+      </el-form>
+    </div>
+  </div>
+</template>
+<script type="text/javascript">
+import api from '@api/cdss.js';
+export default {
+  name: 'VersionDesc',
+  data() {
+    const titleVaild = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('请输入标题'));
+      }
+      if (value.length > 30) {
+        this.form.title = value.substr(0, 30);
+        this.$message({
+          showClose: true,
+          type: 'warning',
+          message: '标题已超过最大限制30字'
+        });
+      }
+      callback();
+    };
+    const descVaild = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('请输入内容'));
+      }
+      if (value.length > 500) {
+        this.form.description = value.substr(0, 500);
+        this.$message({
+          showClose: true,
+          type: 'warning',
+          message: '内容已超过最大限制500字'
+        });
+      }
+      callback();
+    };
+    return {
+      list: [], //版本说明列表
+      form: {
+        title: '',
+        description: ''
+      },
+      rules: {
+        title: [
+          { required: true, validator: titleVaild, trigger: ['change'] },
+          { required: true, message: '请输入标题', trigger: ['blur', 'change'] }
+        ],
+        description: [
+          { required: true, validator: descVaild, trigger: ['change'] },
+          { required: true, message: '请输入内容', trigger: ['blur', 'change'] }
+        ]
+      },
+      minTitle: '',
+      showBox: false,
+      modiId: null,
+      showDesc: false,
+      tip: true,
+      modiIndex: null,
+      confirmDisable: false
+    };
+  },
+  created() {
+    // if(this.versionId){
+    //   this.getList();
+    // }
+  },
+  mounted() {
+    this.list = JSON.parse(JSON.stringify(this.detail));
+  },
+  props: ['detail', 'versionId', 'isFirst', 'isCopy'],
+  methods: {
+    // 按回车添加换行<br />
+    contentInp(e) {
+      if (e.keyCode == 13) {
+        this.form.description += '<br />';
+      }
+    },
+    //用于修改时及时更新明细信息,若用本地信息,建立时间和操作人无法及时更新。
+    getList() {
+      api.getDetailByIdCDSS({ id: this.versionId }).then(res => {
+        const result = res.data;
+        if (result.code == 0) {
+          this.list = result.data;
+        } else {
+          this.$message({
+            message: result.msg,
+            type: 'warning'
+          });
+        }
+      });
+    },
+    indexMethod(index) {
+      return index + 1;
+    },
+    toEditDesc(item, index) {
+      //修改备注
+      this.minTitle = '修改说明';
+      this.showBox = true;
+      this.form.title = item.title;
+      this.form.description = item.description;
+      this.modiId = item.id;
+      this.modiIndex = index;
+    },
+    addDesc() {
+      //添加备注
+      this.minTitle = '添加说明';
+      this.showBox = true;
+    },
+    comfirn(form) {
+      //记得清空modiId
+      /*if(!this.form.title.trim() || !this.form.description.trim()){
+          this.$message({
+            message:'请填写相关信息',
+            type:'warning'
+          });
+          return
+        }*/
+      this.$refs[form].validate(valid => {
+        if (valid) {
+          // 修改--直接调修改接口;复制--新增
+          this.confirmDisable = true;
+          if (this.modiId) {
+            //修改
+            if (!this.isCopy) {
+              const param = {
+                title: this.form.title,
+                description: this.form.description,
+                detailId: this.modiId
+              };
+              api.updateVersionDetailsCDSS(param).then(res => {
+                this.confirmDisable = false;
+                if (res.data.code == 0) {
+                  this.$message({
+                    message: '修改成功',
+                    type: 'success'
+                  });
+                  this.getList();
+                  /*for(let i in this.list){
+                      if(this.list[i].id==this.modiId){
+                        this.list[i].title=this.form.title;
+                        this.list[i].description=this.form.description;
+                      }
+                    }*/
+
+                  this.reset();
+                } else {
+                  this.$message({
+                    message: res.data.msg,
+                    type: 'warning'
+                  });
+                }
+              });
+            } else {
+              for (let i in this.list) {
+                if (this.list[i].id == this.modiId) {
+                  this.list[i].title = this.form.title;
+                  this.list[i].description = this.form.description;
+                }
+              }
+              this.$emit('func', this.list); //向父组件传明细
+              this.reset();
+            }
+          } else if (this.showDesc) {
+            //明细
+            this.confirmDisable = false;
+            this.reset();
+          } else {
+            //添加
+            const item = {
+              description: this.form.description,
+              title: this.form.title
+            };
+            if (!this.isCopy && this.versionId) {
+              const params = {
+                versionDetail: [item],
+                versionInfoId: this.versionId
+              };
+              api.addVersionDetailsCDSS(params).then(res => {
+                this.confirmDisable = false;
+                if (res.data.code == 0) {
+                  this.$message({
+                    message: '添加成功',
+                    type: 'success'
+                  });
+                  this.getList();
+                  /*this.list.push(item);*/
+                  this.reset();
+                } else {
+                  this.$message({
+                    message: res.data.msg,
+                    type: 'warning'
+                  });
+                }
+              });
+            } else {
+              //仅添加到本地list
+              this.confirmDisable = false;
+              if (this.modiIndex !== null) {
+                this.list[this.modiIndex].description = this.form.description;
+                this.list[this.modiIndex].title = this.form.title;
+              } else {
+                this.list.push(item);
+              }
+              this.$emit('func', this.list);
+              this.reset();
+            }
+          }
+          // this.reset();
+        } else {
+          return false;
+        }
+      });
+    },
+    reset() {
+      //关闭弹窗复原数据
+      this.showBox = false;
+      this.showDesc = false;
+      this.form.title = '';
+      this.form.description = '';
+      this.modiId = null;
+      this.minTitle = '';
+      this.tip = true;
+      this.modiIndex = null;
+    },
+    cancel() {
+      this.reset();
+    },
+    getDetail(item) {
+      //明细
+      this.minTitle = '说明明细';
+      this.tip = false;
+      this.showDesc = true;
+      this.showBox = true;
+      this.form.title = item.title;
+      this.form.description = item.description;
+    },
+    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, id, index) {
+      console.log('cancel', item, id, index);
+      this.showConfirmDialog('是否删除该版本说明?', () => {
+        if (!this.isCopy && id) {
+          api
+            .cancelVersionDetailsCDSS({ id })
+            .then(res => {
+              if (res.data.code == '0') {
+                this.warning(res.data.msg || '操作成功', 'success');
+                this.getList();
+                /*let newList = JSON.parse(JSON.stringify(this.list));
+                for(let i in newList){
+                  if(newList[i].id==id){
+                    this.list.splice(i,1);
+                  }
+                }*/
+              } else {
+                this.warning(res.data.msg);
+              }
+            })
+            .catch(error => {
+              this.warning(error);
+            });
+        } else {
+          let newList = JSON.parse(JSON.stringify(this.list));
+          for (let i in newList) {
+            if (id && newList[i].id == id) {
+              this.list.splice(i, 1);
+            } else {
+              //新增的没有id
+              this.list.splice(index, 1);
+            }
+          }
+          this.$emit('func', this.list);
+        }
+      });
+    }
+  },
+  watch: {
+    list: function(newVal, oldVal) {
+      return newVal;
+    }
+  }
+};
+</script>
+<style lang="less" >
+@import '../../../less/admin.less';
+.disclButn1 {
+  margin: 30px 0 10px;
+}
+.boxMark {
+  position: fixed;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  text-align: center;
+  // background: #808080;
+  background-color: rgba(0, 0, 0, 0.3);
+  z-index: 1001;
+}
+// .el-form{
+.add-desc-form {
+  width: 680px;
+  position: absolute;
+  top: 15%;
+  left: 50%;
+  // margin-top: -143px;
+  margin-left: -340px;
+  background: #fff;
+  padding: 20px;
+  max-height: 660px;
+  overflow-y: auto;
+}
+.top {
+  font-size: 15px;
+  font-weight: bold;
+  color: #545455;
+  text-align: left;
+  // padding-bottom: 10px;
+  margin-bottom: 15px;
+  // border-bottom: 1px solid #C9C9C9;
+  position: relative;
+  img {
+    position: absolute;
+    right: 5px;
+  }
+}
+.can,
+.can:hover {
+  background: #9b9b9b;
+  border-color: #9b9b9b;
+}
+.cont {
+  text-align: left;
+}
+.version-desc .el-table__body-wrapper {
+  max-height: 340px;
+  overflow-y: auto;
+}
+.version-desc .el-table th {
+  padding: 0px;
+}
+.tip {
+  font-weight: normal;
+  font-size: 13px;
+  color: #22ccc8;
+}
+</style>

+ 58 - 0
src/components/cdssManage/version/VersionDetail.vue

@@ -0,0 +1,58 @@
+<template>
+  <div>
+    <crumbs title="版本信息维护-明细" linkTo="VersionCDSS"></crumbs>
+    <div class="contents">
+      <div class="content">
+        <el-form ref="form" :label-position="labelPosition" label-width="85px" class="add-admin-form">
+          <el-form-item label="版本号:">
+              <p>{{data.name}}</p>
+          </el-form-item>
+          <el-form-item label="版本时间:">
+              <p>{{data.refreshTime}}</p>
+          </el-form-item>
+          <el-form-item label="版本备注:">
+              <p>{{data.remark}}</p>
+          </el-form-item>
+          <el-form-item label="版本说明:" v-if="list.length>0">
+              <!-- <p>{{data.remark}}</p> -->
+          </el-form-item>
+        </el-form>
+        <!-- 只有第一条可修改,内部的说明也是 -->
+        <VersionDesc :detail="list" :versionId="data.id" :isFirst="isFirst"/>
+      </div>    
+    </div>
+  </div>
+</template>
+<script type="text/javascript">
+  import api from '@api/icss.js';
+  import VersionDesc from './VersionDesc.vue';
+  export default {
+    name:'VersionDetailCDSS',
+    data(){
+      return{
+        data:{},
+        list:[],
+        labelPosition:'left',
+        isFirst:null
+      }
+    },
+    created(){
+      const info = this.$route.params.info;
+      this.data = info;
+      this.list = info.detail?info.detail:[];
+      this.isFirst = this.$route.params.isFirst;
+    },
+    components:{
+      VersionDesc
+    }
+  }
+</script>
+<style lang="less" scoped>
+  @import "../../../less/admin.less";
+  .content{
+    background: #fff;
+    padding: 20px 20px 30px;
+    color: #545455;
+    min-width: 980px;
+  }
+</style>

+ 58 - 37
src/components/common/Crumbs.vue

@@ -1,52 +1,73 @@
 <template>
-    <div class="container clearfix" :style="{'minWidth':minWidth?minWidth:'980px'}">
-        <img v-if="linkTo" class="return-btn fl" src="../../images/return.png" alt="返回按钮" @click="goBack">
-        <h4 class="fl">{{title}}</h4>
-        <div class="contents fr">
-            <slot></slot>
-        </div>
+  <div class="container clearfix" :style="{'minWidth':minWidth?minWidth:'980px'}">
+    <img
+      v-if="linkTo"
+      class="return-btn fl"
+      src="../../images/return.png"
+      alt="返回按钮"
+      @click="goBack"
+    />
+    <h4 class="fl" :title="isShowEllipsis ? title : ''" ref="title">{{title}}</h4>
+    <div class="contents fr">
+      <slot></slot>
     </div>
+  </div>
 </template>
 
 <script>
-  export default {
-    name: 'crumbs',
-    props: ['title','linkTo','minWidth','param'],//minWidth-有些头部选项比较多,最小宽度需要调整
-    data: function () {
-      return {}
-    },
-    methods:{
-      goBack(){
-        this.$router.push({
-          name:this.linkTo,
-          params:this.param
-        });
+export default {
+  name: 'crumbs',
+  props: ['title', 'linkTo', 'minWidth', 'param'], //minWidth-有些头部选项比较多,最小宽度需要调整
+  data: function() {
+    return {
+      isShowEllipsis: false // 是否显示文字省略号
+    };
+  },
+  mounted() {
+    setTimeout(() => {
+      let titleText = this.$refs.title.innerText;
+      if (titleText.length > 19) {
+        this.isShowEllipsis = true;
       }
+    }, 200);
+    // console.log(this.isShowEllipsis,'isShowEllipsis');
+  },
+  methods: {
+    goBack() {
+      this.$router.push({
+        name: this.linkTo,
+        params: this.param
+      });
     }
   }
+};
 </script>
 
 <style lang="less" scoped>
-    @import "../../less/common.less";
+@import '../../less/common.less';
 
-    div.container {
-        width: calc(100% - 50px);
-        height: 40px;
-        background: #fff;
-        padding: 0 20px 0 30px;
-        margin-bottom: 20px;
-        line-height: 40px;
-        position: absolute;
-        z-index: 5;
-        // min-width: 980px;
-    }
+div.container {
+  width: calc(100% - 50px);
+  height: 40px;
+  background: #fff;
+  padding: 0 20px 0 30px;
+  margin-bottom: 20px;
+  line-height: 40px;
+  position: absolute;
+  z-index: 5;
+  // min-width: 980px;
+}
 
-    .return-btn{
-        margin: 11px 5px 0 0;
-        cursor: pointer;
-    }
+.return-btn {
+  margin: 11px 5px 0 0;
+  cursor: pointer;
+}
 
-    h4 {
-        font-size: 15px;
-    }
+h4 {
+  font-size: 15px;
+  width: 280px;
+  overflow: hidden; /*超出部分隐藏*/
+  white-space: nowrap; /*不换行*/
+  text-overflow: ellipsis; /*超出部分文字以...显示*/
+}
 </style>

+ 1 - 0
src/components/common/HomePage.vue

@@ -182,6 +182,7 @@
       },
       logout(){//退出
         localStorage.removeItem('token');
+        localStorage.removeItem('menuPath');
         this.$router.push({path:'/'});
       }
     }

+ 65 - 41
src/components/common/Menu.vue

@@ -1,55 +1,79 @@
 <template>
-    <el-menu :router="true"
-            :default-active="defaultMItem"
-            class="el-menu-vertical-demo">
-        <template v-for="(item,index) in data">
-            <el-menu-item :index="'/'+role+'/'+item.code" v-if="item.subMenuList.length==0">
-                <!-- <i v-bind:class="icons[item.code]"></i> -->
-                <i class="el-icon-location"></i>
-                <span slot="title">{{item.name}}</span>
-            </el-menu-item>
-            <el-submenu v-if="item.subMenuList.length>0" :index="index+1+''">
-                <template slot="title">
-                    <i class="el-icon-location"></i>
-                    <span>{{item.name}}</span>
-                </template>
-                <el-menu-item v-for="(sub,i) in item.subMenuList" :index="'/'+role+'/'+sub.code"><p>{{sub.name}}</p></el-menu-item>
-            </el-submenu>
+  <el-menu
+    :router="true"
+    :default-active="defaultActive"
+    class="el-menu-vertical-demo"
+    @select="handleSelect"
+  >
+    <template v-for="(item,index) in data">
+      <el-menu-item :index="'/'+role+'/'+item.code" v-if="item.subMenuList.length==0">
+        <!-- <i v-bind:class="icons[item.code]"></i> -->
+        <i class="el-icon-location"></i>
+        <span slot="title">{{item.name}}</span>
+      </el-menu-item>
+      <el-submenu v-if="item.subMenuList.length>0" :index="index+1+''">
+        <template slot="title">
+          <i class="el-icon-location"></i>
+          <span>{{item.name}}</span>
         </template>
-    </el-menu>
+        <el-menu-item v-for="(sub,i) in item.subMenuList" :index="'/'+role+'/'+sub.code">
+          <p>{{sub.name}}</p>
+        </el-menu-item>
+      </el-submenu>
+    </template>
+  </el-menu>
 </template>
 
 <script>
-  import config from '@api/config.js';
+import config from '@api/config.js';
 
-  export default {
-    name: 'lt-menu',
-    props: ['data', 'role'],
-    data: function () {
-      return {
-        icons: config.menuIconList
-      }
-    },
-    computed:{
-        defaultMItem:function () {
-            let route = this.$route.path;
-            return route;
-        }
-    },
-    methods: {
+export default {
+  name: 'lt-menu',
+  props: ['data', 'role'],
+  data: function() {
+    return {
+      icons: config.menuIconList,
+      defaultActive: ''
+    };
+  },
+  computed: {
+    defaultMItem: function() {
+      let route = this.$route.path;
+      return route;
+    }
+  },
+  created() {
+    // console.log(this.$route,'this.$route');
+    this.defaultActive = this.$route.fullPath;
+
+    // let menupath = localStorage.getItem('menuPath');
+    // this.defaultActive = this.$route.fullPath;
+    // console.log(this.defaultActive,'defaultActive');
+    // console.log(menupath,'menupath');
+    // if (this.$route.fullPath != menupath) {
+    //   this.defaultActive = menupath;
+    //   this.$router.push({ path: menupath });
+    // } else {
+    //   this.defaultActive = this.$route.fullPath;
+    // }
+  },
+  methods: {
+    handleSelect(key, keyPath) {
+      localStorage.setItem('menuPath', key);
     }
   }
+};
 </script>
 
 <style lang="less" scoped>
-    .el-menu-item p{
-        display: table-cell;
-        vertical-align: middle;
-        white-space: normal;
-        line-height: 20px;
-        height: 50px;
-    }
-  /*.el-menu-vertical-demo {
+.el-menu-item p {
+  display: table-cell;
+  vertical-align: middle;
+  white-space: normal;
+  line-height: 20px;
+  height: 50px;
+}
+/*.el-menu-vertical-demo {
     min-width: 300px;
   }*/
 </style>

+ 293 - 26
src/components/icss/AddMedicinePrompt.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="NoiseTemplateWrapper TemplateWrapper">
+    <div class="NoiseTemplateWrapper TemplateWrapper knowledgeWrapper">
         <crumbs
           :title="'医学术语静态知识维护-'+title"
           class="topBack"
@@ -29,8 +29,12 @@
                 <el-form-item label="已选择标准术语:" label-width="160px">
                     {{form.selectedTermName}}
                 </el-form-item>
+               
                 <p class="line"></p>
+                 
+               
                 <InfoParagraph v-for="(f,i) in form.prags"
+                                v-if="!upload"
                                :data="f"
                                :index="i"
                                :total="form.prags.length"
@@ -39,6 +43,34 @@
                                @add="addParagraph(i)"
                                @del="delParagraph"
                                @reOrder="reOrder"></InfoParagraph>
+                <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
@@ -75,25 +107,48 @@
           isTip:0,                 //是否要覆盖,0不覆盖,1覆盖
           selectedTerm:'',            //术语标签
           termType:'',
+          typeId:'',
           selectedTermName:'',
           selectedTermType:'',
+          fileList:[],
           prags:[{              //单个段落相关
             title:'',
             content:'',
             isReason:0,
             orderNo:0,
             position:[],
-            text:''}]
+            text:''}],
+          fileTitle:'',          
         },
         rules: {
           selectedTerm: [
             { required: true, message: '请选择术语标签', trigger: 'change' }
+          ],
+           fileTitle: [
+            { required: true, message: '请输入标题名称', trigger: 'change' },
+            { validator: (rule,value,callback)=>{
+                if(value.length>30){
+                  callback(new Error('标题名称不能超过30字'));
+                }else{
+                  callback();
+                }}, trigger: 'change' }
+          ],
+          fileList: [
+             { required: true, message: '请上传文件', trigger: 'change' },             
           ]
         },
         saveDisable: false,  //保存按钮禁止点击
         showDrop:false,        //下拉框显示文字bug1774
+        config:config,
+        showUpLoad:true,
+        showFileList: false,
+        upload: false,
+        showConfirm: true,
+        isSuccessUpload: 0, //是否上传成功  0: 不在上传  1: 上传过程中  2: 上传成功
+        isShowTip: false
       }
     },
+
     /*watch:{
       'form.selectedTerm':function(newVal){
         const name = newVal.nameType;console.log(newVal)
@@ -114,15 +169,26 @@
         api.getTremList({conceptId:data.conceptId}).then((res) => {
           if (res.data.code == '0') {
             const data = res.data.data;
-            this.form.prags=data&&data.map((it)=>{
-              return {
-                        title:it.title,
-                        position:this.mapStringToNum(it.position),
-                        content:it.content.replace(/{imageUrlPrefix}/g,config.imgHost),
-                        isReason:it.isReason,
-                        text:it.text,
-                        disabled:true};
-            });
+            
+            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);
+              });
+              console.log(' this.form.fileList', this.form.fileList)
+              this.showFileList = true
+              this.showUpLoad = false
+            }else{
+              this.form.prags=data&&data.map((it)=>{
+                return {
+                          title:it.title,
+                          position:this.mapStringToNum(it.position),
+                          content:it.content.replace(/{imageUrlPrefix}/g,config.imgHost),
+                          isReason:it.isReason,
+                          text:it.text,
+                          disabled:true};
+              });
+            }
 
           }
         }).catch((error) => {
@@ -130,13 +196,63 @@
         });
       }
     },
+    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()
+       }
+
+    },
     methods: {
+      handleMouseenter(){
+        if(this.form.fileList.length !== 0 ){
+          this.isShowTip = true
+        }
+      },
+      handleMouseleave(){
+        this.isShowTip = false
+      },
       changeWord(newVal){
         const name = newVal.nameType;
         this.form.selectedTermName = name;
         this.form.selectedTerm=name;
         this.form.conceptId = newVal.conceptId;
+        this.form.fileList=[]
+        this.showFileList = false
+        this.form.typeId = newVal.typeId || ""
+        this.showUpLoad = true
+        this.form.fileTitle = "" 
+        if(newVal.typeId === 82 || newVal.typeId === 83){
+          this.upload = true
+          this.form.fileTitle = newVal.title
+        }else{
+          this.upload = false
+        }
       },
+      
       reOrder(isUp,i){
         let temp = {},it={};
         if(isUp===1){
@@ -212,6 +328,11 @@
         })
       },
       submitForm() {
+        if(this.isSuccessUpload === 1) {
+          this.warning('文件上传中,请稍等')
+          return 
+        }
+
         //验证外层表单
         let goOn=true,it=null;
         this.$refs.groups.validate((valid) =>{
@@ -221,34 +342,55 @@
           }
         });
         //验证段落表单
-        for(let i=0;i<this.$refs.subForm.length;i++){
-          it=this.$refs.subForm[i];
-          it.$refs.form.validate((valid) =>{
-            if(!valid){
-              goOn = false;
-            }
-          });
-        };
+        if(this.form.typeId !== 82 && this.form.typeId !== 83){
+          for(let i=0;i<this.$refs.subForm.length;i++){
+            it=this.$refs.subForm[i];
+            it.$refs.form.validate((valid) =>{
+              if(!valid){
+                goOn = false;
+              }
+            });
+          };
+        }
+        
 
         if(!goOn){
           return;
         }
         //通过必填验证,提交保存
         const item=this.form.prags;
-        const param =item.map((it,i)=>{
-          return Object.assign({},it,{
-                                        position:typeof it.position=='string'?it.position:it.position.join(","),
-                                        conceptId:this.form.conceptId,
-                                        orderNo:i,
-                                        content:it.content.replace(new RegExp(config.imgHost,'g'),'{imageUrlPrefix}')});
-        });
+        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 {
+          param =item.map((it,i)=>{
+            return Object.assign({},it,{
+                    position:typeof it.position=='string'?it.position:it.position.join(","),
+                    conceptId:this.form.conceptId,
+                    orderNo:i,
+                    content:it.content.replace(new RegExp(config.imgHost,'g'),'{imageUrlPrefix}')});
+          });
+        }
         this.showSaveDialog(param,'是否保存该静态知识?');
       },
       showSaveDialog(param,msg) {
         this.showConfirmDialog(msg, () => {
           this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
           api.saveTermPrompts(param).then((res) => {
+           
             if (res.data.code === '0') {
+              this.isSuccessUpload = 0 // 修改文件上传状态为0
               this.warning(res.data.msg || '保存成功', 'success');
               //返回带搜索条件的首页
               this.$router.push({name:'MedicinePrompt',params:Object.assign({},this.$route.params,{currentPage:1})});
@@ -279,6 +421,74 @@
           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
+        console.log('aaaaaaaaaa',file);
+        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.$confirm(`确定移除 ${ file.name }?`,'',{
+             cancelButtonClass:"cacelBtn"
+            });
+        }
+       
+      }
     }
   }
 </script>
@@ -315,5 +525,62 @@
     .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;
+    }
+
+
+ 
 </style>
 

+ 2 - 2
src/components/icss/MedicineInfoPg.vue

@@ -106,10 +106,10 @@
             { required: true, message: '请选择显示位置', trigger: 'change' }
           ],
           title: [
-            { required: true, message: '请输入段落标题', trigger: 'change' },
+            { required: true, message: '请输入标题名称', trigger: 'change' },
             { validator: (rule,value,callback)=>{
                 if(value.length>30){
-                  callback(new Error('段落标题不能超过30字'));
+                  callback(new Error('标题名称不能超过30字'));
                 }else{
                   callback();
                 }}, trigger: 'change' }

+ 2 - 2
src/components/icss/MedicinePrompt.vue

@@ -69,8 +69,8 @@
                         <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" class="is-disabled">修改</el-button>
                         <el-button v-if="scope.row.isDeleted=='N'" type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
                         <span style="margin:0 3px;">|</span>
-                        <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" class="is-disabled">复制</el-button>
-                        <el-button v-if="scope.row.isDeleted=='N'" type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
+                        <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 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>

+ 1 - 1
src/components/preTreat/AddSimpleQuestion.vue

@@ -16,7 +16,7 @@
         ></PubIndeptQa>
         <div class="main">
             <p class="title" v-if="dataPub.region2==1||dataPub.region2==2|| dataPub.region2==3|| dataPub.region2==11|| dataPub.region2==8">
-                填写单明细:<span v-if="dataPub.region2==2">(互斥项与其他明细内容互斥,互斥项同时只可选择一个)</span>
+                填写单明细:<!--<span v-if="dataPub.region2==2">(互斥项与其他明细内容互斥,互斥项同时只可选择一个)</span>-->
             </p>
             <PubSelect
                     v-if="dataPub.region2==1 || dataPub.region2==2 || dataPub.region2==3 || dataPub.region2==11|| dataPub.region2==8|| dataPub.region2==10"

+ 16 - 15
src/components/preTreat/PubSelect.vue

@@ -2,25 +2,23 @@
   <div class="single-container" @click="hideQas">
     <el-form>
       <div class="operation-row">
-        <el-checkbox-group size="small">
-          <el-checkbox-button
-            :label="0"
+        <!--<el-checkbox-group size="small">-->
+          <el-button
             v-if="type!=8&&type!=10"
             :disabled="disableBtn"
-            @change="handlePlaceholder(0)"
-          >文字输入框占位符</el-checkbox-button>
-        </el-checkbox-group>
-        <el-checkbox-group size="small">
-          <el-checkbox-button
-            :label="0"
+            @click="handlePlaceholder(0)"
+          >文字输入框占位符</el-button>
+        <!--</el-checkbox-group>
+        <el-checkbox-group size="small">-->
+          <el-button
             v-if="type!=8&&type!=10"
             :disabled="disableBtn"
-            @change="handlePlaceholder(1)"
-          >数字输入框占位符</el-checkbox-button>
-        </el-checkbox-group>
-        <el-checkbox-group size="small" v-if="type==2" v-model="checkedExc">
-          <el-checkbox-button :label="0" @change="handleExclu">互斥项</el-checkbox-button>
-        </el-checkbox-group>
+            @click="handlePlaceholder(1)"
+          >数字输入框占位符</el-button>
+        <!--</el-checkbox-group>
+        <el-checkbox-group size="small" v-model="checkedExc">-->
+          <el-button v-if="type==2" @click="handleExclu">互斥项</el-button>
+        <!--</el-checkbox-group>-->
         <el-button type="danger" size="small" class="del" @click="delRow">删除</el-button>
       </div>
       <div class="main-area" v-if="type!=3">
@@ -688,6 +686,9 @@ export default {
   right: -150px;
   top: 0;
 }
+.el-button--default:focus{
+  background-color: #fff;
+}
 .pool {
   position: relative;
 }

+ 6 - 4
src/components/qualityControl/AddCombineFeild.vue

@@ -157,18 +157,20 @@
     },
     methods:{
       getAllTypes(){
-        if(localStorage.getItem("qcModuleTypes")){
+        /*if(localStorage.getItem("qcModuleTypes")){
           this.hisTypes = JSON.parse(localStorage.getItem("qcHospitalTypes"));
           this.fieldTypes = JSON.parse(localStorage.getItem("qcModuleTypes"));
           return ;
-        }
+        }*/
         //获取枚举信息
         api.getQcTypes().then((res)=>{
           if(res.data.code==="0"){
             const data = res.data.data;
-            localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
+            /*localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
             localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
-            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
+            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));*/
+            this.hisTypes = data[13];
+            this.fieldTypes =data[12];
           }else{
             this.warning("获取枚举信息失败");
           }

+ 87 - 22
src/components/qualityControl/AddQcType.vue

@@ -14,14 +14,27 @@
                                     v-for="item in hisTypes"
                                     :key="item.val"
                                     :label="item.name"
-                                    :value="Number(item.val)">
+                                    :value="item.val">
                             </el-option>
                         </el-select>
                     </el-form-item>
                     <el-form-item label="质控类型:" prop="name">
                         <el-input type="text" placeholder="请输入质控类型" v-model="form.name"></el-input>
                     </el-form-item>
-                    <el-form-item label="质控条目:" prop="qcItem">
+                    
+                    <!-- <el-form-item label="默认标准类型:" class="formItem widthLarge">
+                      <el-switch
+                        v-model="form.defaultModule"
+                        :active-value="1"
+                        :inactive-value="0"
+                        active-color="#4BC4D7"
+                        inactive-color="#BBBBBB"
+                        @change="handleTemChange($event,form.defaultModule)"
+                      ></el-switch>
+                      <span class="showInfo">{{form.defaultModule==1?'是':'否'}}</span>
+                    </el-form-item> -->
+
+                    <el-form-item label="质控条目:" prop="qcItem" :class="spread?'qcitem-list':'qcitem-list-up'">
                         <el-collapse>
                             <el-collapse-item v-for="(item,i) in qcItemList" :title="i" :name="i">
                                 <el-table
@@ -31,26 +44,41 @@
                                             align="center"
                                             width="90">
                                         <template slot-scope="scope">
-                                            <el-checkbox v-model="scope.row.sel" :checked="scope.row.sel?true:false" true-label="1" false-label="0"></el-checkbox>
+                                            <el-checkbox v-model="scope.row.sel" :checked="scope.row.sel?true:false" :true-label="1" :false-label="0"></el-checkbox>
                                         </template>
                                     </el-table-column>
-                                    </el-table-column>
                                     <el-table-column
                                             prop="name"
-                                            width="500"
+                                            width="460"
                                             label="质控条目">
                                     </el-table-column>
                                     <el-table-column
-                                            width="160"
-                                            label="是否启用">
+                                            width="100"
+                                            label="终末质控">
                                         <template slot-scope="scope">
                                             {{scope.row.isUsed==="1"?"是":"否"}}
                                         </template>
                                     </el-table-column>
+                                    <el-table-column
+                                            width="100"
+                                            label="运行质控">
+                                        <template slot-scope="scope">
+                                            {{scope.row.isUsedRun==="1"?"是":"否"}}
+                                        </template>
+                                    </el-table-column>
                                 </el-table>
                             </el-collapse-item>
                         </el-collapse>
                     </el-form-item>
+                    <img v-if="spread" src="../../images/up.png" class="spread-icon" @click="toggleSpread" title="收起" alt="收起"/>
+                    <img v-if="!spread" src="../../images/spread.png" class="spread-icon" @click="toggleSpread" title="展开" alt="展开"/>
+                    <el-form-item label="其他质控类型:" prop="typeIdList" class="formItem widthLarge">
+                    </el-form-item>
+                    <OtherQcTypePour :hospital="form.hospitalId"
+                                     :moduleName="form.entryId"
+                                     :typeId="form.id"
+                                     @changeActionData="moduleTypeChange"
+                                     :selectedTag="form.qcTypeSimpDTOList"></OtherQcTypePour>
                     <el-button class="disclButn" size="small" type="primary" :disabled = 'saveDisable' @click="comfirn('form')">确定</el-button>
                 </el-form>
             </div>
@@ -59,6 +87,7 @@
 </template>
 <script type="text/javascript">
   import api from '@api/qualityControl.js';
+  import OtherQcTypePour from './OtherQcTypePour.vue';
   export default {
     name:'AddQcType',
     data(){
@@ -67,11 +96,17 @@
         list:[],
         labelPosition:'left',
         title:'质控类型维护-添加质控类型',
+        spread:false,
+        hisTypes:[],
         form:{
           id:'',
-          hospitalId:"",
+          hospitalId:'',
           name:'',
-          qcTypeCasesEntryVOList:[]
+          qcTypeCasesEntryVOList:[],
+          qcTypeSimpDTOList:[],
+          entryId:'',     //兼容
+          typeIdList:[],//其他质控类型id
+          // defaultModule: 0
         },
         rules:{
           hospitalId:{ required: true, message: '请选择所属医院', trigger: ['blur', 'change']},
@@ -86,11 +121,15 @@
             }, trigger: 'blur'
           }],
         },
+        showInfo: '否',
         copy:null,
         saveDisable: false,  //保存按钮禁止点击
         qcItemList:{},
       }
     },
+    components:{
+      OtherQcTypePour
+    },
     created(){
       this.getAllTypes();
       let {isCopy,info} = this.$route.params;
@@ -101,15 +140,20 @@
         this.qcItemList=infoCopy.entryMap;
         this.form = {
           id:isCopy?"":infoCopy.id,
-          hospitalId:infoCopy.hospitalId,
+          hospitalId:''+infoCopy.hospitalId,
           name:infoCopy.name,
-          qcTypeCasesEntryVOList:[]
+          qcTypeCasesEntryVOList:[],
+          qcTypeSimpDTOList:isCopy?[]:infoCopy.qcTypeSimpDTOList,
+          // defaultModule:+infoCopy.defaultModule
         };
         //this.getQcTypeItem({hospitalId:info.hospitalId});
       }else{
-        let hospitalId = localStorage.getItem("qcSelectHospital")||this.hisTypes[0].val;
-        this.form.hospitalId = +hospitalId;
-        this.getQcTypeItem({hospitalId:hospitalId});
+        const that = this;
+        setTimeout(()=>{
+          let hospitalId = that.hisTypes[0].val;
+          that.form.hospitalId = hospitalId;
+          that.getQcTypeItem({hospitalId:hospitalId});
+        },100)
       }
     },
     watch:{
@@ -118,7 +162,7 @@
           let list = [];
           for(let it in val){
             val[it].map((t)=>{
-              if(t.sel==='1'){
+              if(t.sel=='1'){
                 list.push({caseEntryId:t.id});
               }
             })
@@ -129,6 +173,13 @@
       }
     },
     methods:{
+      handleTemChange() {},
+      toggleSpread(){
+        this.spread=!this.spread;
+      },
+      moduleTypeChange(list){
+        this.form.typeIdList=[...list];
+      },
       changeHospital(val){
         localStorage.setItem("qcSelectHospital",val);
         this.getQcTypeItem({hospitalId:val});
@@ -142,24 +193,25 @@
         api.getQcTypeItem(param).then((res)=>{
           if(res.data.code==="0") {
             const data = res.data.data;
-            this.qcItemList = data;console.log(this.qcItemList)
+            this.qcItemList = data;
           }else{
             this.warning("获取缺陷条目失败");
           }
         });
       },
       getAllTypes(){
-        if(localStorage.getItem("qcHospitalTypes")){
+        /*if(localStorage.getItem("qcHospitalTypes")){
           this.hisTypes = JSON.parse(localStorage.getItem("qcHospitalTypes"));
           return ;
-        }
+        }*/
         //获取枚举信息
         api.getQcTypes().then((res)=>{
           if(res.data.code==="0"){
             const data = res.data.data;
-            localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
+            this.hisTypes =data[13];
+            /*localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
             localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
-            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
+            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));*/
           }else{
             this.warning("获取枚举信息失败");
           }
@@ -169,7 +221,7 @@
         this.$refs[form].validate((valid) => {
           if (valid) {
             if(this.form.id){//修改
-              const param = Object.assign({},this.form);
+              let param = Object.assign({},this.form,{qcTypeSimpDTOList:undefined});
               param.name=param.name.trim();
               this.saveDisable = true;  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.addQcType(param).then((res)=>{
@@ -192,7 +244,7 @@
                 this.saveDisable = false
               })
             }else{//添加
-              const params = Object.assign({},this.form);
+              let params = Object.assign({},this.form);
               params.name=params.name.trim();
               this.saveDisable = true;  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.addQcType(params).then((res)=>{
@@ -253,4 +305,17 @@
     .el-select.big-select{
         width: 360px;
     }
+    .showInfo {
+      margin-left: 16px;
+    }
+    .qcitem-list-up{
+        max-height: 150px;
+        overflow-y: hidden;
+    }
+    .spread-icon{
+        width: 20px;
+        height: 20px;
+        cursor: pointer;
+        margin-left: 448px;
+    }
 </style>

File diff suppressed because it is too large
+ 651 - 500
src/components/qualityControl/AddQualityControlTemp.vue


+ 4 - 4
src/components/qualityControl/BaseFieldList.vue

@@ -152,18 +152,18 @@
         return field[0]?field[0].name:'';
       },
       getAllTypes(){
-        if(localStorage.getItem("qcModuleTypes")){
+        /*if(localStorage.getItem("qcModuleTypes")){
           this.hisTypes = JSON.parse(localStorage.getItem("qcHospitalTypes"));
           this.fieldTypes = JSON.parse(localStorage.getItem("qcModuleTypes"));
           this.getDataList();
           return ;
-        }
+        }*/
         //获取枚举信息
         api.getQcTypes().then((res)=>{
           if(res.data.code==="0"){
             const data = res.data.data;
-            localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
-            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
+            //localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
+            //localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
             this.hisTypes =data[13];
             this.fieldTypes =data[12];
             this.getDataList();

+ 4 - 4
src/components/qualityControl/CombineFeildList.vue

@@ -133,18 +133,18 @@
         return field[0]?field[0].name:'';
       },
       getAllTypes(){
-        if(localStorage.getItem("qcModuleTypes")){
+        /*if(localStorage.getItem("qcModuleTypes")){
           this.hisTypes = JSON.parse(localStorage.getItem("qcHospitalTypes"));
           this.fieldTypes = JSON.parse(localStorage.getItem("qcModuleTypes"));
           this.getDataList();
           return ;
-        }
+        }*/
         //获取枚举信息
         api.getQcTypes().then((res)=>{
           if(res.data.code==="0"){
             const data = res.data.data;
-            localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
-            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
+            //localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
+            //localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
             this.hisTypes =data[13];
             this.fieldTypes =data[12];
             this.getDataList();

+ 6 - 4
src/components/qualityControl/FieldMatch.vue

@@ -212,18 +212,20 @@
         });
       },
       getAllTypes(){
-        if(localStorage.getItem("qcModuleTypes")){
+        /*if(localStorage.getItem("qcModuleTypes")){
           this.hisTypes = JSON.parse(localStorage.getItem("qcHospitalTypes"));
           this.fieldTypes = JSON.parse(localStorage.getItem("qcModuleTypes"));
           return ;
-        }
+        }*/
         //获取枚举信息
         api.getQcTypes().then((res)=>{
           if(res.data.code==="0"){
             const data = res.data.data;
-            localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
+            this.hisTypes =data[13];
+            this.fieldTypes=data[12];
+            /*localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
             localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
-            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
+            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));*/
           }else{
             this.warning("获取枚举信息失败");
           }

+ 5 - 4
src/components/qualityControl/ItemDataType.vue

@@ -161,20 +161,21 @@
         return it?it.name:'';
       },
       getAllTypes(){
-          if(localStorage.getItem("qcModuleTypes")){
+          /*if(localStorage.getItem("qcModuleTypes")){
               this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
               return new Promise(function(resolve, reject){
                   resolve()
               });
-          }
+          }*/
           //获取枚举信息
           return api.getQcTypes().then((res)=>{
               if(res.data.code==="0"){
                   const data = res.data.data;
-                  localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
+                    this.hospitalList =data[13];
+                  /*localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
                   localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
                   localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
-                  this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
+                  this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));*/
               }else{
                   this.warning("获取枚举信息失败");
               }

+ 10 - 8
src/components/qualityControl/ItemDataTypeRelation.vue

@@ -175,22 +175,24 @@ export default {
             
         },
         getAllTypes(){
-            if(localStorage.getItem("qcModuleTypes")){
+            /*if(localStorage.getItem("qcModuleTypes")){
                 this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
                 this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
                 return new Promise(function(resolve, reject){
                     resolve()
                 });
-            }
+            }*/
             //获取枚举信息
             return api.getQcTypes().then((res)=>{
                 if(res.data.code==="0"){
                     const data = res.data.data;
-                    localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
+                  this.hospitalList =data[13];
+                  this.moduleList = data[12];
+                    /*localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
                     localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
                     localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
                     this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
-                    this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
+                    this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));*/
                 }else{
                     this.warning("获取枚举信息失败");
                 }
@@ -341,10 +343,10 @@ export default {
                       this.warning("请输入条目名称:");
                       return
                     }
-                    if(!moduleTypes.length){
-                        this.warning("请选择质控类型");
-                        return
-                    }
+                    // if(!moduleTypes.length){
+                    //     this.warning("请选择质控类型");
+                    //     return
+                    // }
                    
                     
                     // if(moduleDetail.length === 0){

+ 455 - 0
src/components/qualityControl/OtherQcTypePour.vue

@@ -0,0 +1,455 @@
+<template>
+    <div class="qcTypeWrapper commomSymptom clearfix">
+        <QCTipPop :name="curName" :example="curEmp" :show="showPop" :top="popTop" :left="popLeft" @close="closePop"></QCTipPop>
+        <div class="bottomPartLeft">
+            <p style="height: 26px;"> </p>
+          <div class="pool">
+            <ul class="tagList tagPool">
+                <li v-for="(item, index) in leftTagsList"
+                    class = "tagItem"
+                    :key='item.id'
+                    :style="getStyle(item)?styles:null"
+                    @click='selectLeftTag(item, index, $event)'
+                >
+                    <p class="ellipsis" @click="closePop">
+                        <span class="tagName">{{item.name}}</span>
+                        <!-- <span :class="activeId==item.id?'tip-icon active':'tip-icon'" @click.stop="showTipPop(item,$event)"></span> -->
+                    </p>
+                </li>
+            </ul>
+          </div>
+        </div>
+        <div class="bottomPartMid fl">
+            <p><span class="el-icon-arrow-right" @click="toRightList"></span></p>
+            <p><span class="el-icon-arrow-left" @click="toLeftList"></span></p>
+        </div>
+        <div class="bottomPartRight ">
+          <p class="poolTitle">已选质控类型:</p>
+          <ul class="tagList operationPool operationPools">
+                <li class = "tagItem"
+                    v-for="(item) in rightTagsList"
+                    :key='item.id'
+                    :style="getStyle2(item)?styles:null"
+                    @click='selectRightTag(item)'
+                >
+                    <p class="ellipsis" @click="closePop">
+                        <span class="tagName">{{item.name}}</span>
+                        <!-- <span :class="activeId==item.id?'tip-icon active':'tip-icon'" @click.stop="showTipPop(item,$event)"></span> -->
+                    </p>
+                </li>
+            </ul>
+        </div>
+    <!--<div class="buttonBox" :class="(qaType==2)?'rightMore':''">
+        <div class="bottomPartMid bottomPartMidss fl bottomPartMids" >
+            <p><span class="el-icon-arrow-up" @click="toggleTopDownList(1)"></span></p>
+            <p><span class="el-icon-arrow-down" @click="toggleTopDownList(2)"></span></p>
+        </div>
+    </div>-->
+  </div>
+</template>
+<script>
+import api from '@api/qualityControl.js';
+import QCTipPop from './QCTipPop.vue';
+import $ from 'jquery'
+
+export default {
+    name: "OtherQcTypePour",
+    props: ['hospital','moduleName','selectedTag','typeId'],
+    data() {
+        return {
+            checkedExc:false,
+            leftTagsList: [],
+            selectLeftTagsList: [],
+            rightTagsList: [],
+            selectRightTagsList: [],
+            showPop:false,
+            activeId:'',
+            curName:"",
+            curEmp:"",
+            popTop:'',
+            popLeft:'',
+            styles:{
+                background:'#eae7e7'
+            },
+        }
+    },
+    mounted() {
+      //编辑
+        if(this.hospital){
+          const that = this;
+          setTimeout(function(){            //等watch执行后赋值tags,否则这里先执行,会被watch里清空
+            console.log(44,that.selectedTag)
+            that.rightTagsList = [...that.selectedTag];
+            that.getModuleTypeList();
+            that.$emit('changeActionData',that.getModuleTypeIds());
+          },100);
+        }
+    },
+    watch: {
+      hospital(){
+            this.rightTagsList=[];
+          this.getModuleTypeList();
+        },
+      moduleName(){
+            this.rightTagsList=[];
+          this.getModuleTypeList();
+        },
+      /*'selectRightTagsList':{
+          handler:function(newVal){
+          },
+          deep:true
+        }*/
+    },
+    methods: {
+        closePop(){
+          this.activeId = '';
+          this.curName = '';
+          this.curEmp = '';
+          this.popTop = 0;
+          this.popLeft=0;
+          this.showPop=false;
+        },
+        showTipPop(item,e){
+          if(this.showPop&&this.activeId===item.id){
+            this.closePop();
+            return;
+          }
+          const t=$(".el-main").scrollTop();
+          this.activeId = item.id;
+          this.curName = item.name;
+          this.curEmp = item.behospitalCodes;
+          this.popTop = t+e.clientY;
+          this.popLeft=e.clientX;
+          this.showPop = true;
+        },
+        handleExclu(){
+            if(!this.selectRightTagsList||this.selectRightTagsList.length==0){
+              this.$message({
+                showClose: true,
+                message: '请先选择要操作的标签',
+                type: 'warning'
+              });
+              return ;
+            }
+            const arr = this.rightTagsList.map((it)=>{
+              if(it.id==this.selectRightTagsList[0].id){
+                if(it.exclusionType===1){
+                  it.exclusionType = 0
+                }else{
+                  it.exclusionType=1;
+                }
+              }else{
+                it.exclusionType=0;
+              }
+              return it;
+            });
+            this.rightTagsList=arr;
+            this.$emit('changeActionData',this.getModuleTypeIds());
+        },
+        transOptions(opt){
+          return opt&&opt.map((it)=>{
+            return Object.assign({},it,{id:it.questionId||it.id});      //模板是questionId,组合是id
+          });
+        },
+        ifReflashTagList(newVal='', preVal=''){
+          if(newVal.trim() == ''){
+            this.searchVal = '';
+            this.rightTagsList=[];
+            this.getModuleTypeList();
+          }else if(newVal.trim() != preVal.trim()){
+            this.searchVal = '';
+            this.rightTagsList=[];
+            this.getModuleTypeList();
+          }
+        },
+        selectLeftTag(tag) {
+            const hasTag = this.isHasTag(tag, this.selectLeftTagsList);
+            if (hasTag) {
+                this.selectLeftTagsList = this.selectLeftTagsList.filter(item => item.id !== tag.id)
+            } else {
+                this.selectLeftTagsList.push(tag);
+            }
+        },
+        selectRightTag(tag) {
+            /*let tmpArr = [];
+            tmpArr.push(tag);
+            if (this.selectRightTagsList.length > 0 && tag.id == this.selectRightTagsList[0].id) {
+              this.selectRightTagsList = this.selectRightTagsList.filter(item => item.id !== tag.id)
+            }else{
+              this.selectRightTagsList = tmpArr;
+            }*/
+          const hasTag = this.isHasTag(tag, this.selectRightTagsList);
+          if (hasTag) {
+            this.selectRightTagsList = this.selectRightTagsList.filter(item => item.id !== tag.id)
+          } else {
+            this.selectRightTagsList.push(tag);
+          }
+        },
+        isHasTag(item, arr) {
+            for ( let i = 0; i <arr.length; i++) {
+                if(arr[i].id === item.id) {
+                    return true;
+                }
+            }
+            return false;
+        },
+        getStyle(item){       //左侧选中状态
+            return this.isHasTag(item, this.selectLeftTagsList)
+        },
+        getStyle2(item) {
+            return this.isHasTag(item, this.selectRightTagsList);
+        },
+        toggleTopDownList(type){
+          if(this.selectRightTagsList.length == 0 || this.rightTagsList.length == 0){
+            return;
+          }
+          const tmpRightSelect = JSON.parse(JSON.stringify(this.selectRightTagsList));
+          const tmpRightLis = JSON.parse(JSON.stringify(this.rightTagsList));
+          const numLen = tmpRightLis.length;
+          const numId = tmpRightSelect[0].id;
+          if(type == 1){
+            for(let i = 0;i < tmpRightLis.length;i++){
+              if(numId === tmpRightLis[i].id){//选中的是第几个
+                if(i == 0){//第一个不能往上移动
+                  return;
+                }else{//先把这个元素和后面的输入框从数组中删除,再添加到数组里
+                  let tmp1 = tmpRightLis[i];
+                  tmpRightLis.splice(i,1);
+                  tmpRightLis.splice(i-1,0,tmp1);
+                  this.rightTagsList = [...tmpRightLis];
+                  this.$emit('changeActionData',this.getModuleTypeIds(), false);
+                  return
+                }
+              }
+            }
+          }else if(type == 2){
+            for(let i = 0;i < tmpRightLis.length;i++){
+              if(numId === tmpRightLis[i].id){
+                if(i == numLen-1){
+                  return;
+                }else{
+                  let tmp1 = tmpRightLis[i];
+                  tmpRightLis.splice(i,1);
+                  tmpRightLis.splice(i+1,0,tmp1);
+                  this.rightTagsList = [...tmpRightLis];
+                  this.$emit('changeActionData',this.getModuleTypeIds(), false);
+                  return;
+                }
+              }
+            }
+          }
+        },
+        toLeftList() {console.log(this.rightTagsList)
+            this.leftTagsList.push(...this.selectRightTagsList);
+            for (let i = 0; i < this.selectRightTagsList.length; i++) {
+                this.rightTagsList = this.rightTagsList.filter(item => item.id !== this.selectRightTagsList[i].id);
+            }
+            for (let i = 0; i < this.selectRightTagsList.length; i++) {
+                for (let j = 0; j < this.rightTagsList.length; j++) {
+                    if(this.selectRightTagsList[i].id === this.rightTagsList[j].id) {
+                        if(this.rightTagsList.length === 1) {
+                            this.rightTagsList = [];
+                        } else {
+                            this.rightTagsList.splice(j, 1);
+                        }
+                    }
+                }
+            }
+            this.selectLeftTagsList = [];
+            this.selectRightTagsList = [];
+            //this.getModuleTypeList();
+            this.$emit('changeActionData',this.getModuleTypeIds(), false);
+        },
+        toRightList() {
+            this.rightTagsList.push(...this.selectLeftTagsList);
+            for (let i = 0; i < this.rightTagsList.length; i++) {
+                this.leftTagsList = this.leftTagsList.filter(item => item.id !== this.rightTagsList[i].id)
+            }
+            this.selectLeftTagsList = [];
+            this.selectRightTagsList = [];
+            //this.getModuleTypeList();
+            this.$emit('changeActionData',this.getModuleTypeIds(), false);
+        },
+        getModuleTypeList() {
+          this.leftTagsList = []
+          if(this.hospital === ""){
+            return
+          }
+          return api.qcTypeList({hospitalId: ""+this.hospital,id:this.typeId||null, notIdList:this.getModuleTypeIds()||[]}).then((res) =>{
+            if(res.data.code==="0"){
+              const data = res.data.data;
+              this.leftTagsList = data;
+              this.selectLeftTagsList = [];
+              this.selectRightTagsList = [];
+            }else{
+              this.leftTagsList=[];
+              this.selectLeftTagsList = [];
+              this.selectRightTagsList = [];
+              this.warning("获取质控类型失败");
+            }
+          })
+        },
+      getModuleTypeIds(){
+          const list=this.rightTagsList;
+          return list.map((it)=>it.id);
+      },
+      warning(msg, type,time) {
+            this.$message({
+                showClose: true,
+                message: msg,
+                type: type || 'warning',
+                duration:time || '3000'
+            })
+        },
+    },
+    components:{
+      QCTipPop
+    }
+}
+</script>
+
+<style lang="less" scoped>
+@import '../../less/common.less';
+.operation-row{
+    text-align: right;
+}
+.exclu{
+    position: absolute;
+    right: -54px;
+    top: 5px;
+}
+.rightMore{
+    margin-left: 48px;
+}
+.commomSymptom {
+  .tagList.operationPools {
+    width: 100%;
+  }
+  div.bottomPartMids {
+    margin-left: 20px;
+  }
+  div.bottomPartMidss {
+    margin-top: 30px;
+  }
+}
+.qcTypeWrapper {
+    padding-left: 60px;
+    margin:-20px 0 20px;
+    position: relative;
+    .bottomPartLeft {
+        width: 40%;
+        box-sizing: border-box;
+        float: left;
+    }
+    .poolTitle {
+        // border-bottom: 1px solid @icssBorder;
+        box-sizing: border-box;
+        margin-bottom: 10px;
+        font-size: 12px;
+    }
+    .pool {
+        // border:1px solid @icssBorder;
+    
+    }
+    .search {
+        width: 100%;
+        border-bottom: 1px solid @icssBorder;
+        box-sizing: border-box;
+        height: 30px;
+    }
+    .tagList {
+        border: 1px solid @icssBorder;
+    }
+    .ellipsis{
+        .tip-icon{
+            display:inline-block;
+            width:16px;
+            height: 16px;
+            vertical-align: middle;
+            background-image:url("../../images/tip.png");
+            background-size:16px;
+            background-repeat:no-repeat;
+            &:hover,&.active{
+                 background-image:url("../../images/tip1.png");
+            }
+        }
+
+    }
+    /*.pop{
+        display: none;
+        position: absolute;
+        top:-30px;
+        right: -10px;
+        padding: 5px 10px;
+        background: #fff;
+        border:1px #ccc solid;
+        border-radius: 3px;
+        line-height: 20px;
+        font-size: 12px;
+        width: 300px;
+        word-break: break-all;
+        z-index: 1;
+    }*/
+    .tagPool {
+        height: 320px;
+        overflow-y: auto;
+
+    }
+    .tagItem {
+        position: relative;
+        line-height: 30px;
+        cursor: pointer;
+        padding: 0 10px;
+        /*z-index:0;*/
+    }
+    .operationPool {
+        position: relative;
+        width: 60%;
+        height: 300px;
+        padding: 10px 0;
+        overflow: auto;
+    }
+    .tagName{
+        margin-right: 10px;
+        font-size: 14px;
+        vertical-align: middle;
+    }
+    .bottomPartMid {
+        width: 8%;
+        margin-top: 60px;
+        p {
+        width: 100%;
+        text-align: center;
+        span {
+            cursor: pointer;
+            display: inline-block;
+            width: 30px;
+            height: 40px;
+            line-height: 40px;
+            margin: 0 auto;
+            border: 1px solid @icssBorder;
+            margin-bottom: 15px;
+            font-size: 18px;
+        }
+        }
+    }
+    .bottomPartRight {
+        float: left;
+        width: 40%;
+    }
+    .buttonBox {
+        width: 10%;
+        float: left;
+        margin-top: 30px;
+    }
+    .inputBox {
+        width: 120px;
+        .el-input {
+            .el-input__inner {
+                height: 30px;
+                background: rgb(234, 231, 231);
+            }
+        }
+    }
+}
+</style>

+ 100 - 11
src/components/qualityControl/QCTypeMang.vue

@@ -8,7 +8,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="质控类型:">
-                    <el-input size="mini" v-model="filter.name" placeholder="请输入质控类型"></el-input>
+                    <el-input size="mini" v-model="filter.name" placeholder="请输入质控类型" clearable></el-input>
                 </el-form-item>
                 <el-form-item>
                     <el-button size="mini" @click="filterDatas">确认</el-button>
@@ -41,14 +41,26 @@
                         prop="name"
                         label="质控类型">
                 </el-table-column>
+                <!-- <el-table-column :resizable="false" prop="operate" label="默认标准模版">
+                  <template slot-scope="scope">
+                    <el-switch
+                      v-model="scope.row.defaultModule"
+                      :active-value="1"
+                      :inactive-value="0"
+                      active-color="#4BC4D7"
+                      inactive-color="#BBBBBB"
+                      @change="handleTemChange(scope.row)"
+                    ></el-switch>
+                  </template>
+                </el-table-column> -->
                 <el-table-column
                         label="操作" width="150">
                     <template slot-scope="scope">
-                        <el-button type="text" size="small" @click="toEditField(scope.row, 'modify')">修改</el-button>
+                        <el-button type="text" size="small" @click="ifUnbindDialog(scope.row, 'modify')">修改</el-button>
                         <span style="margin:0 3px;">|</span>
                         <el-button type="text" size="small" @click="toEditField(scope.row, 'copy')">复制</el-button>
                         <span style="margin:0 3px;">|</span>
-                        <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row.id)">删除</el-button>
+                        <el-button type="text" size="small" class="delete" @click="ifUnbindDialog(scope.row)">删除</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -107,21 +119,57 @@
       })
     },
     methods: {
+      // 默认标准模版切换
+      handleTemChange(row) {
+        // console.log(row, 'row');
+        let params = {
+          defaultModule: row.defaultModule,
+          defineType: 0,
+          hospitalId: row.hospitalId,
+          id: row.id,
+          modeId: row.modeId,
+          name: row.name
+        };
+
+        api.ControModuleInfo(params).then(res => {
+          // console.log(res.data);
+          if (res.data.code === '-1') {
+            // 互斥
+            this.$alert('默认标准类型已存在,是否替换?', '提示', {
+              confirmButtonText: '确定',
+              type: 'warning'
+            })
+              .then(() => {
+                params = { ...params, defineType: 1 };
+                api.ControModuleInfo(params).then(res => {
+                  // console.log(res,'互斥再次请求的接口返回');
+                  this.getDataList();
+                });
+              })
+              .catch(() => {
+                this.getDataList();
+              });
+          } else if (res.data.code === '0') {
+            // 不互斥
+            this.getDataList();
+          }
+        });      
+      },
       hisFormatter(item){
         const field = this.hisTypes.filter((it)=>it.val==item.hospitalId);
         return field[0]?field[0].name:'';
       },
       getAllTypes(){
-        if(localStorage.getItem("qcHospitalTypes")){
+        /*if(localStorage.getItem("qcHospitalTypes")){
           this.hisTypes = JSON.parse(localStorage.getItem("qcHospitalTypes"));
           this.getDataList();
           return ;
-        }
+        }*/
         //获取枚举信息
         api.getQcTypes().then((res)=>{
           if(res.data.code==="0"){
             const data = res.data.data;
-            localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
+            //localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
             this.hisTypes =data[13];
             this.getDataList();
           }else{
@@ -202,17 +250,52 @@
           type:type||'warning'
         })
       },
-      showConfirmDialog(msg,resolve){
-        this.$alert(msg, '提示', {
-          confirmButtonText: '确定',
+      showConfirmDialog(msg,resolve,okText){
+        this.$confirm(msg, '提示', {
+          confirmButtonText: okText||'确定',
+          cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
           resolve();
         }).catch(() => {});
       },
-      showDelDialog(id){
+      ifUnbindDialog(data,type){
+        api.ifNeedUnbind({id:data.id,hospitalId:data.hospitalId,cancel:null,oper:type==='modify'?'0':'1'}).then((res)=>{
+        const {code,msg} = res.data;
+          if(code==='00000005'){
+            this.showConfirmDialog(msg,()=>{
+              this.unbindQcType(data,type);
+            },'解绑');
+          }else{
+            if(type==='modify'){
+              this.toEditField(data,type);     //编辑
+            }else{
+              this.showDelDialog(data);     //删除
+            }
+          }
+        }).catch((error)=>{
+          this.warning(error);
+        })
+      },
+      unbindQcType(data,type){
+        api.ifNeedUnbind({id:data.id,hospitalId:data.hospitalId,cancel:1}).then((res)=>{
+          if(res.data.code=='0'){
+            this.warning(res.data.msg||'解绑成功','success');
+            if(type==='modify'){
+              this.toEditField(data,type);     //编辑
+            }else{
+              this.showDelDialog(data);     //删除
+            }
+          }else{
+            this.warning(res.data.msg);
+          }
+        }).catch((error)=>{
+          this.warning(error);
+        })
+      },
+      showDelDialog(row){
         this.showConfirmDialog('是否删除该质控类型?',()=>{
-          api.delQcType({ids:[id]}).then((res)=>{
+          api.delQcType({ids:[row.id]}).then((res)=>{
             if(res.data.code=='0'){
               this.warning(res.data.msg||'操作成功','success');
               this.getDataList();
@@ -233,4 +316,10 @@
     .delete{
         color: red !important;
     }
+    .el-message-box__btns .el-button--default span{
+        color: @adminBase;
+    }
+    .el-message-box__btns .el-button--primary span{
+        color: #fff;
+    }
 </style>

+ 384 - 315
src/components/qualityControl/QualityControlTemp.vue

@@ -1,349 +1,418 @@
 <template>
-    <div>
-        <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-form-item>
-                 <el-form-item label="模板名称:">
-                    <el-input size="mini" v-model.trim="filter.modeName" placeholder="模板名称" clearable></el-input>
-                </el-form-item>
-                <el-form-item label="所属模块:">
-                     <el-select size="mini" v-model.trim="filter.modeId" @change="getValue"  placeholder="所属模块" clearable>
-                        <el-option v-for="item in moduleList" :label="item.name" :value="item.val" :key="item.id" ></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="所属医院:">
-                    <el-select size="mini" v-model.trim="filter.hospitalName" @change="getValue"  placeholder="所属医院" clearable>
-                        <el-option v-for="item in hospitalList" :label="item.name" :value="item.val" :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" @click="addTemp">添加模板</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
-                        :resizable = "false"
-                        label="模板Id"
-                        prop="id"
-                        >
-                </el-table-column>
-                <el-table-column
-                        :resizable = "false"
-                        prop="name"
-                        label="模板名称"
-                        width="180">
-                </el-table-column>
-                <el-table-column
-                        :resizable = "false"
-                        prop="modeId"
-                        :formatter="moduleFormatter"
-                        label="所属模块">
-                </el-table-column>
-                
-                <el-table-column
-                        :resizable = "false"
-                        prop="hospitalId"
-                        :formatter="hisFormatter"
-                        label="所属医院">
-                </el-table-column>
-                <el-table-column
-                        :resizable = "false"
-                        prop="operate"
-                        label="操作">
-                    <template slot-scope="scope">
-                        <el-button  @click="modifyIndeptTag(scope.row, 'modify')" type="text" size="small">修改</el-button>
-                        <span style="margin:0 3px;">|</span>
-                        <el-button @click="modifyIndeptTag(scope.row, 'copy')" class="text" type="text" size="small">复制</el-button>
-                        <span style="margin:0 3px;">|</span>
-                        <el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-          <el-pagination  :current-page.sync="currentPage"
-                          @current-change="currentChange"
-                          background
-                          :page-size.sync="pageSize"
-                          :page-sizes="pageSizeArr"
-                           @size-change="handleSizeChange"
-                          :layout="pageLayout"
-                          :total="total">
-            </el-pagination>
-        </div>
+  <div>
+    <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-form-item>
+        <el-form-item label="模板名称:">
+          <el-input size="mini" v-model.trim="filter.modeName" placeholder="模板名称" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="所属模块:">
+          <el-select
+            size="mini"
+            v-model.trim="filter.modeId"
+            @change="getValue"
+            placeholder="所属模块"
+            clearable
+          >
+            <el-option
+              v-for="item in moduleList"
+              :label="item.name"
+              :value="item.val"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="所属医院:">
+          <el-select
+            size="mini"
+            v-model.trim="filter.hospitalName"
+            @change="getValue"
+            placeholder="所属医院"
+            clearable
+          >
+            <el-option
+              v-for="item in hospitalList"
+              :label="item.name"
+              :value="item.val"
+              :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" @click="addTemp">添加模板</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 :resizable="false" label="模板Id" prop="id"></el-table-column>
+        <el-table-column :resizable="false" prop="name" label="模板名称" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="modeId" :formatter="moduleFormatter" label="所属模块"></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="hospitalId"
+          :formatter="hisFormatter"
+          label="所属医院"
+        ></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="默认标准模版">
+          <template slot-scope="scope">
+            <el-switch
+              v-model="scope.row.defaultModule"
+              :active-value="1"
+              :inactive-value="0"
+              active-color="#4BC4D7"
+              inactive-color="#BBBBBB"
+              @change="handleTemChange(scope.row)"
+            ></el-switch>
+          </template>
+        </el-table-column>
+
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyIndeptTag(scope.row, 'modify')" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="modifyIndeptTag(scope.row, 'copy')"
+              class="text"
+              type="text"
+              size="small"
+            >复制</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        :current-page.sync="currentPage"
+        @current-change="currentChange"
+        background
+        :page-size.sync="pageSize"
+        :page-sizes="pageSizeArr"
+        @size-change="handleSizeChange"
+        :layout="pageLayout"
+        :total="total"
+      ></el-pagination>
     </div>
+  </div>
 </template>
 
 <script>
-    import api from '@api/qualityControl.js';
-  import config from '@api/config.js';
-  import utils from '@api/utils.js'
-  export default {
-    name: 'QualityControlTemp',
-    data: function() {
-      return {
-        list: [],
-        hospitalList: [],
-        moduleList:[],
-        searched: false,
-        filter: {
-          modeName: '', //模板名称
-          moduleId:null, //模板Id
-          modeId: '',//所属模块
-          hospitalName: '', //所属医院
-        },
-        currentPage: 1,
-        pageSize: config.pageSize,
-        pageSizeArr:config.pageSizeArr,
-        pageLayout:config.pageLayout,
-        total: 0,
-      }
-    },
-    created() {
-      const _this=this;
-      setTimeout(function(){
-        _this.getAllTypes().then(()=>{
-          _this.getDataList()
-        })
-      },100);
+import api from '@api/qualityControl.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  name: 'QualityControlTemp',
+  data: function() {
+    return {
+      list: [],
+      hospitalList: [],
+      moduleList: [],
+      searched: false,
+      filter: {
+        modeName: '', //模板名称
+        moduleId: null, //模板Id
+        modeId: '', //所属模块
+        hospitalName: '' //所属医院
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0
+    };
+  },
+  created() {
+    const _this = this;
+    setTimeout(function() {
+      _this.getAllTypes().then(() => {
+        _this.getDataList();
+      });
+    }, 100);
+  },
+  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: {
+    // 默认标准模版切换
+    handleTemChange(row) {
+      // console.log(row, 'row');
+      let params = {
+        defaultModule: row.defaultModule,
+        defineType: 0,
+        hospitalId: row.hospitalId,
+        id: row.id,
+        modeId: row.modeId,
+        name: row.name
+      };
 
+      api.saveDefaultModuleInfo(params).then(res => {
+        // console.log(res.data);
+        if (res.data.code === '-1') {
+          // 互斥
+          this.$alert('默认标准模版已存在,是否替换?', '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {
+              params = { ...params, defineType: 1 };
+              api.saveDefaultModuleInfo(params).then(res => {
+                // console.log(res,'互斥再次请求的接口返回');
+                this.getDataList();
+              });
+            })
+            .catch(() => {
+              this.getDataList();
+            });
+        } else if (res.data.code === '0') {
+          // 不互斥
+          this.getDataList();
+        }
+      });      
     },
-    watch: {
-      'filter': {
-        handler: function () {
-          this.searched = false;
-        },
-        deep: true
-      }
+
+    moduleFormatter(row, column, cellValue) {
+      const it = this.moduleList.find(item => item.val == cellValue);
+      return it ? it.name : '';
     },
-    beforeRouteEnter(to, from, next) {
-      next(vm => {
-        //const pm = to.param;
-        Object.assign(vm, to.params);
-        vm.inCurrentPage=to.params.currentPage;
-      })
+    hisFormatter(row, column, cellValue) {
+      const it = this.hospitalList.find(item => item.val == cellValue);
+      return it ? it.name : '';
     },
-    methods: {
-      moduleFormatter(row, column, cellValue){
-        const it = this.moduleList.find(item => item.val == cellValue);
-        return it?it.name:'';
-      },
-      hisFormatter(row, column, cellValue){
-        const it = this.hospitalList.find(item => item.val == cellValue);
-        return it?it.name:'';
-      },
-      getAllTypes(){
-          if(localStorage.getItem("qcModuleTypes")){
-              this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
-              this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
-              return new Promise(function(resolve, reject){
-                  resolve()
-              });
-          }
-          //获取枚举信息
-          return api.getQcTypes().then((res)=>{
-              if(res.data.code==="0"){
-                  const data = res.data.data;
-                  localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
-                  localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
-                  localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
-                  this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
-                  this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
-              }else{
-                  this.warning("获取枚举信息失败");
-              }
-          });
-      },
-      handleSizeChange(val){
-        this.pageSize = val;
-        this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
-        this.getDataList();
-      },
-      getValue(val) {
-        console.log('changeVal', val, this.filter.tagAdscription)
-      },
-      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)'
+    getAllTypes() {
+      /*if (localStorage.getItem('qcModuleTypes')) {
+        this.hospitalList = JSON.parse(localStorage.getItem('qcHospitalTypes'));
+        this.moduleList = JSON.parse(localStorage.getItem('qcModuleTypes'));
+        return new Promise(function(resolve, reject) {
+          resolve();
         });
-        api.getQCTemplist(param).then((res) => {
-          loading.close()
-          let list = res.data.data.records
-          /*for(let i = 0; i < list.length; i++){
+      }*/
+      //获取枚举信息
+      return api.getQcTypes().then(res => {
+        if (res.data.code === '0') {
+          const data = res.data.data;
+          /*localStorage.setItem('qcFieldTypes', JSON.stringify(data[11]));
+          localStorage.setItem('qcModuleTypes', JSON.stringify(data[12]));
+          localStorage.setItem('qcHospitalTypes', JSON.stringify(data[13]));*/
+          this.hospitalList = data[13];
+          this.moduleList = data[12];
+        } else {
+          this.warning('获取枚举信息失败');
+        }
+      });
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+    getValue(val) {
+      console.log('changeVal', val, this.filter.tagAdscription);
+    },
+    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.getQCTemplist(param).then(res => {
+        loading.close();
+        let list = res.data.data.records;
+        /*for(let i = 0; i < list.length; i++){
             list[i].hospitalId = this.hospitalList.find(item => item.val == list[i].hospitalId).name
             list[i].modeId  = this.moduleList.find(item => item.val == list[i].modeId).name
           }*/
-          this.list = list;
-          this.total = res.data.data.total;
-          if(this.inCurrentPage!==undefined){
-            this.currentPage=this.inCurrentPage;
-            this.inCurrentPage = undefined;
+        this.list = list;
+        this.total = res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addTemp() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
           }
-        })
-      },
-      filterDatas() {
-        this.currentPage = 1;
-        this.getDataList();
-      },
-      addTemp() {
-        const pam = this.searched ? {
-          currentPage: this.currentPage,
-          pageSize:this.pageSize,
-          filter: this.filter
-        } : {currentPage: this.currentPage,pageSize:this.pageSize};
-        this.$router.push({
-          name: 'AddQualityControlTemp',
-          params: pam
-        })
-      },
-      modifyIndeptTag(row, type) {
-        api.getQCTempDetail({moduleId:row.id}).then((res)=>{
-          const {code,data,msg} = res.data;
-          if(code=='0'){
-            const item = Object.assign({},row,data);
-            const pam = this.searched ? {
-              currentPage: this.currentPage,
-              filter: this.filter
-            } : {currentPage: this.currentPage};
-            if(type == 'modify') {
-              this.$router.push({name: 'AddQualityControlTemp', params: Object.assign(pam, {isEdit: true, data: item})});
-            } else if( type == 'copy') {
-              this.$router.push({name: 'AddQualityControlTemp', params: Object.assign(pam, {isCopy: true, data: item})});
-            } else {
-                return
-            }
-          }else{
-            this.$message({
-              message: msg,
-              type: 'warning'
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({
+        name: 'AddQualityControlTemp',
+        params: pam
+      });
+    },
+    modifyIndeptTag(row, type) {
+      api.getQCTempDetail({ moduleId: row.id }).then(res => {
+        const { code, data, msg } = res.data;
+        if (code == '0') {
+          const item = Object.assign({}, row, data);
+          const pam = this.searched
+            ? {
+                currentPage: this.currentPage,
+                filter: this.filter
+              }
+            : { currentPage: this.currentPage };
+          if (type == 'modify') {
+            this.$router.push({
+              name: 'AddQualityControlTemp',
+              params: Object.assign(pam, { isEdit: true, data: item })
+            });
+          } else if (type == 'copy') {
+            this.$router.push({
+              name: 'AddQualityControlTemp',
+              params: Object.assign(pam, { isCopy: true, data: item })
             });
+          } else {
+            return;
           }
-        });
-        //this.$router.push({name:'AddIndeptLabel',params:{isEdit:true,data:row}});
-      },
-      currentChange(next) {
-        this.currentPage = next;
-        this.getDataList(true);
-        // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
-        //     this.list = this.cacheData[next];
-        // } else {
-        //     this.getDataList();
-        // }
-      },
-      clearFilter(){
-        this.filter={
-          name: "",
-          modeId: "",
-          hospitalName: "",
-          id:"",
-
-        };
-      },
-      getFilterItems(isTurnPage) {
-        //翻页时筛选条件没点确定则清空
-        if(isTurnPage&&!this.searched){
-          this.clearFilter();
-        };
-        const {modeName, modeId, hospitalName,moduleId} = this.filter
-        const param = {
-          name: modeName,
-          current: this.inCurrentPage||this.currentPage,
-          size: this.pageSize,
-          modeId: modeId,
-          id:moduleId,
-          hospitalId: hospitalName
-        };
-        return param;
-      },
-      indexMethod(index) {
-        return ((this.currentPage - 1) * this.pageSize) + index + 1;
-      },
-      getTagType(val) {
-        return val
-      },
-      warning(msg,type){
-        this.$message({
-          showClose: true,
-          dangerouslyUseHTMLString: true,
-          message:'<p>'+msg+'</p>',
-          type:type||'warning'
-        })
-      },
-      showConfirmDialog(msg,resolve){
-        this.$alert(msg, '提示', {
-          confirmButtonText: '确定',
-          type: 'warning'
-        }).then(() => {
-          resolve();
-        }).catch(() => {});
-      },
-      showDelDialog(row){
-        const param = {
-          "ids": row.id,
+        } else {
+          this.$message({
+            message: msg,
+            type: 'warning'
+          });
         }
-        this.showConfirmDialog('是否删除该模板?',()=>{
-          api.delQCTemp(param).then((res)=>{
-            if(res.data.code=='0'){
-              if(!this.searched){
+      });
+      //this.$router.push({name:'AddIndeptLabel',params:{isEdit:true,data:row}});
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    clearFilter() {
+      this.filter = {
+        name: '',
+        modeId: '',
+        hospitalName: '',
+        id: ''
+      };
+    },
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const { modeName, modeId, hospitalName, moduleId } = this.filter;
+      const param = {
+        name: modeName,
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        modeId: modeId,
+        id: moduleId,
+        hospitalId: hospitalName
+      };
+      return param;
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        dangerouslyUseHTMLString: true,
+        message: '<p>' + msg + '</p>',
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    showDelDialog(row) {
+      const param = {
+        ids: row.id
+      };
+      this.showConfirmDialog('是否删除该模板?', () => {
+        api
+          .delQCTemp(param)
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
                 //未点确认时清空搜索条件
                 this.clearFilter();
               }
-              if(this.list.length==1){
+              if (this.list.length == 1) {
                 //当前在最后一页且只有一条数据时,删除后跳到前一页
-                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
               }
               this.getDataList();
-              this.warning(res.data.msg || '操作成功','success');
-            }else{
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
               this.warning(res.data.msg);
             }
-          }).catch((error)=>{
-            this.warning(error);
           })
-        });
-      }
+          .catch(error => {
+            this.warning(error);
+          });
+      });
     }
   }
+};
 </script>
 
 
 <style lang="less">
-  @import "../../less/admin.less";
-    .delete{
-        color: red
-    }
-    .delete:hover {
-        color: red;
-    }
-    .el-select .el-input .el-icon-arrow-up{
-        display: inline-block!important;
-    }
-    .el-select .el-input .el-icon-circle-close{
-        float:left;
-    }
-  .el-pagination__sizes{
-      margin-right: 20px;
-    .el-input .el-input__inner{
-        height: 28px;
-        line-height: 28px;
-    }
+@import '../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.el-select .el-input .el-icon-arrow-up {
+  display: inline-block !important;
+}
+.el-select .el-input .el-icon-circle-close {
+  float: left;
+}
+.el-pagination__sizes {
+  margin-right: 20px;
+  .el-input .el-input__inner {
+    height: 28px;
+    line-height: 28px;
   }
+}
 </style>

+ 131 - 25
src/components/recordInput/AddRecordItem.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="addRecordItemWrapper">
-        <crumbs :title="title" :param="$route.params"  minWidth="1120px" linkTo="RecordItemList"></crumbs>
+        <crumbs :title="title" :param="$route.params"  minWidth="1370px" linkTo="RecordItemList"></crumbs>
         <div class="contents">
             <div class="content">
                 <el-form :rules="rules" ref="form" :label-position="labelPosition" label-width="125px" class="add-record-form" :model="form">
@@ -74,8 +74,36 @@
                             </el-option>
                         </el-select>
                     </el-form-item>
-                    <el-form-item label="备注:" prop="remark">
+                    <el-form-item label="是否控费:" prop="ruleType">
+                        <el-select v-model="form.costControl"
+                                   placeholder="请选择是否控费:"
+                        >
+                            <el-option
+                                    v-for="item in costControlList"
+                                    :key="item.val"
+                                    :label="item.name"
+                                    :value="Number(item.val)">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <!-- <el-form-item label="备注:" prop="remark">
                          <el-input v-model="form.remark" maxlength="200" placeholder="请输入备注"></el-input>
+                    </el-form-item> -->
+                  
+                    <el-form-item label="质控形式:" prop="ruleType">
+                        <el-select v-model="form.qcType"
+                                   placeholder="请选择质控形式::"
+                        >
+                            <el-option
+                                    v-for="item in qcTypeList"
+                                    :key="item.val"
+                                    :label="item.name"
+                                    :value="Number(item.val)">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                      <el-form-item label="备注:" prop="remark">
+                         <el-input v-model="form.remark" maxlength="500" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入备注"></el-input>
                     </el-form-item>
                      <el-form-item label="前置条件:" prop="remark" class="procent">
                          <el-input v-model="form.precond" maxlength="200" placeholder="请输入前置条件"></el-input>
@@ -87,7 +115,7 @@
                             ref="multipleTable"
                             :data="tableData"
                             tooltip-effect="light"
-                            style="width: 100%"
+                            style="width: 100%; minWidth:1200px"
                             @selection-change="handleSelectionChange">
                             <el-table-column
                               type="selection"
@@ -101,12 +129,20 @@
                             </el-table-column>
                             <el-table-column
                               prop="name"
-                              label="扣分值"
+                              label="终末扣分值"
                               width="120">
                                  <template slot-scope="scope">
                                   <el-input  class="scoreInp" v-model.trim="scope.row.value"  oninput="if(value.length>5)value=value.slice(0,5)" type="number"   placeholder=""></el-input>
                                  </template>
                             </el-table-column>
+                            <el-table-column
+                              prop="name"
+                              label="运行扣分值"
+                              width="120">
+                                 <template slot-scope="scope">
+                                  <el-input  class="scoreInp" v-model.trim="scope.row.scoreRun"  oninput="if(value.length>5)value=value.slice(0,5)" type="number"   placeholder=""></el-input>
+                                 </template>
+                            </el-table-column>
                             <el-table-column
                               prop="address"
                               label="提示信息"
@@ -118,20 +154,29 @@
                             </el-table-column>
                             <el-table-column
                               prop="address"
-                              label="是否启用"
+                              label="单项否决"
+                              width="120"
+                              show-overflow-tooltip>
+                               <template slot-scope="scope">
+                                   <el-checkbox v-model="scope.row.isReject" :checked="scope.row.isReject=='1'" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0"></el-checkbox>
+                                </template>
+                            </el-table-column>
+                             <el-table-column
+                              prop="address"
+                              label="终末质控"
                               width="120"
                               show-overflow-tooltip>
                                <template slot-scope="scope">
                                    <el-checkbox v-model="scope.row.isUsed" :checked="scope.row.isUsed=='1'" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0"></el-checkbox>
                                 </template>
                             </el-table-column>
-                            <el-table-column
+                             <el-table-column
                               prop="address"
-                              label="单项否决"
+                              label="运行质控"
                               width="120"
                               show-overflow-tooltip>
                                <template slot-scope="scope">
-                                   <el-checkbox v-model="scope.row.isReject" :checked="scope.row.isReject=='1'" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0"></el-checkbox>
+                                   <el-checkbox v-model="scope.row.isUsedRun" :checked="scope.row.isUsedRun=='1'" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0"></el-checkbox>
                                 </template>
                             </el-table-column>
                           </el-table>
@@ -165,6 +210,8 @@
         ruleTypeList:[],
         devTypeList:[],
         accuracyTypeList:[],
+        costControlList:[],
+        qcTypeList:[],
         caseLIst:[],
         hospitalModuleList:[], //医院数据模块列表
         title:'质控条目-新增',
@@ -178,7 +225,9 @@
           remark:'',
           levelNo:'',
           precond:'',
-          hospitalModuleId:''
+          hospitalModuleId:'',
+          costControl:2,
+          qcType:1
         },
         tableData:[],
         selectHospital:[],
@@ -196,14 +245,10 @@
       }
     },
     created(){
-      let {isEdit, data,ruleTypeList,devTypeList,accuracyTypeList} = this.$route.params;
+       this.getRuleTypeModule();
+      let {isEdit, data} = this.$route.params;
       const userLoginDTO = JSON.parse(localStorage.getItem('userLoginDTO'))
       this.modifier = userLoginDTO && userLoginDTO.linkman
-      this.ruleTypeList=ruleTypeList;
-      this.devTypeList=devTypeList;
-      this.accuracyTypeList=accuracyTypeList;
-      this.devTypeList.shift();
-      this.accuracyTypeList.shift();
       if(isEdit){
         this.title = '质控条目-修改'
         this.isEdit = isEdit
@@ -216,7 +261,9 @@
         this.form.casesId = data.casesId
         this.form.remark = data.remark
         // this.form.levelNo = data.levelNo
-          this.form.hospitalModuleId = data.modeId
+        this.form.hospitalModuleId = data.modeId
+        this.form.costControl = data.drgs
+        this.form.qcType = data.type
         this.form.precond = data.precond
         this.selectHospital = data.getUpdateInfoDetialDTOS || []
       }
@@ -264,7 +311,9 @@
                 value: '',
                 tipMsg:'',
                 isUsed: '0',
-                isReject:'0'
+                isReject:'0',
+                scoreRun:'',
+                isUsedRun:'0'
               })
             }
             for(let i = 0; i < this.selectHospital.length; i++){
@@ -274,7 +323,9 @@
                   item.value = selectItem.score
                   item.tipMsg = selectItem.msg
                   item.isUsed = selectItem.isUsed
+                  item.isUsedRun = selectItem.isUsedRun
                   item.isReject = selectItem.isReject
+                  item.scoreRun =selectItem.scoreRun
                   this.multipleSelection.push(item)
               }
             
@@ -318,6 +369,24 @@
           }
         })
       },
+      getRuleTypeModule(){
+        return api.getRuleTypes({}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.ruleTypeList = result.data["14"];
+            this.devTypeList = res.data.data&&res.data.data["15"]
+            this.accuracyTypeList = res.data.data&&res.data.data["16"]
+            this.costControlList = res.data.data&&res.data.data["17"] 
+            this.qcTypeList = res.data.data&&res.data.data["18"]
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning',
+              showClose: true
+            });
+          }
+        })
+      },
       cancel(){
         this.$router.push({
           name: 'RecordItemList',
@@ -329,7 +398,7 @@
             return
           }
           this.canSave = false
-          const {itemName,casesId,itemCode,remark,levelNo,precond,hospitalModuleId,ruleType,devType,accuracyType} = this.form
+          const {itemName,casesId,itemCode,remark,levelNo,precond,hospitalModuleId,ruleType,devType,accuracyType,costControl,qcType} = this.form
           if(!itemName){
             this.$message({
               message:"请输入条目名称",
@@ -351,19 +420,47 @@
           let  casesEntryHospitals = []
           for(let i = 0; i < this.multipleSelection.length; i++){
             const item = this.multipleSelection[i]
-            if(item.value ===''){
+            if((item.scoreRun === null || item.scoreRun ==='') ||(item.value === null || item.value ==='')){
+              this.$message({
+                message:`请填写所需医院扣分值`,
+                type:'warning',
+                showClose: true
+              })
+              this.canSave = true
+              return
+            }
+           
+            if((item.value === null || item.value ==='')&&item.isUsed =="1"){
               this.$message({
-                message:"请填写所选医院扣分值",
+                message:`请填写${item.hospitalName}终末扣分值`,
                 type:'warning',
                 showClose: true
               })
               this.canSave = true
-              returnxiaoyudengy
+              return
+            }
+            if((item.scoreRun === null || item.scoreRun ==='')&&item.isUsedRun =="1"){
+              this.$message({
+                message:`请填写请填写${item.hospitalName}运行扣分值`,
+                type:'warning',
+                showClose: true
+              })
+              this.canSave = true
+              return
             }
             var reg = new RegExp(/^\d+(\.\d)?$/);
-            if(!reg.test(item.value) || item.value > 100){
+            if(item.value&&(!reg.test(item.value) || item.value > 100)){
                this.$message({
-                message:'扣分值请输入≥0且≤100的数字,最多保留小数点后1位',
+                message:'终末扣分值请输入≥0且≤100的数字,最多保留小数点后1位',
+                type:'warning',
+                showClose: true
+              });
+              this.canSave = true
+              return
+            }
+            if(item.scoreRun&&(!reg.test(item.scoreRun) || item.scoreRun > 100)){
+               this.$message({
+                message:'运行扣分值请输入≥0且≤100的数字,最多保留小数点后1位',
                 type:'warning',
                 showClose: true
               });
@@ -388,6 +485,8 @@
               msg: item.tipMsg,
               isUsed: item.isUsed,
               isReject: item.isReject,
+              scoreRun: item.scoreRun,
+              isUsedRun: item.isUsedRun
             })
           }
            let params = {
@@ -404,7 +503,9 @@
             casesName:  this.caseLIst.find(item => item.id === casesId).name,
             modifier:this.modifier,
             creator: '0',
-            casesEntryHospitals:casesEntryHospitals
+            casesEntryHospitals:casesEntryHospitals,
+            drgs:costControl,
+            type:qcType
           }
            api.addRecordItem(params).then((res)=>{
               this.canSave = true
@@ -490,7 +591,7 @@
             background: #fff;
             padding: 20px 20px 50px;
             color: #545455;
-            min-width: 1100px;
+            min-width: 1350px;
             position: relative;
             .short-inp{
                 width: 200px;
@@ -517,6 +618,11 @@
                 width: 800px;
               }
             }
+            /deep/.el-textarea__inner{
+              border: 1px solid #333;
+              resize: none;
+              width: 800px;
+            }
             /deep/.el-form-item{
               margin: 20px 0 0 0;
 

+ 50 - 6
src/components/recordInput/ManageItemBatch.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="ManageItemBatchWrapper">
-        <crumbs :title="title" :param="$route.params" linkTo="RecordItemList" minWidth="1210px"></crumbs>
+        <crumbs :title="title" :param="$route.params" linkTo="RecordItemList" minWidth="1510px"></crumbs>
         <div class="contents">
             <div class="content">
                 <el-form ref="form" :label-position="labelPosition" label-width="125px" class="add-record-form" >
@@ -88,11 +88,19 @@
                                     </el-table-column>
                                     <el-table-column
                                       prop=""
-                                      label="扣分值"
+                                      label="终末扣分值"
                                       width="120">
                                         <template slot-scope="scope">
                                           <el-input  class="scoreInp" oninput="if(value.length>5)value=value.slice(0,5)" v-model.trim="scope.row.score" type="number" placeholder=""></el-input>
                                         </template>
+                                    </el-table-column>
+                                     <el-table-column
+                                      prop=""
+                                      label="运行扣分值"
+                                      width="120">
+                                        <template slot-scope="scope">
+                                          <el-input  class="scoreInp" oninput="if(value.length>5)value=value.slice(0,5)" v-model.trim="scope.row.scoreRun" type="number" placeholder=""></el-input>
+                                        </template>
                                     </el-table-column>
                                     <el-table-column
                                       prop="address"
@@ -105,13 +113,23 @@
                                     </el-table-column>
                                     <el-table-column
                                     prop="address"
-                                    label="是否启用"
+                                    label="终末质控"
                                     width="120"
                                     show-overflow-tooltip>
                                     <template slot-scope="scope">
                                         <span class="checkUsed" :class="{'active': scope.row.isUsed == 1,'disabled': getDisabled(scope.row,item.remark)}" @click="checkUsed(scope.row,index,scope.$index,item.remark)"></span>
                                         <!-- <el-checkbox v-model="scope.row.isUsed" :value ="scope.row.isUsed" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0">{{scope.row.isUsed}}</el-checkbox> -->
                                       </template>
+                                  </el-table-column>
+                                   <el-table-column
+                                    prop="address"
+                                    label="运行质控"
+                                    width="120"
+                                    show-overflow-tooltip>
+                                    <template slot-scope="scope">
+                                        <span class="checkUsed" :class="{'active': scope.row.isUsedRun == 1,'disabled': getDisabled(scope.row,item.remark)}" @click="checkUsedRun(scope.row,index,scope.$index,item.remark)"></span>
+                                        <!-- <el-checkbox v-model="scope.row.isUsed" :value ="scope.row.isUsed" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0">{{scope.row.isUsed}}</el-checkbox> -->
+                                      </template>
                                   </el-table-column>
                                   <el-table-column
                                     prop="address"
@@ -226,6 +244,21 @@
         const values = Object.values(this.checkAllMap)
         this.toggleSelection(values)
       },
+      checkUsedRun(row,index,ii,remark){
+        if(this.getDisabled(row,remark)){
+          return
+        }
+        let isUsedRun = this.caseLIst[index].qcCasesEntry[ii].isUsedRun
+        const caseLIstCopy = JSON.parse(JSON.stringify(this.caseLIst))
+        if(isUsedRun == 1){
+          caseLIstCopy[index].qcCasesEntry[ii].isUsedRun = 0
+        }else{
+          caseLIstCopy[index].qcCasesEntry[ii].isUsedRun = 1
+        }
+        this.caseLIst = caseLIstCopy
+        const values = Object.values(this.checkAllMap)
+        this.toggleSelection(values)
+      },
       checkReject(row,index,ii,remark){
         if(this.getDisabled(row,remark)){
           return
@@ -272,6 +305,7 @@
             let  caseLIstCopy = result.data
             for(let i = 0; i < caseLIstCopy.length; i++){
               for(let j = 0; j < caseLIstCopy[i].qcCasesEntry.length; j++){
+                 caseLIstCopy[i].qcCasesEntry[j].isUsedRun = 0
                 caseLIstCopy[i].qcCasesEntry[j].isUsed = 0
                 caseLIstCopy[i].qcCasesEntry[j].isReject = 0
               }
@@ -304,7 +338,8 @@
                 hospitalId: this.hospitalList[i].id,
                 hospitalName:  this.hospitalList[i].name,
                 value: '',
-                tipMsg:''
+                tipMsg:'',
+                scoreRun:'',
               })
             }
             this.tableData = tableData
@@ -333,8 +368,10 @@
                 const checkedItem = hospitalItem.getAllByHospitalDetialDTOS[j]
                 let recordItem = caseItem.qcCasesEntry.find(item => item.id === checkedItem.casesEntryId)
                 recordItem.score = checkedItem.score
+                 recordItem.scoreRun = checkedItem.scoreRun
                 recordItem.msg = checkedItem.msg
                 recordItem.isUsed = checkedItem.isUsed
+                 recordItem.isUsedRun = checkedItem.isUsedRun
                  recordItem.isReject = checkedItem.isReject
                 recordItem.modeName = checkedItem.modeName
                 this.checkAllMap[caseItem.remark].push(recordItem)
@@ -372,7 +409,7 @@
         for(let i = 0; i < values.length; i++){
           for(let j = 0; j < values[i].length;j++){
             const value = values[i][j];
-            if(!valueTypeWr.length&&(!value.msg||value.score==="")){
+            if(!valueTypeWr.length&&(!value.msg||value.score===""||value.score===null||value.scoreRun===""||value.scoreRun===null)){
               tempItemIdx=this.caseLIst[i].qcCasesEntry.findIndex(item =>item.id === value.id);
               requiredValNull.push(value.casesId);
               $(".el-collapse .el-collapse-item:eq("+i+") table tr:eq("+(+tempItemIdx+1)+")").addClass("wrong");
@@ -383,6 +420,11 @@
               $(".el-collapse .el-collapse-item:eq("+i+") table tr:eq("+(+tempItemIdx+1)+")").addClass("wrong");
               valueTypeWr.push(value.casesId);
             }
+            if(!requiredValNull.length&&(!reg.test(value.scoreRun) || value.scoreRun >100)){
+              tempItemIdx=this.caseLIst[i].qcCasesEntry.findIndex(item =>item.id === value.id);
+              $(".el-collapse .el-collapse-item:eq("+i+") table tr:eq("+(+tempItemIdx+1)+")").addClass("wrong");
+              valueTypeWr.push(value.casesId);
+            }
             let item = {
               "casesEntryId": value.id,
               "creator": "0",
@@ -391,7 +433,9 @@
               "msg": value.msg||"",
               "remark": value.remark,
               "score": Number(value.score),
+              "scoreRun": Number(value.scoreRun),
               "isUsed":value.isUsed||0,
+              "isUsedRun":value.isUsedRun||0,
               "isReject":value.isReject||0
             }
             casesEntryHospitals.push(item)
@@ -518,7 +562,7 @@
         background: #fff;
         padding: 20px 20px 50px;
         color: #545455;
-        min-width: 1300px;
+        min-width: 1500px;
         position: relative;
         .short-inp{
             width: 200px;

+ 65 - 13
src/components/recordInput/RecordItemList.vue

@@ -74,6 +74,38 @@
                
             </el-form>
             <el-form :inline="true" class="demo-form-inline demo-form-inline-second">
+               <el-form-item label="是否控费:">
+                    <!-- <el-input size="mini" v-model.trim="filter.module" placeholder="所属模块" clearable></el-input> -->
+                    <el-select v-model="filter.costControl"
+                               clearable
+                               filterable
+                               placeholder="请选择是否控费"
+                               size="mini"
+                               class="long-item">
+                        <el-option
+                                v-for="item in costControlList"
+                                :key="item.val"
+                                :label="item.name"
+                                :value="item.val">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                 <el-form-item label="质控形式:">
+                    <!-- <el-input size="mini" v-model.trim="filter.module" placeholder="所属模块" clearable></el-input> -->
+                    <el-select v-model="filter.qcType"
+                               clearable
+                               filterable
+                               placeholder="请选择准确率"
+                               size="mini"
+                               class="long-item">
+                        <el-option
+                                v-for="item in qcTypeList"
+                                :key="item.val"
+                                :label="item.name"
+                                :value="item.val">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
               <el-form-item :inline="true"  label="条目编码:">
                    <el-input size="mini" v-model.trim="filter.itemCode" placeholder="条目编码" clearable></el-input>
                </el-form-item>
@@ -146,6 +178,20 @@
                         label="医院数据模块"
                         width="">
                   
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="drgs"
+                        label="是否控费"
+                        :formatter="dragsFormatter"
+                >
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="type"
+                        label="质控形式"
+                        :formatter="qcTypeFormatter"
+                >
                 </el-table-column>
                  <el-table-column
                         :resizable = "false"
@@ -189,6 +235,8 @@
         ruleTypeList:[],
         devTypeList:[],
         accuracyTypeList:[],
+        costControlList:[],
+        qcTypeList:[],
         filter:{
           itemName:'',
           ruleType:'',
@@ -196,7 +244,9 @@
           level:'',
           itemCode:'',
           devType:'',
-          accuracyType:''
+          accuracyType:'',
+          costControl:'',
+          qcType:''
         },
         currentPage: 1,
         pageSize: config.pageSize,
@@ -242,6 +292,14 @@
         const li = this.accuracyTypeList.filter((it)=>it.val===""+cellValue);
         return li[0]?li[0].name:"";
       },
+      dragsFormatter(row, column, cellValue){
+        const li = this.costControlList.filter((it)=>it.val===""+cellValue);
+        return li[0]?li[0].name:"";
+      },
+      qcTypeFormatter(row, column, cellValue){
+        const li = this.qcTypeList.filter((it)=>it.val===""+cellValue);
+        return li[0]?li[0].name:"";
+      },
      handleSizeChange(val){
         this.pageSize = val;
         this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
@@ -253,13 +311,7 @@
       AddRecordItem(){
          const pam = this.searched?{currentPage:this.currentPage,
           pageSize:this.pageSize,
-          ruleTypeList:this.ruleTypeList,
-          devTypeList:this.devTypeList,
-          accuracyTypeList:this.accuracyTypeList,
           filter:this.filter}:{currentPage:this.currentPage,
-           ruleTypeList:this.ruleTypeList,
-            devTypeList:this.devTypeList,
-          accuracyTypeList:this.accuracyTypeList,
           pageSize:this.pageSize};
         this.$router.push({
           name:'AddRecordItem',
@@ -297,8 +349,12 @@
             this.ruleTypeList = result.data[14];
             this.devTypeList = res.data.data&&res.data.data["15"]
             this.accuracyTypeList = res.data.data&&res.data.data["16"]
+            this.costControlList = res.data.data&&res.data.data["17"] 
+            this.qcTypeList = res.data.data&&res.data.data["18"]
             this.devTypeList.unshift({name:"全部", val:""})
             this.accuracyTypeList.unshift({name:"全部", val:""})
+            this.qcTypeList.unshift({name:"全部", val:""})
+            this.costControlList.unshift({name:"全部", val:""})
           }else{
             this.$message({
               message:result.msg,
@@ -347,15 +403,9 @@
           const pam = this.searched ? {
             currentPage: this.currentPage,
             pageSize:this.pageSize,
-            ruleTypeList:this.ruleTypeList,
-            devTypeList:this.devTypeList,
-            accuracyTypeList:this.accuracyTypeList,
             filter: this.filter,
           } : {
             currentPage: this.currentPage,
-            ruleTypeList:this.ruleTypeList,
-            devTypeList:this.devTypeList,
-            accuracyTypeList:this.accuracyTypeList,
             pageSize:this.pageSize};
           this.$router.push({
             name:'AddRecordItem',
@@ -383,6 +433,8 @@
           current: this.inCurrentPage||this.currentPage,
           size: this.pageSize,
           devType:this.filter.devType,
+          drgs:this.filter.costControl,
+          type:this.filter.qcType,
           accuracyType:this.filter.accuracyType,
        
         };

BIN
src/images/icon_default_down.png


BIN
src/images/icon_default_top.png


BIN
src/images/icon_hover_down.png


BIN
src/images/icon_hover_top.png


BIN
src/images/multi.png


BIN
src/images/spread.png


BIN
src/images/up.png


+ 23 - 0
src/less/admin.less

@@ -182,4 +182,27 @@
 .el-message-box .el-message-box__content{
   max-height: 100px;
   overflow-y: auto;
+}
+
+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;
+  }
 }

+ 208 - 133
src/routes.js

@@ -134,13 +134,10 @@ import AddQcType from '@components/qualityControl/AddQcType.vue';
 import StandardRecord from '@components/qualityControl/StandardRecord.vue';
 import AddStandardRecord from '@components/qualityControl/AddStandardRecord.vue';
 import ItemDataType from '@components/qualityControl/ItemDataType.vue';
+import ItemDataTypeRelation from '@components/qualityControl/ItemDataTypeRelation.vue';
 import AutoTestList from '@components/qualityControl/AutoTestList.vue';
 import AutoTestTask from '@components/qualityControl/AutoTestTask.vue';
 import TaskDetail from '@components/qualityControl/TaskDetail';
-import ItemDataTypeRelation from '@components/qualityControl/ItemDataTypeRelation.vue';
-
-
-
 
 //病历录入
 import RecordInput from '@components/recordInput/RecordList.vue';
@@ -151,6 +148,40 @@ import RecordItemList from '@components/recordInput/RecordItemList.vue';
 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 Disease from '@components/cdssManage/disease/Disease.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 Pacs from '@components/cdssManage/pacs/Pacs.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 Operation from '@components/cdssManage/operation/Operation.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 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 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';  //免责声明维护--详情
+
 export default [
   {
     path: '/',
@@ -175,17 +206,17 @@ export default [
     },
     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: '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 },//账号信息
+
     ]
   },
 
@@ -197,8 +228,8 @@ export default [
     },
     children: [
       // {path: '/', component: AdminConsole},
-      {path: 'LT-KZT', component: AdminConsole},
-      {path: 'LT-JGZX', component: AdminConsole},
+      { path: 'LT-KZT', component: AdminConsole },
+      { path: 'LT-JGZX', component: AdminConsole },
       {
         path: 'LT-KHZX-ZCYH',
         component: RegisterAdmin
@@ -207,14 +238,14 @@ export default [
         path: 'LT-YRZCGXX',
         component: AuthedAdmin
       },
-    	{
-    	  name:'organizationInfo',
-    	  path: 'LT-KHZX-JGXX',//机构信息
+      {
+        name: 'organizationInfo',
+        path: 'LT-KHZX-JGXX',//机构信息
         component: OrganizationInfo,
-        meta:{
-          keepAlive:true
+        meta: {
+          keepAlive: true
         }
-    	},
+      },
       {
         path: 'LT-KHZX-TJJG',//添加机构
         component: AddOrganization
@@ -224,14 +255,14 @@ export default [
         component: ModifinedOrga
       },
       {
-        name:'superAdmin',
+        name: 'superAdmin',
         path: 'LT-KHZX-CGXX',
         component: SuperAdmin
       },
       {
         path: 'LT-DDXT-TJCG',
         component: AddAdmin,
-        name:'addAdmin'
+        name: 'addAdmin'
       },
       {
         path: 'LT-DDXT-CPXSQLB',
@@ -240,117 +271,161 @@ export default [
       {
         path: 'LT-CPXGL-CPXXQ',
         component: ProductDetail,
-        name:'productDetail'
+        name: 'productDetail'
+      },
+      {
+        path: 'LT-CPXFLB',
+        component: Renew
       },
-			{
-				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-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-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-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-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' }, //免责声明维护--新增编辑
+  
+
+
+
+
+
+
+
+
+
 
     ]
   }

+ 2 - 2
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
-// const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.236:88';
+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:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚