Browse Source

Merge remote-tracking branch 'origin/test'

zhouna 4 năm trước cách đây
mục cha
commit
4fb094a0a3

+ 9 - 0
src/api/cdss.js

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

+ 131 - 127
src/api/config.js

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 179 - 205
src/components/knowledgeExtra/AddDevKnow.vue

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

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

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

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

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

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

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