Browse Source

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

# Conflicts:
#	src/api/icss.js
zhouna 4 years ago
parent
commit
32cec0f5c8
41 changed files with 15386 additions and 830 deletions
  1. 52 7
      src/api/config.js
  2. 136 1
      src/api/icss.js
  3. 1 1
      src/api/index.js
  4. 36 0
      src/api/knowledgeLib.js
  5. 12 15
      src/components/icss/AddMedicinePrompt.vue
  6. 1 1
      src/components/icss/ChronicDiseaseStructureList.vue
  7. 17 3
      src/components/icss/MedicineInfoPg.vue
  8. 26 24
      src/components/icss/MedicinePrompt.vue
  9. 1 1
      src/components/icss/bill/Bill.vue
  10. 10 12
      src/components/icss/dept/DeptManage.vue
  11. 13 4
      src/components/icss/disease/AddChemicalAndCommonMapping.vue
  12. 24 29
      src/components/icss/disease/ChemicalAndCommonMapping.vue
  13. 10 17
      src/components/icss/drug/DrugManage.vue
  14. 11 16
      src/components/icss/fusion/Fusion.vue
  15. 18 20
      src/components/icss/lis/AddLis.vue
  16. 13 16
      src/components/icss/lis/Lis.vue
  17. 425 0
      src/components/icss/nursing/Addnursing.vue
  18. 446 0
      src/components/icss/nursing/nursing.vue
  19. 11 16
      src/components/icss/operation/Operation.vue
  20. 1 1
      src/components/icss/pacs/Pacs.vue
  21. 619 623
      src/components/icss/plan/AddPlan.vue
  22. 13 19
      src/components/icss/plan/Plan.vue
  23. 423 0
      src/components/icss/scale/AddScale.vue
  24. 437 0
      src/components/icss/scale/ScaleManage.vue
  25. 433 0
      src/components/icss/tcmdisease/Addtcmdisease.vue
  26. 447 0
      src/components/icss/tcmdisease/tcmdisease.vue
  27. 433 0
      src/components/icss/tcmdrome/AddTcmdrome.vue
  28. 447 0
      src/components/icss/tcmdrome/tcmdrome.vue
  29. 802 0
      src/components/knowledgeExtra/AddNewRule.vue
  30. 862 0
      src/components/knowledgeExtra/AddNewRuleTable.vue
  31. 450 0
      src/components/knowledgeExtra/RuleManager.vue
  32. 89 0
      src/components/knowledgeExtra/rules.js
  33. 1 1
      src/components/login/login.less
  34. BIN
      src/images/add-new-rule-del.png
  35. BIN
      src/images/add-new-rule-sub.png
  36. BIN
      src/images/add.png
  37. BIN
      src/images/exclamationpoint.png
  38. 17 1
      src/less/admin.less
  39. 33 2
      src/routes.js
  40. 0 0
      td
  41. 8616 0
      yarn.lock

+ 52 - 7
src/api/config.js

@@ -10,10 +10,10 @@ export default {
   urls: {
     'promptServer':'/sys/file/uploadImage',    //静态知识富文本图片上传
     'midifyPassword':'/sys/user/midifyPassword',    //修改密码
-    'getConceptKnowledgeList':'/graph/conceptInfo/getPage', //  术语静态知识列表
-    'getConceptKnowledge':'/graph/conceptInfo/getRecordById',//术语静态知识详情
-    'getAllConcept':'/graph/conceptInfo/staticKnowledgeIndexWithoutInfo',   //医学术语--获取所有概念(标准术语)
-	  'saveConceptInfo':'/graph/conceptInfo/saveOrUpdateRecord',   //保存术语静态知识
+    'getConceptKnowledgeList':'/kl/conceptInfo/getPage', //  术语静态知识列表
+    'getConceptKnowledge':'/kl/conceptInfo/getRecordById',//术语静态知识详情
+    'getAllConcept':'/kl/conceptInfo/staticKnowledgeIndexWithoutInfo',   //医学术语--获取所有概念(标准术语)
+	  'saveConceptInfo':'/kl/conceptInfo/saveOrUpdateRecord',   //保存术语静态知识
     'delLisMappingById': '/api/knowledgeman/lisMapping/delLisMappingById',  //医学数据-化验大小项与公表项维护-单个删除
     'getConceptInfoAssay': '/api/knowledgeman/concept/getAllForRelation',  //化验子项维护-搜索术语
     'getAllLisConcept':'api/knowledgeman/concept/getAllLisConcept',  //医学数据-化验大小项与公表项维护-获取所有化验公表项
@@ -52,7 +52,16 @@ export default {
     'importDrugRecord': '/tran/drugConfig/importExcel',   //药品-数据导入
     'exportDrugModule': '/tran/drugConfig/exportExcelModule',   //科室-数据导入模板导出
 
-    'getOperationPage': '/tran/operationConfig/getPage',   //手术/操作列表
+      'getScalePageCDSS': '/tran/scaleConfig/getPage',   //量表列表
+      'scaleIsExistRecordCDSS': '/tran/scaleConfig/isExistRecord',   //量表-映射关系是否已存在
+      'saveOrUpdateScaleRecordCDSS': '/tran/scaleConfig/saveOrUpdateRecord',   //量表-保存或修改映射关系
+      'deleteScaleRecordCDSS': '/tran/scaleConfig/deleteRecord',   //量表-删除映射关系
+      'exportScaleRecordCDSS': '/tran/scaleConfig/exportExcel',   //量表-数据导出
+      'importScaleRecordCDSS': '/tran/scaleConfig/importExcel',   //量表-数据导入
+      'exportScaleModuleCDSS': '/tran/scaleConfig/exportExcelModule',
+
+
+      'getOperationPage': '/tran/operationConfig/getPage',   //手术/操作列表
     'operationIsExistRecord': '/tran/operationConfig/isExistRecord',   //手术/操作-映射关系是否已存在
     'saveOrUpdateOperationRecord': '/tran/operationConfig/saveOrUpdateRecord',   //手术/操作-保存或修改映射关系
     'deleteOperationRecord': '/tran/operationConfig/deleteRecord',   //手术/操作-删除映射关系
@@ -77,6 +86,32 @@ export default {
     'exportDeptModule': '/tran/deptConfig/exportExcelModule',   //科室-数据导入模板导出
 
 
+    'getNursePage': '/tran/nurseConfig/getPage',   //护理列表
+    'nurseIsExistRecord': '/tran/nurseConfig/isExistRecord',   //护理-映射关系是否已存在
+    'saveOrUpdateRecord': '/tran/nurseConfig/saveOrUpdateRecord',   //护理列表添加
+    'deleteNurseRecord': '/tran/nurseConfig/deleteRecord',   //护理-删除映射关系
+    'exportNurseRecord': '/tran/nurseConfig/exportExcel',   //护理-数据导出
+    'importNurseRecord': '/tran/nurseConfig/importExcel',   //检验-数据导入
+    'exportNurseModule': '/tran/nurseConfig/exportExcelModule',   //护理-数据导入模板导出
+
+    'getTcmdiseasePage': '/tran/tcmdiseaseConfig/getPage',   //中医疾病列表
+    'tcmIsExistRecord': '/tran/tcmdiseaseConfig/isExistRecord',   //中医疾病-映射关系是否已存在
+    'saveOrUpdateRecordTcm': '/tran/tcmdiseaseConfig/saveOrUpdateRecord',   //护理列表添加
+    'deleteTcmRecord': '/tran/tcmdiseaseConfig/deleteRecord',   //中医疾病-删除映射关系
+    'exportTcmRecord': '/tran/tcmdiseaseConfig/exportExcel',   //中医疾病-数据导出
+    'importTcmRecord': '/tran/tcmdiseaseConfig/importExcel',   //中医疾病-数据导入
+    'exportTcmModule': '/tran/tcmdiseaseConfig/exportExcelModule',   //护理-数据导入模板导出
+
+    'getTcmsyndromePage': '/tran/tcmsyndromeConfig/getPage',   //中医证候列表
+    'tcmdromeIsExistRecord': '/tran/tcmsyndromeConfig/isExistRecord',   //中医证候-映射关系是否已存在
+    'saveOrUpdateRecordTcmdrome': '/tran/tcmsyndromeConfig/saveOrUpdateRecord',   //中医证候列表添加
+    'deleteTcmdromeRecord': '/tran/tcmsyndromeConfig/deleteRecord',
+    'exportTcmdromeRecord': '/tran/tcmsyndromeConfig/exportExcel',   //中医证候-数据导出
+    'importTcmdromeRecord': '/tran/tcmsyndromeConfig/importExcel',   //中医证候-数据导入
+    'exportTcmdromeModule': '/tran/tcmsyndromeConfig/exportExcelModule',   //中医证候-数据导入模板导出
+
+
+
     'getHospitalInfo': '/tran/hospitalInfo/getHospitalInfo',   //医院信息——获取医院信息
     'saveHospitalInfoRecord': '/tran/hospitalInfo/saveRecord',   //医院信息——修改医院信息
 
@@ -97,10 +132,20 @@ export default {
     'updateBillmanStatus': '/billman/updateStatus',   //启用禁用
 
     'getAccessdMenu': '/sys/user/getUserOrgMenu',  //获取左侧菜单项
-    'delConceptInfo':'/graph/conceptInfo/changeStatus',   //删除术语静态知识
+    'delConceptInfo':'/kl/conceptInfo/changeStatus',   //删除术语静态知识
     'login': '/sys/user/getJwt',
     'getDicList': '/sys/dictionaryInfo/getList',  //返回字典信息(界面返回)
-
+    //知识库规则维护
+    'zskRuleList':'/klRule/getKlRuleInfoPage',//规则列表
+    'zskAddRule':'/klRule/saveRuleInfo',//添加规则
+    'zskActiveRule':'/klRule/startRuleInfo',//启用规则
+    'zskDisableRule':'/klRule/disableRuleInfo',//禁用规则
+    'zskDelRule':'/klRule/clearRuleInfo',//删除规则
+    'zskRuleDetail':'/klRule/getByIdRuleInfo',//规则详情
+    'zskTypeList':'/klRulePlan/getMenu',//类型列表
+    'zskSearchConcept':'/klDisease/searchConcept',//知识库搜索术语
+    'zskUpdateAll':'/cache/clearRuleAll',//更新数据
+    'zskgetDict':'/kl/dictionary/getDictionarys',//禁止修改基础规则类型
   },
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 136 - 1
src/api/icss.js

@@ -3,7 +3,7 @@ import config from '@api/config.js';
 const urls = config.urls;
 function request(config) {
   const instance = axios.create({
-    baseURL: "http://223.93.170.82:12271",
+    // baseURL: "http://192.168.2.236:6060",
     timeout: 500000,
     headers: {
       'Content-Type': "application/json;charset=utf-8"
@@ -137,6 +137,35 @@ export default {
   importDrugRecord(param) {
     return axios.post(urls.importDrugRecord, param);
   },
+
+
+  getScalePage(param) {
+    //量表列表-列表
+    return axios.post(urls.getScalePageCDSS, param);
+  },
+  scaleIsExistRecord(param) {
+    return axios.post(urls.scaleIsExistRecordCDSS, param);
+  },
+  saveOrUpdateScaleRecord(param) {
+    return axios.post(urls.saveOrUpdateScaleRecordCDSS, param);
+  },
+  deleteScaleRecord(param) {
+    return axios.post(urls.deleteScaleRecordCDSS, param);
+  },
+  exportScaleRecord(param) {
+    return axios.post(urls.exportScaleRecordCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+  importScaleRecord(param) {
+    return axios.post(urls.importScaleRecordCDSS, param);
+  },
+  exportScaleModule(param) {
+    return axios.post(urls.exportScaleModuleCDSS, param, {
+      responseType: 'blob',
+    });
+  },
+
   getOperationPage(param) {
     //手术/操作列表-列表
     return axios.post(urls.getOperationPage, param);
@@ -238,6 +267,112 @@ export default {
   },
 
 
+  getNursePage(param) {
+    //护理列表-列表
+    return axios.post(urls.getNursePage, param);
+  },
+  saveOrUpdateRecord(param) {
+    //护理列表添加
+    return axios.post(urls.saveOrUpdateRecord, param);
+  },
+  nurseIsExistRecord(param) {
+    //护理-映射关系是否已存在
+    return axios.post(urls.nurseIsExistRecord, param);
+  },
+  deleteNurseRecord(param) {
+    //护理-删除
+
+    return axios.post(urls.deleteNurseRecord, param);
+  },
+  exportNurseRecord(param) {
+    //护理-数据导出
+    return axios.post(urls.exportNurseRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importNurseRecord(param) {
+    //护理-数据导入
+    return axios.post(urls.importNurseRecord, param);
+  },
+  exportNurseModule(param) {
+    //护理-数据导入模板导出
+    return axios.post(urls.exportNurseModule, param, {
+      responseType: 'blob',
+    });
+  },
+  
+  getTcmdiseasePage(param) {
+    //中医疾病列表-列表
+    return axios.post(urls.getTcmdiseasePage, param);
+  },
+  tcmIsExistRecord(param) {
+    //中医疾病-映射关系是否已存在
+    return axios.post(urls.tcmIsExistRecord, param);
+  },
+  saveOrUpdateRecordTcm(param) {
+    //中医疾病-保存
+    return axios.post(urls.saveOrUpdateRecordTcm, param);
+  },
+  deleteTcmRecord(param) {
+    //中医疾病-删除
+    return axios.post(urls.deleteTcmRecord, param);
+  },
+  exportTcmRecord(param) {
+    //中医疾病-数据导出
+    return axios.post(urls.exportTcmRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importTcmRecord(param) {
+    //中医疾病-数据导入
+    return axios.post(urls.importTcmRecord, param);
+  },
+  exportTcmModule(param) {
+    //中医疾病-数据导入模板导出
+    return axios.post(urls.exportTcmModule, param, {
+      responseType: 'blob',
+    });
+  },
+
+
+  getTcmsyndromePage(param) {
+    //中医症候列表-列表
+    return axios.post(urls.getTcmsyndromePage, param);
+  },
+
+  tcmdromeIsExistRecord(param) {
+    //中医症候-映射关系是否已存在
+    return axios.post(urls.tcmdromeIsExistRecord, param);
+  },
+  saveOrUpdateRecordTcmdrome(param) {
+    //中医症候-保存
+    return axios.post(urls.saveOrUpdateRecordTcmdrome, param);
+  },
+  deleteTcmdromeRecord(param) {
+    //中医症候-删除
+    return axios.post(urls.deleteTcmdromeRecord, param);
+  },
+  exportTcmdromeRecord(param) {
+    //中医症候-数据导出
+    return axios.post(urls.exportTcmdromeRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importTcmdromeRecord(param) {
+    //中医疾病-数据导入
+    return axios.post(urls.importTcmdromeRecord, param);
+  },
+  exportTcmdromeModule(param) {
+    //中医疾病-数据导入模板导出
+    return axios.post(urls.exportTcmdromeModule, param, {
+      responseType: 'blob',
+    });
+  },
+
+
+
+
+
 
   getHospitalInfo(param) {
     return axios.post(urls.getHospitalInfo, param);

+ 1 - 1
src/api/index.js

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

+ 36 - 0
src/api/knowledgeLib.js

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

+ 12 - 15
src/components/icss/AddMedicinePrompt.vue

@@ -19,7 +19,7 @@
               loading-text="加载中..."
               @change="changeWord"
               @visible-change="handleVisible"
-              value-key="conceptId"
+              value-key="id"
               @clear="handleClear"
               ref="termName"
               placeholder="搜索"
@@ -36,7 +36,7 @@
           </el-form-item>
           <el-form-item label="已选择标准术语:" label-width="160px">{{form.selectedTermName}}</el-form-item>
           <el-form-item
-            v-if="form.selectedTerm&&(form.typeId==1||form.typeId==3||form.typeId==4||form.typeId==5)"
+            v-if="form.selectedTerm&&(form.typeId==1||form.typeId==3||form.typeId==4||form.typeId==5||form.typeId==6)"
             :label="titleChange"
             prop="titleChange"
             label-width="160px"
@@ -179,7 +179,7 @@ export default {
       showConfirm: true,
       isSuccessUpload: 0, //是否上传成功  0: 不在上传  1: 上传过程中  2: 上传成功
       isShowTip: false,
-      showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查 6手术和操作
+      showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查  6检查子 7手术和操作 8量表 9护理
       editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
       startCount: -1,
       isSaveSuccess: false // 是否保存成功
@@ -205,7 +205,8 @@ export default {
     }
   },
   created: function() {
-    const { isEdit, data, isCopy } = this.$route.params;
+    const { isEdit, data, isCopy } = this.$route.params;   
+    console.log(data)
     if (isEdit || isCopy) {
       this.showType = data.type; // 编辑页确认显示类型
       this.isEdit = isEdit;
@@ -233,7 +234,7 @@ export default {
               this.form.titleChange =
                 data.type == 1
                   ? data.clinicalPathwayName
-                  : data.type == 3 || data.type == 4 || data.type == 5
+                  : data.type == 3 || data.type == 4 || data.type == 5||  data.type == 6
                   ? data.noticeName
                   : '';
               this.form.selectedTermName =
@@ -331,14 +332,12 @@ export default {
       this.isShowTip = false;
     },
     changeWord(newVal) {
-      // console.log(newVal, '选中');
       this.showType = newVal.type || -1;
       const name = newVal.name;
       const typeName = newVal.typeName;
       const type = newVal.type;
-      this.form.selectedTermName =
-        name + (typeName ? '(' + typeName + ')' : '');
-      this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
+      this.form.selectedTermName = name + (typeName ? '(' + typeName + ')' : '');
+      // this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
       this.form.name = name;
       this.form.fileList = [];
       this.showFileList = false;
@@ -347,7 +346,7 @@ export default {
       this.titleChange =
         type == 1
           ? '临床路径标题:'
-          : type == 3 || type == 4 || type == 5
+          : type == 3 || type == 4 || type == 5 || type == 6
           ? '注意事项标题:'
           : '';
       this.form.fileTitle = '';
@@ -377,7 +376,7 @@ export default {
         it = Object.assign(this.form.prags[i]);
         this.form.prags.splice(i - 1, 2, it, temp);
         this.$nextTick(() => {
-          div.scrollTop = this.$refs.subForm[i-1].$el.offsetTop -48;
+          div.scrollTop = this.$refs.subForm[i - 1].$el.offsetTop - 48;
         });
       } else {
         if (i === this.form.prags.length - 1) {
@@ -452,7 +451,7 @@ export default {
       let isDiagFlag = positionArr.some(item => item === 3);
       // console.log(isVisFlag, 'isVisFlag');
       if (
-        (this.showType == 3 || this.showType == 4 || this.showType == 5) &&
+        (this.showType == 3 || this.showType == 4 || this.showType == 5|| this.showType == 6) &&
         isVisFlag
       ) {
         //若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
@@ -464,7 +463,6 @@ export default {
         });
         this.$refs.groups.validateField('titleChange');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
-
         if (this.form.titleChange.trim() !== '') {
           // console.log('内容不为空');
           return true;
@@ -587,8 +585,7 @@ export default {
         paramsAll.clinicalPathwayName = types == 1 ? this.form.titleChange : '';
         paramsAll.id = this.conceptId;
         paramsAll.name = this.form.name;
-        paramsAll.noticeName =
-          types == 3 || types == 4 || types == 5 ? this.form.titleChange : '';
+        paramsAll.noticeName = types == 3 || types == 4 || types == 5 || types == 6 ? this.form.titleChange : '';
         paramsAll.type = this.form.typeId;
         paramsAll.details = tempArr;
         param = paramsAll;

+ 1 - 1
src/components/icss/ChronicDiseaseStructureList.vue

@@ -23,7 +23,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column type="index" :index="indexMethod" label="编号" :resizable="false" width="60"></el-table-column>
+        <el-table-column type="index" :index="indexMethod" label="编号" :resizable="false" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="name" label="量表名称"></el-table-column>
         <el-table-column label="状态">

+ 17 - 3
src/components/icss/MedicineInfoPg.vue

@@ -158,8 +158,12 @@ export default {
         ]
       };
     }
+      setTimeout(()=>{
+          this.filterHiddenPosition();
+      },200)
+  },
+  mounted() {
   },
-  mounted() {},
   methods: {
     reOrder(i) {
       this.$emit('reOrder', i, this.index);
@@ -170,11 +174,21 @@ export default {
     delEmit() {
       this.$emit('del', this.index);
     },
+      filterHiddenPosition(){
+        
+          const pos = this.data.position;
+          const pArr = this.positions.map((it)=>{return it.key});
+          const pStr = pArr.join(",");
+          const arr=pos.filter((it)=>{
+              return pStr.indexOf(it)>-1;
+          });
+          this.data.position=arr;
+      },
     // 渲染内容类型
     renderPositions() {
       //显示位置枚举列表
       const pos = localStorage.getItem('knowledgeEnumsData');
-      // console.log('this.showType,', this.showType);
+      console.log('this.showType,', this.showType);
       let positions = config.contentTypes;
       if (this.showType == 1) {
         // 诊断
@@ -189,7 +203,7 @@ export default {
         this.positions = positions.filter(item => {
           return item.key <= 2;
         });
-      } else if (this.showType == 2 || this.showType == 7) {
+      } else if (this.showType == 2 || this.showType == 7|| this.showType == 8|| this.showType == 9) {
         // 药品/手术
         this.positions = positions.filter(item => item.key === 1);
       } else {

+ 26 - 24
src/components/icss/MedicinePrompt.vue

@@ -33,7 +33,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column prop="name" label="标准术语" :show-overflow-tooltip="true"></el-table-column>
         <el-table-column prop="typeName" label="术语分类" width="120"></el-table-column>
@@ -46,9 +46,8 @@
         </el-table-column>
         <el-table-column label="操作" width="140">
           <template slot-scope="scope">
-            <el-button v-if="scope.row.status===0" type="text" size="small" class="is-disabled">修改</el-button>
+            <!-- <el-button v-if="scope.row.status===0" type="text" size="small" class="is-disabled">修改</el-button> -->
             <el-button
-              v-if="scope.row.status===1"
               type="text"
               size="small"
               @click="toEditProduct(scope.row)"
@@ -121,19 +120,25 @@ export default {
     };
   },
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
-      that.getDicList();
+    this.$nextTick(()=> {
+      // this.clearFilter();
+      this.getDataList();
+      this.getDicList();
     });
     
     // this.typeList = config.emData;
     // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
+    // if (Object.keys(this.$route.params).length !== 0) {
+    //   this.currentPage = this.$route.params.currentPage;
+    // }
   },
   watch: {
     filter: {
@@ -143,13 +148,13 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+  // beforeRouteEnter(to, from, next) {
+  //   next(vm => {
+  //     //const pm = to.param;
+  //     Object.assign(vm, to.params);
+  //     vm.inCurrentPage = to.params.currentPage;
+  //   });
+  // },
   methods: {
     // 获取字典类型
     getDicList() {
@@ -227,7 +232,7 @@ export default {
           if (res.data.code == '0') {
             const data = res.data.data;
             // 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-手术和操作
-            let temp = [
+            /*let temp = [
               '',
               '诊断',
               '药品',
@@ -236,11 +241,8 @@ export default {
               '检查',
               '检查子项',
               '手术和操作',
-            ];
-            this.list = data.records = data.records.filter(item => {
-              item.typeName = temp[item.type];
-              return item;
-            });
+            ];*/
+            this.list = data.records;
             this.cacheData[param.current] = data.records;
             this.total = data.total;
             if (this.inCurrentPage !== undefined) {

+ 1 - 1
src/components/icss/bill/Bill.vue

@@ -21,7 +21,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="ruleName" label="规则名称" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="conditionName" label="条件明细" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="conceptName" label="开单项目" show-overflow-tooltip></el-table-column>

+ 10 - 12
src/components/icss/dept/DeptManage.vue

@@ -28,7 +28,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisCode" label="医院科室编码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院科室名称" show-overflow-tooltip></el-table-column>
@@ -89,11 +89,16 @@ export default {
     };
   },
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      this.getDataList();
     });
     // 非首页 编辑页返回 设置 this.currentPage
     if (Object.keys(this.$route.params).length !== 0) {
@@ -108,13 +113,6 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;

+ 13 - 4
src/components/icss/disease/AddChemicalAndCommonMapping.vue

@@ -50,6 +50,7 @@
                   @focus="handleFocus"
                   @visible-change="handleVisible"
                   placeholder="搜索"
+                  @clear="handleClear"
                   :remote-method="searchTerms"
                   reserve-keyword
                 >
@@ -57,8 +58,10 @@
                     v-for="item in uniqueNameList"
                     :key="item.icd10Code"
                     :label="item.name"
-                    :value="item"
+                    class="searchListNone"
+                    :value="item.name"
                     :title="item.name"
+                    @click="handleSelectOption(item)"
                   ></el-option>
                 </el-select>
               </el-form-item>
@@ -121,6 +124,9 @@ export default {
     }
   },
   methods: {
+    handleClear() {
+      this.form.searchText = '';
+    },
     // 搜索列表
     searchTerms(query) {
       if (!query) {
@@ -142,10 +148,13 @@ export default {
       });
     },
     changeWord(newValue) {
-      this.form.searchText = newValue.name;
-      this.form.icdCode = newValue.icd10Code;
+      // this.form.searchText = newValue.name;
+      // this.form.icdCode = newValue.icd10Code;
+    },
+    handleSelectOption(item){
+      this.form.searchText = item.name;
+      this.form.icdCode = item.icd10Code;
     },
-
     handleVisible(flag) {
       if (!flag) {
         this.uniqueNameList = [];

+ 24 - 29
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -27,7 +27,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" 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>
@@ -85,16 +85,18 @@ export default {
     };
   },
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      // this.clearFilter();
+      this.getDataList();
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   watch: {
     filter: {
@@ -104,13 +106,13 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+  // beforeRouteEnter(to, from, next) {
+  //   next(vm => {
+  //     //const pm = to.param;
+  //     Object.assign(vm, to.params);
+  //     vm.inCurrentPage = to.params.currentPage;
+  //   });
+  // },
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;
@@ -392,9 +394,10 @@ export default {
 @import '../../../less/admin.less';
 .delete {
   color: red;
+
 }
 .delete:hover {
-  color: red;
+  color: red !important;
 }
 .pagination {
   min-width: 1010px;
@@ -419,18 +422,10 @@ export default {
   }
 }
 .exportBox6 {
-  /deep/ .el-message-box__btns {
-    margin-top: 20px;
-  }
-  /deep/ .el-message-box__message {
-    // text-align: center;
-  }
-  /deep/.leftbtn {
-    background-color: #d7d7d7;
-    border-color: transparent !important;
-  }
-  /deep/ .el-message-box__header {
-    border-bottom: 1px solid #dcdfe6;
+  .leftbtn {
+    background-color: #fff !important;
+    border-color: #48C5D7 !important;
+    color: #48C5D7 !important;
   }
 }
 </style>

+ 10 - 17
src/components/icss/drug/DrugManage.vue

@@ -27,7 +27,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院药品名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准药品名称" show-overflow-tooltip></el-table-column>
@@ -85,17 +85,17 @@ export default {
     };
   },
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
-      
+    setTimeout(()=> {
+      this.getDataList();
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   watch: {
     filter: {
@@ -105,13 +105,6 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;

+ 11 - 16
src/components/icss/fusion/Fusion.vue

@@ -27,7 +27,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院输血类型" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准输血类型" show-overflow-tooltip></el-table-column>
@@ -84,16 +84,17 @@ export default {
     };
   },
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      this.getDataList();
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   watch: {
     filter: {
@@ -103,13 +104,7 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;

+ 18 - 20
src/components/icss/lis/AddLis.vue

@@ -67,10 +67,10 @@
                   <el-option
                     v-for="(item,idx) in uniqueNameList"
                     :key="idx"
-                    :label="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
-                    :value="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
-                    :title="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
-                    @click.native="handleChoose(searchType === 2 ? item.uniqueName : item)"
+                    :label="searchType == 2 ? `${item.uniqueName}(${item.name})` : item"
+                    :value="searchType == 2 ? `${item.uniqueName}` : item"
+                    :title="searchType == 2 ? `${item.uniqueName}(${item.name})` : item"
+                    @click.native="handleChoose(searchType == 2 ? `${item.uniqueName}` : item)"
                   ></el-option>
                 </el-select>
               </el-form-item>
@@ -129,11 +129,11 @@ export default {
       this.isEdit = isEdit;
       this.editId = data.id;
       this.form.hisName = data.hisName;
-      this.form.searchText = data.uniqueName;
-      this.form.hisDetailName = data.hisDetailName;
+      this.form.hisDetailName = data.hisDetailName||'';
       this.form.searchTextPre = data.uniqueName;
+      this.form.searchText = data.uniqueName;
     }
-    if (isEdit && data.hisName !== '' && data.hisDetailName === '') {
+    if (isEdit && data.hisName !='' && !data.hisDetailName) {
       this.searchType = 1;
       // console.log('改变searchType为1');
     }
@@ -148,7 +148,7 @@ export default {
       }
       const { hisName, hisDetailName } = this.form;
       let type = 2; // 1-化验大项、2-化验小项
-      if (hisName !== '' && hisDetailName === '') {
+      if (hisName != '' && hisDetailName == '') {
         type = 1;
       }
       this.searchType = type;
@@ -161,9 +161,9 @@ export default {
       };
       api.retrievalSearch(params).then(res => {
         this.showDrop = false;
-        if (res.data.code === '0') {
+        if (res.data.code == '0') {
           this.uniqueNameList =
-            type === 1 ? res.data.data.lisNames : res.data.data.lisDetailNames;
+            type == 1 ? res.data.data.lisNames : res.data.data.lisDetailNames;
         }
       });
     },
@@ -179,7 +179,8 @@ export default {
       this.form.searchTextPre = '';
     },
     handleChoose(val) {
-      // console.log('点击选中option', val);
+      console.log('点击选中option', val);
+      console.log(this.searchType)
       this.form.searchTextPre = val;
       this.form.searchText = val;
     },
@@ -193,28 +194,25 @@ export default {
 
     // 建立关联-参数处理
     submitForm() {
-      console.log(this.searchType, 'searchType');
-
       this.$refs.relationForm.validate(valid => {
         if (valid) {
           const { searchText, hisName, hisDetailName } = this.form;
           // 当标准术语是套餐时,细项必须为空
-          if (this.searchType === 1 && hisDetailName !== '') {
+          if (this.searchType == 1 && hisDetailName != '') {
             this.warning('医院术语与标准术语类型不匹配,请修改');
             return;
           }
 
           // 当标准术语是细项时,医院术语套餐和细项均不能为空
-          if (this.searchType === 2) {
-            if (hisName === '') {
+          if (this.searchType == 2) {
+            if (hisName == '') {
               this.warning('医院术语与标准术语类型不匹配,请修改');
               return;
-            } else if (hisDetailName === '') {
+            } else if (hisDetailName == '') {
               this.warning('医院术语与标准术语类型不匹配,请修改');
               return;
             }
           }
-
           let params = {
             hisName: hisName,
             uniqueName: searchText,
@@ -247,7 +245,7 @@ export default {
           }
         })
         .catch(err => {
-          if (err.code === '900010001') {
+          if (err.code == '900010001') {
             return false;
           }
           this.warning(err);
@@ -257,7 +255,7 @@ export default {
     // 映射关系不存在-建立关联
     saveLisMapping(params, msg, type) {
       api.saveOrUpdateLisRecord(params).then(res => {
-        if (res.data.code === '0') {
+        if (res.data.code == '0') {
           this.warning(res.data.msg || msg, type);
           this.initForm();
           this.$router.push({

+ 13 - 16
src/components/icss/lis/Lis.vue

@@ -30,7 +30,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="检验套餐" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="hisDetailName" label="检验细项" show-overflow-tooltip></el-table-column>
@@ -89,16 +89,19 @@ export default {
     };
   },
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      // that.clearFilter();
+      this.getDataList();
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
+
   },
   watch: {
     filter: {
@@ -108,13 +111,7 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;

+ 425 - 0
src/components/icss/nursing/Addnursing.vue

@@ -0,0 +1,425 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '护理关联维护--修改关联' : '护理关联维护--添加关联'"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Nursing"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="120px"
+      ref="relationForm"
+    >
+      <div class="AddChemicalAndCommonMappingBox clearfix">
+        <div class="titleBox clearfix">
+          <p class="title">医院术语</p>
+          <p class="title">标准术语</p>
+        </div>
+        <div class="leftBox clearfix">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="护理名称:" prop="hisName">
+                <el-input v-model="form.hisName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="护理名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="midBox">
+          <img class="midLogo" src="../../../images/relation.png" alt />
+          <p class="midTitle">相互关联</p>
+        </div>
+        <div class="rightBox">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="护理名称:" prop="searchText">
+                <el-select
+                  style="width:100%; minWidth: 240px"
+                  v-model="form.searchText"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @visible-change="handleVisible"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                  reserve-keyword
+                >
+                  <el-option
+                    v-for="(item,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="item.name"
+                    :value="item.name"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="护理名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="btn">
+        <el-form-item>
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/icss.js';
+export default {
+  name: 'AddDept',
+  data() {
+    return {
+      isEdit: false,
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入护理名称', trigger: 'change' },
+          { max: 80, message: '护理名称最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择护理名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      searchInfo: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data } = this.$route.params;
+    // console.log(data, 'data');
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.searchInfo = query;
+      this.showDrop = true;
+      let params = {
+        type: 11, //科室
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.nursenames;
+        }
+      });
+    },
+    changeWord(newVal) {
+      console.log(newVal);
+    },
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .nurseIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '保存成功', 'success');
+          } else {
+            // 已存在,提示修改
+            this.warning('该条关联已存在,无法添加');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Nursing',
+            params: Object.assign({}, this.$route.params, {
+              currentPage: 1
+            })
+          });
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+<style lang="less">
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    font-size: 14px;
+  }
+  .midBox {
+    width: 6%;
+    padding: 50px 0 0 0;
+    text-align: center;
+  }
+  .midTitle {
+    width: 40px;
+    margin: 0 auto;
+  }
+  .midLogo {
+    margin: 0 auto;
+  }
+  .leftBox,
+  .rightBox {
+    border: 1px solid #dcdfe6;
+    padding: 20px 20px;
+  }
+  .itemLabel {
+    width: 100%;
+    min-height: 50px;
+    line-height: 50px;
+    position: relative;
+  }
+  .itemLabelName,
+  .searchInput,
+  .searchName {
+    float: left;
+    color: #606266;
+  }
+  .itemLabelName {
+    width: 150px;
+  }
+  .isRequired::before {
+    content: '*';
+    color: red;
+  }
+  .searchInput,
+  .mealNameItem {
+    padding: 0 5px;
+  }
+  .searchInput,
+  .searchName {
+    display: inline-block;
+    height: 32px;
+    line-height: 32px;
+    border: 1px solid #a9a9a9;
+    margin: 8px 0 0 0;
+  }
+
+  .searchName {
+    text-align: center;
+    border-left: none;
+    cursor: pointer;
+    padding: 0 12px;
+    font-size: 16px;
+  }
+  .itemList {
+    position: absolute;
+    background: #fff;
+    width: 162px;
+    max-height: 150px;
+    border: 1px solid #a9a9a9;
+    left: 150px;
+    top: 42px;
+    z-index: 2;
+    overflow-y: auto;
+  }
+  .itemList {
+    width: calc(100% - 131px);
+  }
+  .mealNameItem {
+    height: 30px;
+    line-height: 30px;
+    font-size: 14px;
+    cursor: pointer;
+  }
+  .mealNameItem:hover {
+    background: #f5f7fa;
+  }
+  // .selectItemName {
+  //   padding-left: 4px;
+  //   display: inline-block;
+  //   margin-top: 8px;
+  //   // width: calc(100% - 160px);s
+  //   line-height: 24px;
+  //   overflow: hidden;
+  //   word-wrap: break-word;
+  //   word-break: break-all;
+  // }
+  .previewInfo {
+    padding-left: 4px;
+    display: inline-block;
+    margin-top: 8px;
+    // width: calc(100% - 160px);s
+    line-height: 24px;
+    overflow: hidden;
+    word-wrap: break-word;
+    word-break: break-all;
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .sumbit {
+    position: absolute;
+    display: inline-block;
+    width: 80px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #a9a9a9;
+    text-align: center;
+    right: 100px;
+  }
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
+    }
+  }
+}
+body {
+  .el-select-dropdown {
+    /deep/ .el-select-dropdown__item {
+      span {
+        color: #333;
+      }
+    }
+    ul {
+      max-width: 300px;
+    }
+
+    /deep/ .el-scrollbar {
+      border: 1px solid #dcdfe6;
+    }
+    /deep/ .popper__arrow {
+      border-bottom-color: #a5a5a5 !important;
+    }
+  }
+  /deep/ .el-popper[x-placement^='bottom'] {
+    margin-top: 8px !important;
+  }
+}
+</style>

+ 446 - 0
src/components/icss/nursing/nursing.vue

@@ -0,0 +1,446 @@
+<template>
+  <div>
+    <crumbs title="护理关联维护" style="min-width: 980px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input
+            type="file"
+            name="uploadfile "
+            id="upFile"
+            @change="uploadFile($event)"
+          />
+                      <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item label="医学护理名称:">
+          <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="标准护理名称:">
+          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item class="dododo">
+          <el-button size="mini" @click="filterDatas">检索</el-button>
+          <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="contents">
+      <el-table :data="list" border style="width: 100%">
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="hisName" label="医院护理名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准护理名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <el-pagination
+          :current-page.sync="currentPage"
+          @current-change="currentChange"
+          background
+          :page-size="pageSize"
+          :page-sizes="pageSizeArr"
+          @size-change="handleSizeChange"
+          :layout="pageLayout"
+          :total="total"
+        ></el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'DeptManage',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      fileName: '',
+      formData: {},
+      headers: {},
+      uploadInfo: '导入'
+    };
+  },
+  created() {
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
+    //返回时避免参数未赋值就获取列表
+    setTimeout(()=> {
+      this.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getNursePage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: ''
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddNursing', params: pam });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    modifyRelation(row) {
+      const item = Object.assign({}, row);
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({
+        name: 'AddNursing',
+        params: Object.assign(pam, { isEdit: true, data: item })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        confirmButtonText: '删除',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'cancelBtn',
+        confirmButtonClass: 'confirmC',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteNurseRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$confirm('确定要导出全部护理关联数据吗?', '', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'leftbtn',
+        customClass: 'exportBox6',
+        title: '提示',
+        type: 'warning'
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     // instance.confirmButtonText = '导出中...';
+        //     done()
+        //     api.exportDeptRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '科室关联数据.xls');
+        //           // done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportNurseRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '护理关联数据.xls');
+            }
+          });
+        })
+        .catch(() => {});
+    },
+
+    // 导入模板
+    exportModule() {
+      api.exportNurseModule().then(res => {
+        if (res.status === 200) {
+          setTimeout(() => {
+            utils.downloadExportedData(res.data, '护理导入模板.xls');
+          }, 1500);
+        }
+      });
+    },
+
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      // this.fileName = e.target.files[0].name; // 表单同步显示
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      this.uploadInfo = '导入中...';
+      api.importNurseRecord(formData, header).then(res => {
+        // console.log('导入文件结果', '===================', res);
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
+          this.$confirm(`导入成功`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else {
+          this.$confirm(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        }
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    }
+  }
+};
+</script>
+
+
+<style lang="less">
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+  /deep/.el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.exportConfirm {
+  .cancelSure {
+    display: none;
+  }
+}
+</style>

+ 11 - 16
src/components/icss/operation/Operation.vue

@@ -27,7 +27,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" 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
@@ -89,16 +89,18 @@ export default {
     };
   },
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
+    console.log(param)
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      this.getDataList();
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   watch: {
     filter: {
@@ -108,13 +110,6 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;

+ 1 - 1
src/components/icss/pacs/Pacs.vue

@@ -27,7 +27,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院检查项目" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准检查项目" show-overflow-tooltip></el-table-column>

File diff suppressed because it is too large
+ 619 - 623
src/components/icss/plan/AddPlan.vue


+ 13 - 19
src/components/icss/plan/Plan.vue

@@ -13,7 +13,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="planName" label="方案名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="planCode" label="方案编码" width="180"></el-table-column>
         <el-table-column
@@ -98,17 +98,18 @@ export default {
       hospitalId: ''
     };
   },
-  created() {
-    const that = this;
+  created() {    
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.getDataList();
-      that.clearFilter()
+    setTimeout(()=> {
+      this.getDataList();
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   watch: {
     filter: {
@@ -118,13 +119,6 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;
@@ -190,7 +184,7 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddPlan', params: pam });
+      this.$router.push({ name: 'AddPlan', params: {...pam,hospitalId:this.hospitalId} });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -204,7 +198,7 @@ export default {
         : { currentPage: this.currentPage, pageSize: this.pageSize };
       this.$router.push({
         name: 'AddPlan',
-        params: Object.assign(pam, { isEdit: true, data: item })
+        params: Object.assign(pam, { isEdit: true, data: item,hospitalId:this.hospitalId })
       });
     },
     currentChange(next) {

+ 423 - 0
src/components/icss/scale/AddScale.vue

@@ -0,0 +1,423 @@
+<template>
+    <div class="AddChemicalAndCommonMappingWrapper clearfix">
+        <crumbs
+                :title="isEdit ? '量表关联维护--修改关联' : '量表关联维护--添加关联'"
+                class="topBack"
+                :param="$route.params"
+                linkTo="ScaleManage"
+        ></crumbs>
+        <el-form
+                :model="form"
+                :rules="rules"
+                label-position="right"
+                label-width="120px"
+                ref="relationForm"
+        >
+            <div class="AddChemicalAndCommonMappingBox clearfix">
+                <div class="titleBox clearfix">
+                    <p class="title">医院术语</p>
+                    <p class="title">标准术语</p>
+                </div>
+                <div class="leftBox clearfix">
+                    <el-row>
+                        <el-col :span="16">
+                            <el-form-item label="量表名称:" prop="hisName">
+                                <el-input v-model="form.hisName" clearable style="minWidth: 240px"></el-input>
+                            </el-form-item>
+                            <el-form-item label="量表名称预览:">
+                                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </div>
+                <div class="midBox">
+                    <img class="midLogo" src="../../../images/relation.png" alt />
+                    <p class="midTitle">相互关联</p>
+                </div>
+                <div class="rightBox">
+                    <el-row>
+                        <el-col :span="16">
+                            <el-form-item label="量表名称:" prop="searchText">
+                                <el-select
+                                        style="width:100%;minWidth: 240px"
+                                        v-model="form.searchText"
+                                        filterable
+                                        remote
+                                        clearable
+                                        :loading="showDrop"
+                                        loading-text="加载中..."
+                                        @change="changeWord"
+                                        @focus="handleFocus"
+                                        @visible-change="handleVisible"
+                                        placeholder="搜索"
+                                        :remote-method="searchTerms"
+                                        reserve-keyword
+                                >
+                                    <el-option
+                                            v-for="(item,idx) in uniqueNameList"
+                                            :key="idx"
+                                            :label="item.name"
+                                            :value="item.name"
+                                            :title="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item label="量表名称预览:">
+                                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </div>
+            </div>
+            <div class="btn">
+                <el-form-item>
+                    <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+                </el-form-item>
+            </div>
+        </el-form>
+    </div>
+</template>
+<script>
+    import api from '@api/icss.js';
+    import config from '@api/config';
+    export default {
+        name: 'AddScale',
+        data() {
+            return {
+                isEdit: false,
+                editId: '',
+                uniqueNameList: [],
+                form: {
+                    searchText: '', //搜索字段
+                    hisName: '',
+                    form: ''
+                },
+                rules: {
+                    hisName: [
+                        { required: true, message: '请输入量表名称', trigger: 'change' },
+                        { max: 80, message: '量表名称最多80字', trigger: 'change' }
+                    ],
+                    searchText: [
+                        { required: true, message: '请选择量表名称', trigger: 'change' }
+                    ]
+                },
+                saveDisable: false, //保存按钮禁止点击
+                showDrop: false, //下拉框显示文字
+                drugList: []
+            };
+        },
+        created() {
+            //修改
+            const { isEdit, data } = this.$route.params;
+            this.getDicList();
+            if (isEdit) {
+                this.isEdit = isEdit;
+                this.editId = data.id;
+                this.form.hisName = data.hisName;
+                this.form.searchText = data.uniqueName;
+                this.form.form = data.form;
+            }
+        },
+        methods: {
+            getDicList() {
+                api.getDicList().then(res => {
+                    if (res.data.code === '0') {
+                        let dragData = [];
+                        res.data.data &&
+                        res.data.data['9'].forEach(item => {
+                            if (item.val !== '0') {
+                                dragData.push(item);
+                            }
+                        });
+                        this.drugList = dragData;
+                    }
+                });
+            },
+
+            // 搜索列表
+            searchTerms(query) {
+                if (!query) {
+                    this.uniqueNameList = [];
+                    return;
+                }
+                this.showDrop = true;
+                let params = {
+                    type: 10, //量表
+                    inputStr: query,
+                    sex: 3,
+                    age: 0
+                };
+                api.retrievalSearch(params).then(res => {
+                    this.showDrop = false;
+                    if (res.data.code === '0') {
+                        this.uniqueNameList = res.data.data.scalenames;
+                    }
+                });
+            },
+            changeWord() {},
+            // 获取焦点
+            handleFocus() {},
+
+            handleVisible(flag) {
+                if (!flag) {
+                    this.uniqueNameList = [];
+                }
+            },
+
+            // 初始化表单数据
+            initForm() {
+                this.form.hisName = '';
+                this.form.searchText = '';
+            },
+
+            // 建立关联-参数处理
+            submitForm() {
+                this.$refs.relationForm.validate(valid => {
+                    if (valid) {
+                        const { searchText, hisName, form } = this.form;
+                        let params = {
+                            hisName: hisName,
+                            uniqueName: searchText,
+                            form: form
+                        };
+                        this.showSaveDialog(params);
+                    } else {
+                        console.log('error submit!!');
+                        return false;
+                    }
+                });
+            },
+            // 建立关联-映射关系是否已存在
+            showSaveDialog(params) {
+                this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+                api
+                    .scaleIsExistRecord(params)
+                    .then(res => {
+                        if (!res.data.data) {
+                            // 不存在,创建新的关联
+                            // 如果是编辑时,需要携带id
+                            if (this.isEdit) {
+                                params = { ...params, id: this.editId };
+                            }
+                            this.saveLisMapping(params, '保存成功', 'success');
+                        } else {
+                            // 已存在,提示修改
+                            this.warning('该条关联已存在,无法添加');
+                            this.saveDisable = false;
+                        }
+                    })
+                    .catch(err => {
+                        if (err.code === '900010001') {
+                            return false;
+                        }
+                        this.warning(err);
+                    });
+            },
+
+            // 映射关系不存在-建立关联
+            saveLisMapping(params, msg, type) {
+                api.saveOrUpdateScaleRecord(params).then(res => {
+                    if (res.data.code === '0') {
+                        this.warning(res.data.msg || msg, type);
+                        this.initForm();
+                        this.$router.push({
+                            name: 'ScaleManage',
+                            params: Object.assign({}, this.$route.params, {
+                                currentPage: 1
+                            })
+                        });
+                    } else {
+                        this.warning(res.data.msg);
+                    }
+                    this.saveDisable = false;
+                });
+            },
+            // 关联已存在模态框
+            showConfirmDialog(msg, resolve) {
+                this.$confirm(msg, '提示', {
+                    customClass: 'confirmRealation',
+                    confirmButtonText: '是',
+                    cancelButtonText: '否',
+                    cancelButtonClass: 'cancelButton',
+                    type: 'warning'
+                })
+                    .then(() => {
+                        resolve();
+                    })
+                    .catch(() => {
+                        this.saveDisable = false;
+                        this.warning('建立失败', 'error');
+                    });
+            },
+            warning(msg, type) {
+                this.$message({
+                    showClose: true,
+                    message: msg,
+                    type: type || 'warning'
+                });
+            }
+        }
+    };
+</script>
+<style lang="less">
+    .AddChemicalAndCommonMappingWrapper {
+        .AddChemicalAndCommonMappingBox {
+            min-width: 940px;
+        }
+        color: #606266;
+        .topBack {
+            top: 0;
+        }
+        .titleBox {
+            padding: 0 0 10px 0px;
+        }
+        .title {
+            width: 50%;
+            float: left;
+            font-size: 14px;
+        }
+        .AddChemicalAndCommonMappingBox {
+            padding: 20px 30px 20px 30px;
+            margin: 70px 20px 0 20px;
+            background: #fff;
+        }
+        .leftBox,
+        .midBox,
+        .rightBox {
+            width: 40%;
+            float: left;
+            min-height: 200px;
+            font-size: 14px;
+        }
+        .midBox {
+            width: 6%;
+            padding: 50px 0 0 0;
+            text-align: center;
+        }
+        .midTitle {
+            width: 40px;
+            margin: 0 auto;
+        }
+        .midLogo {
+            margin: 0 auto;
+        }
+        .leftBox,
+        .rightBox {
+            border: 1px solid #dcdfe6;
+            padding: 20px 20px;
+        }
+        .itemLabel {
+            width: 100%;
+            min-height: 50px;
+            line-height: 50px;
+            position: relative;
+        }
+        .itemLabelName,
+        .searchInput,
+        .searchName {
+            float: left;
+            color: #606266;
+        }
+        .itemLabelName {
+            width: 150px;
+        }
+        .isRequired::before {
+            content: '*';
+            color: red;
+        }
+        .searchInput,
+        .mealNameItem {
+            padding: 0 5px;
+        }
+        .searchInput,
+        .searchName {
+            display: inline-block;
+            height: 32px;
+            line-height: 32px;
+            border: 1px solid #a9a9a9;
+            margin: 8px 0 0 0;
+        }
+
+        .searchName {
+            text-align: center;
+            border-left: none;
+            cursor: pointer;
+            padding: 0 12px;
+            font-size: 16px;
+        }
+        .itemList {
+            position: absolute;
+            background: #fff;
+            width: 162px;
+            max-height: 150px;
+            border: 1px solid #a9a9a9;
+            left: 150px;
+            top: 42px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .itemList {
+            width: calc(100% - 131px);
+        }
+        .mealNameItem {
+            height: 30px;
+            line-height: 30px;
+            font-size: 14px;
+            cursor: pointer;
+        }
+        .mealNameItem:hover {
+            background: #f5f7fa;
+        }
+        // .selectItemName {
+        //   padding-left: 4px;
+        //   display: inline-block;
+        //   margin-top: 8px;
+        //   // width: calc(100% - 160px);s
+        //   line-height: 24px;
+        //   overflow: hidden;
+        //   word-wrap: break-word;
+        //   word-break: break-all;
+        // }
+        .previewInfo {
+            padding-left: 4px;
+            display: inline-block;
+            margin-top: 8px;
+            // width: calc(100% - 160px);s
+            line-height: 24px;
+            overflow: hidden;
+            word-wrap: break-word;
+            word-break: break-all;
+        }
+        .btn {
+            position: relative;
+            background-color: #fff;
+            margin: 0px 20px;
+            padding: 20px;
+            min-width: 960px;
+            height: 80px;
+            .el-button {
+                position: absolute;
+                right: 80px;
+                top: 20px;
+            }
+        }
+        .sumbit {
+            position: absolute;
+            display: inline-block;
+            width: 80px;
+            height: 30px;
+            line-height: 30px;
+            border: 1px solid #a9a9a9;
+            text-align: center;
+            right: 100px;
+        }
+    }
+    .confirmRealation {
+        .cancelButton {
+            border: 1px solid #a9a9a9;
+            span {
+                color: #606266;
+            }
+        }
+    }
+</style>

+ 437 - 0
src/components/icss/scale/ScaleManage.vue

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

+ 433 - 0
src/components/icss/tcmdisease/Addtcmdisease.vue

@@ -0,0 +1,433 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '中医疾病关联维护--修改关联' : '中医疾病关联维护--添加关联'"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Tcmdisease"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="140px"
+      ref="relationForm"
+    >
+      <div class="AddChemicalAndCommonMappingBox clearfix">
+        <div class="titleBox clearfix">
+          <p class="title">医院术语</p>
+          <p class="title">标准术语</p>
+        </div>
+        <div class="leftBox clearfix">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="中医疾病名称:" prop="hisName">
+                <el-input v-model="form.hisName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="中医疾病名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="midBox">
+          <img class="midLogo" src="../../../images/relation.png" alt />
+          <p class="midTitle">相互关联</p>
+        </div>
+        <div class="rightBox">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="中医疾病名称:" prop="searchText">
+                <el-select
+                  style="width:100%; minWidth: 240px"
+                  v-model="form.searchText"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @visible-change="handleVisible"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                  reserve-keyword
+                >
+                  <el-option
+                    v-for="(item,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="item.name"
+                    :value="item"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="中医疾病名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+              <el-form-item label="中医疾病代码:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.uniqueCode}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="btn">
+        <el-form-item>
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/icss.js';
+export default {
+  name: 'AddDept',
+  data() {
+    return {
+      isEdit: false,
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+        uniqueCode: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入中医疾病名称', trigger: 'change' },
+          { max: 80, message: '中医疾病名称最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择中医疾病名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      searchInfo: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data } = this.$route.params;
+    // console.log(data, 'data');
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+      this.form.uniqueCode = data.uniqueCode;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.searchInfo = query;
+      this.showDrop = true;
+      let params = {
+        type: 12, //科室
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.tcmdiseaseNames;
+        }
+      });
+    },
+    changeWord(newVal) {
+      this.form.searchText = newVal.name
+      this.form.uniqueCode = newVal.code
+    },
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+      this.form.uniqueCode = ''
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName,uniqueCode } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            uniqueCode:uniqueCode
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .tcmIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '保存成功', 'success');
+          } else {
+            // 已存在,提示修改
+            this.warning('该条关联已存在,无法添加');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateRecordTcm(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Tcmdisease',
+            params: Object.assign({}, this.$route.params, {
+              currentPage: 1
+            })
+          });
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+<style lang="less">
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    font-size: 14px;
+  }
+  .midBox {
+    width: 6%;
+    padding: 50px 0 0 0;
+    text-align: center;
+  }
+  .midTitle {
+    width: 40px;
+    margin: 0 auto;
+  }
+  .midLogo {
+    margin: 0 auto;
+  }
+  .leftBox,
+  .rightBox {
+    border: 1px solid #dcdfe6;
+    padding: 20px 20px;
+  }
+  .itemLabel {
+    width: 100%;
+    min-height: 50px;
+    line-height: 50px;
+    position: relative;
+  }
+  .itemLabelName,
+  .searchInput,
+  .searchName {
+    float: left;
+    color: #606266;
+  }
+  .itemLabelName {
+    width: 150px;
+  }
+  .isRequired::before {
+    content: '*';
+    color: red;
+  }
+  .searchInput,
+  .mealNameItem {
+    padding: 0 5px;
+  }
+  .searchInput,
+  .searchName {
+    display: inline-block;
+    height: 32px;
+    line-height: 32px;
+    border: 1px solid #a9a9a9;
+    margin: 8px 0 0 0;
+  }
+
+  .searchName {
+    text-align: center;
+    border-left: none;
+    cursor: pointer;
+    padding: 0 12px;
+    font-size: 16px;
+  }
+  .itemList {
+    position: absolute;
+    background: #fff;
+    width: 162px;
+    max-height: 150px;
+    border: 1px solid #a9a9a9;
+    left: 150px;
+    top: 42px;
+    z-index: 2;
+    overflow-y: auto;
+  }
+  .itemList {
+    width: calc(100% - 131px);
+  }
+  .mealNameItem {
+    height: 30px;
+    line-height: 30px;
+    font-size: 14px;
+    cursor: pointer;
+  }
+  .mealNameItem:hover {
+    background: #f5f7fa;
+  }
+  // .selectItemName {
+  //   padding-left: 4px;
+  //   display: inline-block;
+  //   margin-top: 8px;
+  //   // width: calc(100% - 160px);s
+  //   line-height: 24px;
+  //   overflow: hidden;
+  //   word-wrap: break-word;
+  //   word-break: break-all;
+  // }
+  .previewInfo {
+    padding-left: 4px;
+    display: inline-block;
+    margin-top: 8px;
+    // width: calc(100% - 160px);s
+    line-height: 24px;
+    overflow: hidden;
+    word-wrap: break-word;
+    word-break: break-all;
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .sumbit {
+    position: absolute;
+    display: inline-block;
+    width: 80px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #a9a9a9;
+    text-align: center;
+    right: 100px;
+  }
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
+    }
+  }
+}
+body {
+  .el-select-dropdown {
+    /deep/ .el-select-dropdown__item {
+      span {
+        color: #333;
+      }
+    }
+    ul {
+      max-width: 300px;
+    }
+
+    /deep/ .el-scrollbar {
+      border: 1px solid #dcdfe6;
+    }
+    /deep/ .popper__arrow {
+      border-bottom-color: #a5a5a5 !important;
+    }
+  }
+  /deep/ .el-popper[x-placement^='bottom'] {
+    margin-top: 8px !important;
+  }
+}
+</style>

+ 447 - 0
src/components/icss/tcmdisease/tcmdisease.vue

@@ -0,0 +1,447 @@
+<template>
+  <div>
+    <crumbs title="中医疾病关联维护" style="min-width: 980px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input
+            type="file"
+            name="uploadfile "
+            id="upFile"
+            @change="uploadFile($event)"
+          />
+                      <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item label="医院中医疾病名称:">
+          <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="标准中医疾病名称:">
+          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item class="dododo">
+          <el-button size="mini" @click="filterDatas">检索</el-button>
+          <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="contents">
+      <el-table :data="list" border style="width: 100%">
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="hisName" label="医院中医疾病名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueCode" label="中医疾病代码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准中医疾病名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <el-pagination
+          :current-page.sync="currentPage"
+          @current-change="currentChange"
+          background
+          :page-size="pageSize"
+          :page-sizes="pageSizeArr"
+          @size-change="handleSizeChange"
+          :layout="pageLayout"
+          :total="total"
+        ></el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'Tcmdisease',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      fileName: '',
+      formData: {},
+      headers: {},
+      uploadInfo: '导入'
+    };
+  },
+  created() {
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
+    //返回时避免参数未赋值就获取列表
+    setTimeout(()=> {
+      this.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getTcmdiseasePage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: ''
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddTcmdisease', params: pam });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    modifyRelation(row) {
+      const item = Object.assign({}, row);
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({
+        name: 'AddTcmdisease',
+        params: Object.assign(pam, { isEdit: true, data: item })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        confirmButtonText: '删除',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'cancelBtn',
+        confirmButtonClass: 'confirmC',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteTcmRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$confirm('确定要导出全部中医疾病关联数据吗?', '', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'leftbtn',
+        customClass: 'exportBox6',
+        title: '提示',
+        type: 'warning'
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     // instance.confirmButtonText = '导出中...';
+        //     done()
+        //     api.exportDeptRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '科室关联数据.xls');
+        //           // done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportTcmRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '中医疾病关联数据.xls');
+            }
+          });
+        })
+        .catch(() => {});
+    },
+
+    // 导入模板
+    exportModule() {
+      api.exportTcmModule().then(res => {
+        if (res.status === 200) {
+          setTimeout(() => {
+            utils.downloadExportedData(res.data, '中医疾病导入模板.xls');
+          }, 1500);
+        }
+      });
+    },
+
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      // this.fileName = e.target.files[0].name; // 表单同步显示
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      this.uploadInfo = '导入中...';
+      api.importTcmRecord(formData, header).then(res => {
+        // console.log('导入文件结果', '===================', res);
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
+          this.$confirm(`导入成功`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'success'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else {
+          this.$confirm(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        }
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    }
+  }
+};
+</script>
+
+
+<style lang="less">
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+  /deep/.el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.exportConfirm {
+  .cancelSure {
+    display: none;
+  }
+}
+</style>

+ 433 - 0
src/components/icss/tcmdrome/AddTcmdrome.vue

@@ -0,0 +1,433 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '中医证候关联维护--修改关联' : '中医证候关联维护--添加关联'"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Tcmdrome"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="140px"
+      ref="relationForm"
+    >
+      <div class="AddChemicalAndCommonMappingBox clearfix">
+        <div class="titleBox clearfix">
+          <p class="title">医院术语</p>
+          <p class="title">标准术语</p>
+        </div>
+        <div class="leftBox clearfix">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="中医证候名称:" prop="hisName">
+                <el-input v-model="form.hisName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="中医证候名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="midBox">
+          <img class="midLogo" src="../../../images/relation.png" alt />
+          <p class="midTitle">相互关联</p>
+        </div>
+        <div class="rightBox">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="中医证候名称:" prop="searchText">
+                <el-select
+                  style="width:100%; minWidth: 240px"
+                  v-model="form.searchText"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @visible-change="handleVisible"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                  reserve-keyword
+                >
+                  <el-option
+                    v-for="(item,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="item.name"
+                    :value="item"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="中医证候名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+              <el-form-item label="中医证候代码:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.uniqueCode}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="btn">
+        <el-form-item>
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/icss.js';
+export default {
+  name: 'AddTcmdrome',
+  data() {
+    return {
+      isEdit: false,
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+        uniqueCode: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入中医证候名称', trigger: 'change' },
+          { max: 80, message: '中医证候名称最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择中医证候名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      searchInfo: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data } = this.$route.params;
+    // console.log(data, 'data');
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+      this.form.uniqueCode = data.uniqueCode;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.searchInfo = query;
+      this.showDrop = true;
+      let params = {
+        type: 13, //科室
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.tcmsyndromeNames;
+        }
+      });
+    },
+    changeWord(newVal) {
+      this.form.searchText = newVal.name
+      this.form.uniqueCode = newVal.code
+    },
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+      this.form.uniqueCode = ''
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName,uniqueCode } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            uniqueCode:uniqueCode
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .tcmdromeIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '保存成功', 'success');
+          } else {
+            // 已存在,提示修改
+            this.warning('该条关联已存在,无法添加');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateRecordTcmdrome(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Tcmdrome',
+            params: Object.assign({}, this.$route.params, {
+              currentPage: 1
+            })
+          });
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+<style lang="less">
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    font-size: 14px;
+  }
+  .midBox {
+    width: 6%;
+    padding: 50px 0 0 0;
+    text-align: center;
+  }
+  .midTitle {
+    width: 40px;
+    margin: 0 auto;
+  }
+  .midLogo {
+    margin: 0 auto;
+  }
+  .leftBox,
+  .rightBox {
+    border: 1px solid #dcdfe6;
+    padding: 20px 20px;
+  }
+  .itemLabel {
+    width: 100%;
+    min-height: 50px;
+    line-height: 50px;
+    position: relative;
+  }
+  .itemLabelName,
+  .searchInput,
+  .searchName {
+    float: left;
+    color: #606266;
+  }
+  .itemLabelName {
+    width: 150px;
+  }
+  .isRequired::before {
+    content: '*';
+    color: red;
+  }
+  .searchInput,
+  .mealNameItem {
+    padding: 0 5px;
+  }
+  .searchInput,
+  .searchName {
+    display: inline-block;
+    height: 32px;
+    line-height: 32px;
+    border: 1px solid #a9a9a9;
+    margin: 8px 0 0 0;
+  }
+
+  .searchName {
+    text-align: center;
+    border-left: none;
+    cursor: pointer;
+    padding: 0 12px;
+    font-size: 16px;
+  }
+  .itemList {
+    position: absolute;
+    background: #fff;
+    width: 162px;
+    max-height: 150px;
+    border: 1px solid #a9a9a9;
+    left: 150px;
+    top: 42px;
+    z-index: 2;
+    overflow-y: auto;
+  }
+  .itemList {
+    width: calc(100% - 131px);
+  }
+  .mealNameItem {
+    height: 30px;
+    line-height: 30px;
+    font-size: 14px;
+    cursor: pointer;
+  }
+  .mealNameItem:hover {
+    background: #f5f7fa;
+  }
+  // .selectItemName {
+  //   padding-left: 4px;
+  //   display: inline-block;
+  //   margin-top: 8px;
+  //   // width: calc(100% - 160px);s
+  //   line-height: 24px;
+  //   overflow: hidden;
+  //   word-wrap: break-word;
+  //   word-break: break-all;
+  // }
+  .previewInfo {
+    padding-left: 4px;
+    display: inline-block;
+    margin-top: 8px;
+    // width: calc(100% - 160px);s
+    line-height: 24px;
+    overflow: hidden;
+    word-wrap: break-word;
+    word-break: break-all;
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .sumbit {
+    position: absolute;
+    display: inline-block;
+    width: 80px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #a9a9a9;
+    text-align: center;
+    right: 100px;
+  }
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
+    }
+  }
+}
+body {
+  .el-select-dropdown {
+    /deep/ .el-select-dropdown__item {
+      span {
+        color: #333;
+      }
+    }
+    ul {
+      max-width: 300px;
+    }
+
+    /deep/ .el-scrollbar {
+      border: 1px solid #dcdfe6;
+    }
+    /deep/ .popper__arrow {
+      border-bottom-color: #a5a5a5 !important;
+    }
+  }
+  /deep/ .el-popper[x-placement^='bottom'] {
+    margin-top: 8px !important;
+  }
+}
+</style>

+ 447 - 0
src/components/icss/tcmdrome/tcmdrome.vue

@@ -0,0 +1,447 @@
+<template>
+  <div>
+    <crumbs title="中医证候关联维护" style="min-width: 980px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input
+            type="file"
+            name="uploadfile "
+            id="upFile"
+            @change="uploadFile($event)"
+          />
+                      <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item label="医院中医证候名称:">
+          <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="标准中医证候名称:">
+          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item class="dododo">
+          <el-button size="mini" @click="filterDatas">检索</el-button>
+          <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="contents">
+      <el-table :data="list" border style="width: 100%">
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="hisName" label="医院中医证候名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueCode" label="中医证候代码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准中医证候名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <el-pagination
+          :current-page.sync="currentPage"
+          @current-change="currentChange"
+          background
+          :page-size="pageSize"
+          :page-sizes="pageSizeArr"
+          @size-change="handleSizeChange"
+          :layout="pageLayout"
+          :total="total"
+        ></el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'Tcmdrome',
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      fileName: '',
+      formData: {},
+      headers: {},
+      uploadInfo: '导入'
+    };
+  },
+  created() {
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
+    //返回时避免参数未赋值就获取列表
+    setTimeout(()=> {
+      this.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getTcmsyndromePage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: ''
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddTcmdrome', params: pam });
+    },
+    // 修改诊断关联-跳转至编辑页面
+    modifyRelation(row) {
+      const item = Object.assign({}, row);
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({
+        name: 'AddTcmdrome',
+        params: Object.assign(pam, { isEdit: true, data: item })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        confirmButtonText: '删除',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'cancelBtn',
+        confirmButtonClass: 'confirmC',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteTcmdromeRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$confirm('确定要导出全部中医证候关联数据吗?', '', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'leftbtn',
+        customClass: 'exportBox6',
+        title: '提示',
+        type: 'warning'
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     // instance.confirmButtonText = '导出中...';
+        //     done()
+        //     api.exportDeptRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '科室关联数据.xls');
+        //           // done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api.exportTcmdromeRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '中医证候关联数据.xls');
+            }
+          });
+        })
+        .catch(() => {});
+    },
+
+    // 导入模板
+    exportModule() {
+      api.exportTcmdromeModule().then(res => {
+        if (res.status === 200) {
+          setTimeout(() => {
+            utils.downloadExportedData(res.data, '中医证候导入模板.xls');
+          }, 1500);
+        }
+      });
+    },
+
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      // this.fileName = e.target.files[0].name; // 表单同步显示
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      this.uploadInfo = '导入中...';
+      api.importTcmdromeRecord(formData, header).then(res => {
+        // console.log('导入文件结果', '===================', res);
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
+          this.$confirm(`导入成功`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'success'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else {
+          this.$confirm(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        }
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    }
+  }
+};
+</script>
+
+
+<style lang="less">
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+  /deep/.el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.exportConfirm {
+  .cancelSure {
+    display: none;
+  }
+}
+</style>

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

@@ -0,0 +1,802 @@
+<style lang="less" scoped>
+  // @import "../../less/admin.less";
+  #AddRuleContent {
+    width: 100%;
+    min-width: 1000px;
+    padding: 20px;
+    padding-top: 50px;
+    padding-bottom: 0;
+    box-sizing: border-box;
+    .table_form {
+      width: 100%;
+      box-sizing: border-box;
+      background: #fff;
+      padding: 20px;
+      padding-bottom: 0;
+      display: flex;
+      flex-wrap: wrap;
+      .table_cell {
+        flex: 1;
+        min-width: 25%;
+      }
+    }
+    /deep/ .el-input--mini .el-input__inner,
+    .el-select {
+      width: 100%;
+      font-size: 14px;
+    }
+    .tip_text {
+      // margin-top: -8px;
+      font-size: 12px;
+      color: red;
+      line-height: 16px;
+      // transform: scale(.8, .8);
+    }
+    .form_btn {
+      width: 100%;
+      background: #fff;
+      padding-bottom: 20px;
+      text-align: center;
+    }
+    /deep/ .el-form-item.is-success .el-input__inner,
+    .el-form-item.is-success .el-textarea__inner {
+      border-color: #c9c9c9 !important;
+    }
+    /deep/ .el-form-item.is-success .el-textarea__inner {
+      border-color: #c9c9c9 !important;
+    }
+    /deep/ .el-form-item.is-success .el-textarea__inner {
+      border-color: #c9c9c9 !important;
+    }
+    .my_error {
+      position: absolute;
+      top: 0;
+      left: -16px;
+      img {
+        width: 12px;
+        height: 12px;
+        cursor: pointer;
+      }
+    }
+  }
+</style>
+<style lang="less">
+  .popper_class {
+    // background: #fff !important;
+    border: 1px solid #ffa0a0 !important;
+    color: #999999 !important;
+    padding: 3px 50px 3px 10px !important;
+    margin-left: -10px;
+  }
+  .popper__arrow {
+    border-top-color: #ffa0a0 !important;
+  }
+</style>
+<template>
+  <div>
+    <crumbs
+            :title="title"
+            :param="$route.params"
+            linkTo="ZskRuleManager"
+    ></crumbs>
+    <div id="AddRuleContent">
+      <el-form size="mini" :model="form" ref="ruleForm">
+        <div class="table_form">
+          <div class="table_cell">
+            <!-- 规则名称 -->
+            <el-form-item
+                    label-width="130px"
+                    label="规则名称:"
+                    :rules="rules.parDescription"
+                    prop="parDescription"
+            >
+              <el-input
+                      style="width: 100%"
+                      v-model.trim="form.parDescription"
+              />
+            </el-form-item>
+          </div>
+
+          <div class="table_cell">
+            <!-- 规则类型 -->
+            <el-form-item
+                    label-width="130px"
+                    label="规则类型:"
+                    :rules="rules.parRuleType"
+                    prop="parRuleType"
+            >
+              <el-select
+                      v-model="form.parRuleType"
+                      placeholder="请选择"
+                      @change="ruleTypeChange"
+              >
+                <el-option
+                        v-for="item in ruleTypeList"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id"
+                >
+                </el-option>
+              </el-select>
+              <template slot="error" slot-scope="scope">
+                <div class="my_error">
+                  <el-tooltip
+                          class="item"
+                          effect="light"
+                          :content="scope.error"
+                          placement="top-start"
+                          popper-class="popper_class"
+                  >
+                    <img src="../../images/exclamationpoint.png" alt="" />
+                  </el-tooltip>
+                </div>
+              </template>
+              <div class="tip_text">
+                注:更改规则类型,将会清空已填写的规则内容~
+              </div>
+            </el-form-item>
+          </div>
+          <div class="table_cell">
+            <!-- 规则术语类型: -->
+            <el-form-item
+                    label-width="130px"
+                    label="规则术语类型:"
+                    :rules="rules.parLenCode"
+                    prop="parLenCode"
+            >
+              <template slot="error" slot-scope="scope">
+                <div class="my_error">
+                  <el-tooltip
+                          class="item"
+                          effect="light"
+                          :content="scope.error"
+                          placement="top-start"
+                          popper-class="popper_class"
+                  >
+                    <img src="../../images/exclamationpoint.png" alt="" />
+                  </el-tooltip>
+                </div>
+              </template>
+              <el-select
+                      v-model="form.parLenCode"
+                      placeholder="请选择"
+                      @change="ruleTermChange"
+              >
+                <el-option
+                        v-for="item in ruleTermTypeList"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.code"
+                >
+                </el-option>
+              </el-select>
+              <div class="tip_text">
+                注:更改规则术语类型,将会清空已填写的规则内容~
+              </div>
+            </el-form-item>
+          </div>
+          <div class="table_cell">
+            <el-form-item
+                    label-width="130px"
+                    label="医学标准术语:"
+                    :style="{ height: '100%' }"
+                    :rules="rules.parConceptId"
+                    prop="parConceptId"
+            >
+              <el-select
+                      clearable
+                      filterable
+                      remote
+                      :remote-method="searchConcept"
+                      v-model.trim="form.parConceptId"
+                      @change="parConceptIdChange"
+              >
+                <el-option
+                        v-for="item in conceptList"
+                        :key="item.conceptId"
+                        :label="item.conceptName"
+                        :value="item.conceptId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </div>
+          <div class="table_cell" v-if="showHasSub" style="max-width: 25%">
+            <el-form-item
+                    label-width="130px"
+                    label="有无子条件:"
+                    :rules="rules.parHasSub"
+                    prop="parHasSub"
+            >
+              <el-select
+                      v-model="form.parHasSub"
+                      placeholder="请选择"
+                      @change="hasSubChange"
+              >
+                <el-option label="有" :value="1"></el-option>
+                <el-option label="无" :value="0"></el-option>
+              </el-select>
+            </el-form-item>
+          </div>
+          <div
+                  class="table_cell"
+                  style="flex: 3; max-width: 50%"
+                  v-if="showMsg"
+          >
+            <el-form-item
+                    label-width="130px"
+                    label="附加信息:"
+                    :rules="rules.parMsg"
+                    prop="parMsg"
+            >
+              <el-input
+                      type="textarea"
+                      :rows="1"
+                      placeholder="请输入附加信息"
+                      v-model.trim="form.parMsg"
+              ></el-input>
+            </el-form-item>
+          </div>
+        </div>
+        <!-- 表格 -->
+        <AddNewRuleTable
+                ref="tableView"
+                v-if="form.parHasSub && tableShow"
+                :klRuleByIdSub="form.klRuleByIdSub"
+                :maxNum="subRuleMaxNum"
+                @subTypeChange="subTypeChange"
+                @searchConcept="searchConcept"
+                @addGroup="addGroup"
+                @delGroup="delGroup"
+                @delGroupChild="delGroupChild"
+                @setFormData="setFormData"
+                @editKlRuleByIdSub="editKlRuleByIdSub"
+                @clearValidate="clearValidate"
+                @childClearConcept="childClearConcept"
+                @childClearNumText="childClearNumText"
+                @ChildDataTypeChange="ChildDataTypeChange"
+                @childSubCodeChange="childSubCodeChange"
+        />
+        <el-form-item>
+          <div class="form_btn">
+            <el-button
+                    type="primary"
+                    size="medium "
+                    @click="submitForm('ruleForm')"
+            >确定</el-button
+            >
+          </div>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+<script type="text/javascript">
+    import api from "@api/knowledgeLib.js";
+    import { formRules } from "./rules";
+    import AddNewRuleTable from "./AddNewRuleTable";
+    export default {
+        name: "AddRule",
+        data() {
+            return {
+                title: "规则维护-添加规则",
+                ruleTypeList: [], //规则类型列表  1
+                ruleTermTypeList: [], //规则术语类型列表  2
+                conceptList: [], //医学标准术语列表 3
+                baseTypeList: [], //基础规则类型列表  4
+                baseTermTypeList: [], //基础规则术语类型 5
+                subRuleMaxNum: null, //规则内容中规则的限制个数
+                isCopy: false,
+                parId: null,
+                msgDict: "", //显示附加信息的类型
+                firstPlace: null,
+                tableShow: true,
+                form: {
+                    parDescription: "",
+                    parRuleType: "",
+                    parConceptId: "",
+                    parlibName: "",
+                    parLenName: "",
+                    parHasSub: undefined,
+                    parLenCode: "",
+                    parMsg: "",
+                    klRuleByIdSub: []
+                },
+                rules: formRules
+            };
+        },
+        created() {
+            this.getTypeList();
+            this.setDict();
+            const param = this.$route.params;
+            let info = param.data;
+            if (info) {
+                this.parId = info.parId;
+                this.isCopy = param.copy;
+                this.title = "规则维护-" + (this.isCopy ? "复制" : "修改") + "规则";
+                this.form = JSON.parse(JSON.stringify(info));
+                // 编辑初始化选择框
+                this.initEdidData();
+            }
+        },
+        methods: {
+            clearValidate(data) {
+                this.$refs.ruleForm.clearValidate(data);
+            },
+            // 编辑初始化
+            async initEdidData() {
+                // 规则术语类型初始化
+                const newruleTermTypeList = await this.ruleTypeList.find(
+                    (it) => it.id == this.form.parRuleType
+                );
+                this.ruleTermTypeList = await newruleTermTypeList.subMenuList;
+                // 基础规则类型初始化
+                const obj = await this.ruleTermTypeList.find(
+                    (it1) => it1.code == this.form.parLenCode
+                );
+                this.baseTypeList = obj.subMenuList;
+                this.subRuleMaxNum = obj.number;
+
+                this.conceptList = [
+                    { conceptName: this.form.parlibName, conceptId: this.form.parConceptId }
+                ];
+                if (this.form.parConceptId && this.checkFirstPlace && this.conceptList) {
+                    this.firstPlace = this.conceptList.find(
+                        (it) => it.conceptId === this.form.parConceptId
+                    );
+                    if (this.firstPlace) {
+                        this.firstPlace["checkedType"] = this.ruleTermCodeStr;
+                    }
+                } else if (!this.form.parConceptId) {
+                    this.setInitGroupData();
+                    this.firstPlace = null;
+                } else {
+                    this.firstPlace = null;
+                }
+                await this.form.klRuleByIdSub.forEach((item, i, arr) => {
+                    item.groupId = "groupId" + item.groupType;
+                    item.groupChildId = "child" + item.subId;
+                    //TODO => 赋值时一定要注意set更新页面
+                    this.$set(item, "baseTypes", [...this.baseTypeList]);
+                    this.$set(
+                        item,
+                        "baseTermTypeList",
+                        item.baseTypes.find((it2) => it2.type === item.subType).subMenuList
+                    );
+                    this.$set(item, "conceptList", [
+                        {
+                            conceptName: item.subLibName || item.subConceptName,
+                            conceptId: item.subConceptId
+                        }
+                    ]);
+                    if (item.subMaxOperator || item.subMinOperator) {
+                        item.dataType = "1";
+                    } else if (item.subEqValue) {
+                        item.dataType = "2";
+                    }
+
+                    // disable
+                    if (this.form.parHasSub && this.firstPlace) {
+                        if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
+                            this.$set(item, "disabled", false);
+                        } else {
+                            this.$set(item, "disabled", true);
+                        }
+                    }
+                });
+            },
+            // 提交
+            submitForm(formName) {
+                console.log(this.form);
+                this.$refs[formName].validate((valid) => {
+                    if (valid) {
+                        let params = JSON.parse(JSON.stringify(this.form));
+                        params.klRuleInfoSaveSub = params.klRuleByIdSub;
+                        delete params.klRuleByIdSub;
+                        params.klRuleInfoSaveSub.forEach((item, i, arr) => {
+                            if (i === 0) {
+                                item.groupType = 1;
+                            } else {
+                                if (item.groupId == arr[i - 1].groupId) {
+                                    item.groupType = arr[i - 1].groupType;
+                                } else {
+                                    item.groupType = arr[i - 1].groupType + 1;
+                                }
+                            }
+                        });
+                        params.klRuleInfoSaveSub.forEach((ite) => {
+                            delete ite.groupId;
+                            delete ite.groupChildId;
+                            delete ite.rowIndex;
+                            delete ite.baseTypes;
+                            delete ite.baseTermTypeList;
+                            delete ite.conceptList;
+                        });
+                        if (this.parId) {
+                            params.parId = this.isCopy ? undefined : this.parId;
+                            params.parStatus = this.isCopy ? 1 : this.form.parStatus;
+                        }
+                        this.saveRule(params);
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            // 子集修改父级的数组
+            setFormData(index, data) {
+                this.$set(this.form.klRuleByIdSub[index], "conceptList", data);
+            },
+            // table_form 规则类型选中
+            ruleTypeChange(val) {
+                this.form.parLenCode = "";
+                this.form.parMsg = "";
+                const obj = this.ruleTypeList.find((it) => it.id === val);
+                this.ruleTermTypeList = obj.subMenuList;
+                this.subRuleMaxNum = undefined;
+                this.setInitGroupData();
+            },
+            // table_form 规则术语类型选中
+            ruleTermChange(val) {
+                this.form.parMsg = "";
+                const obj = this.ruleTermTypeList.find((it) => it.code === val);
+                this.form.parLenName = obj.name;
+                this.baseTypeList = obj.subMenuList;
+                this.subRuleMaxNum = obj.number;
+                this.form.parHasSub = obj.subMenuList.length ? 1 : 0;
+                this.setInitGroupData();
+            },
+            // 医学标准术语
+            parConceptIdChange(val) {
+                this.$nextTick(() => {
+                    if (val && this.checkFirstPlace && this.conceptList) {
+                        this.firstPlace = this.conceptList.find((it) => it.conceptId === val);
+                        if (this.firstPlace) {
+                            this.firstPlace["checkedType"] = this.ruleTermCodeStr;
+                        }
+                    } else if (!val) {
+                        this.setInitGroupData();
+                        this.firstPlace = null;
+                    } else {
+                        this.firstPlace = null;
+                    }
+                    if (this.form.parHasSub && this.firstPlace) {
+                        const dict =
+                            localStorage
+                                .getItem("zskDicts")
+                                .match(new RegExp(this.firstPlace.checkedType + "-\\d+", "g")) ||
+                            [];
+                        const types = dict[0].split("-");
+                        let obj = this.form.klRuleByIdSub;
+                        obj.forEach((item, i, arr) => {
+                            if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
+                                this.$set(item, "disabled", false);
+                            } else {
+                                this.$set(item, "disabled", true);
+                                this.$set(item, "subType", parseInt(types[2]));
+                                const subobj = this.baseTypeList.find(
+                                    (it) => it.type == types[2]
+                                );
+                                this.$set(item, "baseTermTypeList", subobj.subMenuList);
+                                this.$set(item, "subLenCode", types[1]);
+                                this.$set(item, "subDescription", this.firstPlace.conceptName);
+                                this.$set(item, "subConceptId", this.firstPlace.conceptId);
+                                this.$set(item, "subConceptName", this.firstPlace.conceptName);
+                                this.$set(item, "conceptList", [this.firstPlace]);
+                            }
+                        });
+                        this.$set(this.form, "klRuleByIdSub", obj);
+                    }
+                });
+            },
+            // 初始化表格
+            setInitGroupData(init) {
+                this.tableShow = false;
+                const date = new Date().valueOf();
+                this.$nextTick(() => {
+                    if (this.form.parHasSub && this.form.parHasSub != 0) {
+                        this.$set(this.form, "klRuleByIdSub", [
+                            {
+                                groupId: date,
+                                groupChildId: "child" + new Date().valueOf(),
+                                baseTypes: this.baseTypeList,
+                                baseTermTypeList: [],
+                                conceptList: [],
+                                subDescription: "",
+                                parRuleType: "",
+                                subConceptId: "",
+                                subType: "",
+                                subMaxOperator: "",
+                                subMaxUnit: "",
+                                subMaxValue: "",
+                                subMinOperator: "",
+                                subMinUnit: "",
+                                subMinValue: "",
+                                subEqValue: "",
+                                subLenCode: "",
+                                dataType: ""
+                            }
+                        ]);
+                    } else {
+                        this.$set(this.form, "klRuleByIdSub", []);
+                    }
+
+                    if (!init) {
+                        this.form.parConceptId = ""; //医学标准术语清空
+                        this.conceptList = []; //下拉列表清空
+                        this.firstPlace = null;
+                    }
+                    this.tableShow = true;
+                });
+            },
+            // 有无子条件切换
+            hasSubChange(val) {
+                if (val) {
+                    this.setInitGroupData(true);
+                } else {
+                    this.form.klRuleByIdSub = [];
+                }
+            },
+            // 基础规则类型切换
+            subTypeChange(val, index) {
+                // index
+                const obj = this.baseTypeList.find((it) => it.type === val);
+
+                this.$set(
+                    this.form.klRuleByIdSub[index],
+                    "baseTermTypeList",
+                    obj.subMenuList
+                );
+                this.$set(this.form.klRuleByIdSub[index], "subLenCode", "");
+                this.$set(this.form.klRuleByIdSub[index], "dataType", "");
+
+                this.clearConcept(index);
+                this.clearNumText(index);
+            },
+            clearConcept(index) {
+                this.$set(this.form.klRuleByIdSub[index], "subConceptId", "");
+                this.conceptList = [];
+            },
+            clearNumText(index) {
+                this.$set(this.form.klRuleByIdSub[index], "subMaxOperator", "");
+                this.$set(this.form.klRuleByIdSub[index], "subMaxValue", "");
+                this.$set(this.form.klRuleByIdSub[index], "subMaxUnit", "");
+                this.$set(this.form.klRuleByIdSub[index], "subMinOperator", "");
+                this.$set(this.form.klRuleByIdSub[index], "subMinValue", "");
+                this.$set(this.form.klRuleByIdSub[index], "subMinUnit", "");
+                this.$set(this.form.klRuleByIdSub[index], "subEqValue", "");
+                this.$set(this.form.klRuleByIdSub[index], "subEqOperator", "");
+            },
+            editKlRuleByIdSub(data) {
+                this.$set(this.form, "klRuleByIdSub", data);
+                // this.form.klRuleByIdSub = data;
+            },
+            // 添加分组 || 规则
+            addGroup(date, arg = { index: null, groupId: null }) {
+                /**
+                 * @params
+                 *    date:存在则添加规则 不存在则添加分组
+                 *    arg:{index:添加规则用索引,groupId:添加分组用确切id}
+                 */
+                !date && (date = new Date().valueOf());
+                const obj = {
+                    groupId: date,
+                    groupChildId: "child" + new Date().valueOf(),
+                    baseTypes: this.baseTypeList,
+                    baseTermTypeList: [],
+                    conceptList: [],
+                    subDescription: "",
+                    parRuleType: "",
+                    subConceptId: "",
+                    subType: "",
+                    subMaxOperator: "",
+                    subMaxUnit: "",
+                    subMaxValue: "",
+                    subMinOperator: "",
+                    subMinUnit: "",
+                    subMinValue: "",
+                    subEqValue: "",
+                    subLenCode: "",
+                    dataType: ""
+                };
+                if (typeof arg.index == "number") {
+                    // 添加规则 直接在当前位置之后添加
+                    this.form.klRuleByIdSub.splice(arg.index + 1, 0, obj);
+                } else {
+                    // 添加分组 在列表中相同groupId之后添加
+
+                    // 添加分组时判断是否需要加disabled和添加默认值
+                    if (this.form.parHasSub && this.firstPlace) {
+                        obj.disabled = true;
+                        const dict =
+                            localStorage
+                                .getItem("zskDicts")
+                                .match(new RegExp(this.firstPlace.checkedType + "-\\d+", "g")) ||
+                            [];
+                        const types = dict[0].split("-");
+                        this.$set(obj, "disabled", true);
+                        this.$set(obj, "subType", parseInt(types[2]));
+                        const subobj = this.baseTypeList.find((it) => it.type == types[2]);
+                        this.$set(obj, "baseTermTypeList", subobj.subMenuList);
+                        this.$set(obj, "subLenCode", types[1]);
+                        this.$set(obj, "subDescription", this.firstPlace.conceptName);
+                        this.$set(obj, "subConceptId", this.firstPlace.conceptId);
+                        this.$set(obj, "subConceptName", this.firstPlace.conceptName);
+                        this.$set(obj, "conceptList", [this.firstPlace]);
+                    }
+                    var i = -1;
+                    this.form.klRuleByIdSub.forEach((item, inx) => {
+                        if (item.groupId === arg.groupId) {
+                            i = inx;
+                        }
+                    });
+                    this.form.klRuleByIdSub.splice(i + 1, 0, obj);
+                }
+                this.$nextTick(() => {
+                    this.$refs.tableView.scrollFun();
+
+                });
+            },
+            // 删除分组
+            delGroup(groupId) {
+                const list = this.form.klRuleByIdSub.filter(
+                    (item) => item.groupId != groupId
+                );
+                this.form.klRuleByIdSub = list;
+            },
+            // 删除规则
+            delGroupChild(groupChildId) {
+                const newGroupList = this.form.klRuleByIdSub.filter(
+                    (item) => item.groupChildId != groupChildId
+                );
+                this.form.klRuleByIdSub = newGroupList;
+            },
+            setDict() {
+                this.dict = localStorage.getItem("zskDicts");
+                this.msgDict = localStorage.getItem("zskMsgDict");
+                this.subDict = localStorage.getItem("zskSubDict");
+            },
+            showConfirmDialog(msg, resolve) {
+                this.$alert(msg, "提示", {
+                    confirmButtonText: "确定",
+                    type: "warning"
+                })
+                    .then(() => {
+                        resolve();
+                    })
+                    .catch(() => {});
+            },
+            searchConcept(val) {
+                const param = {
+                    excludedConceptIds: [this.form.parRuleType],
+                    libType: this.form.parLenCode,
+                    name: val
+                };
+                api
+                    .searchConcept(param)
+                    .then((res) => {
+                        if (res.data.code == "0") {
+                            const data = res.data.data;
+                            this.conceptList = data;
+                        }
+                    })
+                    .catch((error) => {
+                        console.log(error);
+                    });
+            },
+            getTypeList() {
+                this.ruleTypeList = JSON.parse(localStorage.getItem("zskTypesList"));
+            },
+            saveRule(params) {
+                api.saveRule(params).then((res) => {
+                    if (res.data.code == 0) {
+                        this.$message({
+                            message: "操作成功",
+                            type: "success"
+                        });
+                        this.$router.push({
+                            name: "ZskRuleManager",
+                            params: Object.assign({}, this.$route.params, { currentPage: 1 })
+                        });
+                    } else {
+                        this.$message({
+                            message: res.data.msg,
+                            type: "warning"
+                        });
+                    }
+                });
+            },
+            /**
+             * 子组件调用方法
+             */
+            childClearConcept(index) {
+                this.$set(this.form.klRuleByIdSub[index], "subConceptId", "");
+                this.$set(this.form.klRuleByIdSub[index], "conceptList", []);
+            },
+            childClearNumText(index) {
+                let obj = JSON.parse(JSON.stringify(this.form.klRuleByIdSub));
+
+                obj[index].subMaxOperator = "";
+                obj[index].subMaxValue = "";
+                obj[index].subMaxUnit = "";
+                obj[index].subMinOperator = "";
+                obj[index].subMinValue = "";
+                obj[index].subMinUnit = "";
+                obj[index].subEqValue = "";
+                // this.$set(obj[index], "subEqValue", "");
+                obj[index].subEqOperator = "";
+                // this.klRuleByIdSub = obj;
+                // this.$emit("editKlRuleByIdSub", obj);
+                this.editKlRuleByIdSub(obj);
+            },
+            ChildDataTypeChange(val, index) {
+                this.form.klRuleByIdSub[index].subEqOperator = val === "2" ? "=" : "";
+                this.$set(
+                    this.form.klRuleByIdSub[index],
+                    "subEqOperator",
+                    val === "2" ? "=" : ""
+                );
+
+                this.childClearNumText(index);
+                // TODO 新增的内容追踪不到
+                this.form.klRuleByIdSub.forEach((item, i) => {
+                    if (index === i) {
+                        this.$set(item, "dataType", val);
+                    }
+                });
+            },
+            childSubCodeChange(val, index, numTypes) {
+                if ((numTypes + ",").indexOf(val + ",") > -1) {
+                    this.$set(this.form.klRuleByIdSub[index], "dataType", "1");
+                } else {
+                    this.$set(this.form.klRuleByIdSub[index], "dataType", "");
+                }
+                this.childClearConcept(index);
+                this.childClearNumText(index);
+            }
+        },
+        watch: {
+            "form.klRuleByIdSub": {
+                handler(val) {
+                    this.form.klRuleByIdSub.forEach((item, i, arr) => {
+                        if (i == 0) {
+                            item.rowIndex = 1;
+                        } else if (item.groupId == arr[i - 1].groupId) {
+                            item.rowIndex = arr[i - 1].rowIndex;
+                        } else {
+                            item.rowIndex = arr[i - 1].rowIndex + 1;
+                        }
+                    });
+                },
+                deep: true
+            }
+        },
+        computed: {
+            disable: function () {
+                return Object.keys(this.firstPlace || {}).length > 0;
+            },
+            ruleTermCodeStr: function () {
+                const str = this.form.parRuleType + "-" + this.form.parLenCode;
+                if (str.length <= 1) {
+                    return "";
+                }
+                return str;
+            },
+            showMsg: function () {
+                return (
+                    this.ruleTermCodeStr.length > 2 &&
+                    this.msgDict.indexOf(this.ruleTermCodeStr) > -1
+                );
+            },
+            showHasSub() {
+                if (this.ruleTermCodeStr.length > 2) {
+                    return this.subDict.indexOf(this.ruleTermCodeStr) != -1;
+                }
+                return false;
+            },
+            checkFirstPlace: function () {
+                return this.dict.indexOf(this.ruleTermCodeStr) > -1;
+            }
+        },
+        components: { AddNewRuleTable }
+    };
+</script>

+ 862 - 0
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -0,0 +1,862 @@
+<style lang="less" scoped>
+  #AddNewRuleTable {
+    width: 100%;
+    background: #fff;
+    margin-top: 10px;
+    padding: 20px;
+    box-sizing: border-box;
+    /deep/ .el-table .el-input--mini .el-input__inner,
+    .el-select {
+      width: 100%;
+      font-size: 12px;
+    }
+    .btn_box {
+      width: 100%;
+      height: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: space-around;
+      .btn_div {
+        flex: 1;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+      }
+      img {
+        width: 16px;
+        height: 16px;
+        cursor: pointer;
+      }
+    }
+    .inp_box {
+      // width: 100px;
+      height: 100%;
+      margin: 0 auto;
+    }
+    /deep/ .el-form-item__error {
+      // position: absolute;
+      top: 28px;
+    }
+    .type_content {
+      /deep/ .el-form-item--mini.el-form-item,
+      .el-form-item--small.el-form-item {
+        margin: 0;
+        width: 100%;
+      }
+      display: flex;
+      .type_content_item1 {
+        /deep/ .el-form-item__content {
+          padding-bottom: 8px;
+        }
+        .row_box {
+          .el-col {
+            /deep/ .el-form-item__content {
+              position: static;
+            }
+            /deep/ .el-form-item__error {
+              position: absolute;
+              width: 260px;
+              left: 72px;
+              white-space: normal;
+            }
+          }
+        }
+      }
+      /deep/ .el-input.is-disabled .el-input__inner {
+        color: #888;
+      }
+    }
+    .custom_table_header {
+      vertical-align: middle;
+      &::before {
+        content: "*";
+        color: red;
+        font-size: 12px;
+        margin-right: 4px;
+      }
+    }
+    /deep/ .el-table th {
+      background: transparent;
+    }
+    /deep/ .el-form-item__content {
+      padding-bottom: 14px;
+    }
+    .table_cell_cls {
+      vertical-align: top;
+    }
+    /deep/ .el-form-item__label {
+      font-size: 12px;
+    }
+    h4 {
+      font-size: 14px;
+      font-weight: 400;
+    }
+    /deep/ .el-select {
+      font-size: 12px;
+    }
+    /deep/ .el-table--mini,
+    .el-table--small,
+    .el-table__expand-icon {
+      font-size: 14px;
+    }
+  }
+</style>
+
+<template>
+  <!-- :prop="`klRuleByIdSub[${scope.$index}].subDescription`" -->
+  <div id="AddNewRuleTable">
+    <h4 style="margin-bottom: 24px">规则内容:</h4>
+    <!-- 隔行换色  :row-style="rowStyle" -->
+    <el-table
+            border
+            :data="klRuleByIdSub"
+            size="mini"
+            style="min-height: 200px"
+            height="calc(100vh - 393px)"
+            :header-row-style="{ background: '#E3EAF4' }"
+            :cell-style="cellStyle"
+            :span-method="ObjectSpanMethod"
+            ref="table"
+            row-key="groupChildId"
+    >
+      <el-table-column width="80px" label="组" prop="groupType" fixed="left">
+        <template slot-scope="scope">
+          <div class="btn_box">
+            <div class="btn_div">
+              <img
+                      @click="addGroup(scope)"
+                      src="../../images/add-new-rule-sub.png"
+                      alt=""
+              />
+            </div>
+            <div class="btn_div" v-if="!isLastDate(scope.row.groupId)">
+              <img
+                      @click="$emit('delGroup', scope.row.groupId)"
+                      src="../../images/add-new-rule-del.png"
+                      alt=""
+              />
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+              width="80px"
+              v-if="maxNum && maxNum > 1"
+              fixed="left"
+              label="基础规则"
+              prop="groupType"
+      >
+        <template slot-scope="scope">
+          <div class="btn_box">
+            <div class="btn_div" v-if="!isMax(scope.row.groupId)">
+              <img
+                      @click="addChildGroup(scope)"
+                      src="../../images/add-new-rule-sub.png"
+                      alt=""
+              />
+            </div>
+            <div
+                    class="btn_div"
+                    v-if="klRuleByIdSub.length > 1 && !scope.row.disabled"
+            >
+              <img
+                      @click="$emit('delGroupChild', scope.row.groupChildId)"
+                      src="../../images/add-new-rule-del.png"
+                      alt=""
+              />
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column width="170px" prop="subDescription" label="基础规则名称">
+        <template slot="header" slot-scope="scope">
+          <div class="custom_table_header">基础规则名称</div>
+        </template>
+        <template slot-scope="scope">
+          <el-form-item
+                  class="inp_box"
+                  :prop="`klRuleByIdSub[${scope.$index}].subDescription`"
+                  :rules="rules.subDescription"
+          >
+            <el-input
+                    type="text"
+                    :disabled="scope.row.disabled"
+                    v-model="scope.row.subDescription"
+                    clearable
+                    placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column width="170px" prop="subType" label="基础规则类型">
+        <template slot="header" slot-scope="scope">
+          <div class="custom_table_header">基础规则类型</div>
+        </template>
+        <template slot-scope="scope">
+          <el-form-item
+                  class="inp_box"
+                  :prop="`klRuleByIdSub[${scope.$index}].subType`"
+                  :rules="rules.subType"
+          >
+            <el-select
+                    v-model="scope.row.subType"
+                    :disabled="scope.row.disabled"
+                    placeholder="请选择"
+                    @change="subTypeChange($event, scope.$index)"
+                    @focus="
+                setTheRef($event, `klRuleByIdSub[${scope.$index}].subType`)
+              "
+                    :ref="`klRuleByIdSub[${scope.$index}].subType`"
+            >
+              <el-option
+                      v-for="item in scope.row.baseTypes"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.type"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column width="170px" prop="subLenCode" label="基础规则术语类型">
+        <template slot="header" slot-scope="scope">
+          <div class="custom_table_header">基础规则术语类型</div>
+        </template>
+        <template slot-scope="scope">
+          <el-form-item
+                  class="inp_box"
+                  :prop="`klRuleByIdSub[${scope.$index}].subLenCode`"
+                  :rules="rules.subLenCode"
+          >
+            <el-select
+                    :disabled="scope.row.disabled"
+                    v-model="scope.row.subLenCode"
+                    placeholder="请选择"
+                    :ref="`klRuleByIdSub[${scope.$index}].subLenCode`"
+                    @change="subCodeChange($event, scope.$index)"
+                    @focus="
+                setTheRef($event, `klRuleByIdSub[${scope.$index}].subLenCode`)
+              "
+            >
+              <el-option
+                      v-for="item in scope.row.baseTermTypeList"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.code"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column width="170px" label="医学标准术语" prop="subConceptId">
+        <template slot="header" slot-scope="scope">
+          <div class="custom_table_header">医学标准术语</div>
+        </template>
+        <template slot-scope="scope">
+          <el-form-item
+                  class="inp_box"
+                  :prop="`klRuleByIdSub[${scope.$index}].subConceptId`"
+                  :rules="rules.subConceptId"
+          >
+            <el-select
+                    clearable
+                    remote
+                    filterable
+                    :disabled="scope.row.disabled"
+                    @focus="subConceptIdfocus(scope.$index)"
+                    :remote-method="searchConcept"
+                    v-model.trim="scope.row.subConceptId"
+                    :ref="`klRuleByIdSub[${scope.$index}].subConceptId`"
+            >
+              <el-option
+                      v-for="item in scope.row.conceptList"
+                      :key="item.conceptId"
+                      :label="item.conceptName"
+                      :value="item.conceptId"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column label="规则具体内容" min-width="900px" prop="">
+        <template slot-scope="scope">
+          <div class="type_content">
+            <el-form-item
+                    style="width: 100px; margin-right: 20px"
+                    :prop="`klRuleByIdSub[${scope.$index}].dataType`"
+                    :rules="rules.dataType"
+                    v-if="scope.row.subType === 2 && showDataType(scope.$index)"
+            >
+              <el-select
+                      v-model="scope.row.dataType"
+                      placeholder="选择类型"
+                      @change="dataTypeChange($event, scope.$index)"
+                      @focus="
+                  setTheRef($event, `klRuleByIdSub[${scope.$index}].dataType`)
+                "
+                      :ref="`klRuleByIdSub[${scope.$index}].dataType`"
+              >
+                <el-option label="数值类型" value="1"> </el-option>
+                <el-option label="文本类型" value="2"> </el-option>
+              </el-select>
+            </el-form-item>
+            <!-- v-if="klRuleByIdSub[scope.$index].dataType === '1'" -->
+            <el-form-item
+                    class="type_content_item type_content_item1"
+                    style="flex: 2; margin: 0 10px"
+                    label="最大值:"
+                    v-if="scope.row.dataType === '1'"
+            >
+              <!-- <div> -->
+              <el-row :gutter="10" class="row_box">
+                <el-col :span="6">
+                  <el-form-item
+                          :prop="`klRuleByIdSub[${scope.$index}].subMaxOperator`"
+                          :rules="[
+                      {
+                        validator: (rule, value, callback) => {
+                          subMaxOperator(scope, rule, value, callback);
+                        },
+                        trigger: ['change']
+                      }
+                    ]"
+                  >
+                    <el-select
+                            v-model="scope.row.subMaxOperator"
+                            placeholder="请选择"
+                            clearable
+                            @change="maxChange($event, scope.$index, 's')"
+                            @focus="
+                        setTheRef(
+                          $event,
+                          `klRuleByIdSub[${scope.$index}].subMaxOperator`
+                        )
+                      "
+                            :ref="`klRuleByIdSub[${scope.$index}].subMaxOperator`"
+                    >
+                      <el-option
+                              v-for="item in operMaxList"
+                              :key="item.key"
+                              :label="item.name"
+                              :value="item.key"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item
+                          :prop="`klRuleByIdSub[${scope.$index}].subMaxValue`"
+                          :rules="[
+                      {
+                        validator: (rule, value, callback) => {
+                          subMaxValue(scope, rule, value, callback);
+                        },
+                        trigger: ['change']
+                      }
+                    ]"
+                  >
+                    <el-input
+                            type="text"
+                            @focus="maxChange($event, scope.$index, 'i')"
+                            :ref="`klRuleByIdSub[${scope.$index}].subMaxValue`"
+                            v-model="scope.row.subMaxValue"
+                            placeholder="填写数值"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item
+                          :prop="`klRuleByIdSub[${scope.$index}].subMaxUnit`"
+                  >
+                    <el-input
+                            type="text"
+                            @focus="setScrollRight"
+                            v-model.trim="scope.row.subMaxUnit"
+                            placeholder="填写单位"
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <!-- </div> -->
+            </el-form-item>
+            <el-form-item
+                    class="type_content_item type_content_item1"
+                    style="flex: 2"
+                    label="最小值:"
+                    v-if="scope.row.dataType === '1'"
+            >
+              <el-row :gutter="10" class="row_box">
+                <el-col :span="6">
+                  <el-form-item
+                          :prop="`klRuleByIdSub[${scope.$index}].subMinOperator`"
+                          :rules="[
+                      {
+                        validator: (rule, value, callback) => {
+                          subMinOperatorRule(scope, rule, value, callback);
+                        },
+                        trigger: ['change']
+                      }
+                    ]"
+                  >
+                    <el-select
+                            v-model="scope.row.subMinOperator"
+                            placeholder="请选择"
+                            clearable
+                            :ref="`klRuleByIdSub[${scope.$index}].subMinOperator`"
+                            @change="minChange($event, scope.$index, 's')"
+                            @focus="
+                        setTheRef(
+                          $event,
+                          `klRuleByIdSub[${scope.$index}].subMinOperator`
+                        )
+                      "
+                    >
+                      <el-option
+                              v-for="item in operMinList"
+                              :key="item.name"
+                              :label="item.name"
+                              :value="item.name"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item
+                          :prop="`klRuleByIdSub[${scope.$index}].subMinValue`"
+                          :rules="[
+                      {
+                        validator: (rule, value, callback) => {
+                          subMinValueRule(scope, rule, value, callback);
+                        },
+                        trigger: ['change']
+                      }
+                    ]"
+                  >
+                    <el-input
+                            type="text"
+                            :ref="`klRuleByIdSub[${scope.$index}].subMinValue`"
+                            @focus="minChange($event, scope.$index, 'i')"
+                            v-model="scope.row.subMinValue"
+                            placeholder="填写数值"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item
+                          :prop="`klRuleByIdSub[${scope.$index}].subMinUnit`"
+                  >
+                    <el-input
+                            type="text"
+                            @focus="setScrollRight"
+                            v-model.trim="scope.row.subMinUnit"
+                            placeholder="填写单位"
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form-item>
+            <!-- v-if="klRuleByIdSub[scope.$index].subType !== 6 && klRuleByIdSub[scope.$index].dataType === '2'" -->
+            <div
+                    style="flex: 2"
+                    v-if="scope.row.subType != 6 && scope.row.dataType == '2'"
+            >
+              <el-form-item
+                      class="type_content_item"
+                      style="width: 100%"
+                      label="医学内容:"
+                      label-width="100px"
+                      :prop="`klRuleByIdSub[${scope.$index}].subEqValue`"
+                      :rules="[
+                  {
+                    required: true,
+                    message: '请输入' + textName(scope.$index),
+                    trigger: 'blur'
+                  },
+                  {
+                    validator: (rule, value, callback) => {
+                      subEqValue(scope, rule, value, callback);
+                    },
+                    trigger: 'blur'
+                  }
+                ]"
+              >
+                <el-input
+                        type="textarea"
+                        rows="1"
+                        placeholder="请输入医学内容"
+                        @focus="setScrollRight"
+                        v-model.trim="scope.row.subEqValue"
+                ></el-input>
+              </el-form-item>
+            </div>
+
+            <!-- v-if="groupData.subType === 6" -->
+            <div style="flex: 2" v-if="scope.row.subType == 6">
+              <el-form-item
+                      class="type_content_item"
+                      label="正则表达式:"
+                      label-width="120px"
+                      style="width: 100%"
+                      :prop="`klRuleByIdSub[${scope.$index}].subEqValue1`"
+                      :rules="[
+                  {
+                    required: true,
+                    message: '请输入' + textName(scope.$index),
+                    trigger: 'blur'
+                  },
+                  {
+                    validator: (rule, value, callback) => {
+                      subEqValue(scope, rule, value, callback);
+                    },
+                    trigger: 'blur'
+                  }
+                ]"
+              >
+                <el-input
+                        type="textarea"
+                        rows="1"
+                        placeholder="请输入正则表达式"
+                        @focus="setScrollRight"
+                        v-model.trim="scope.row.subEqValue"
+                ></el-input>
+              </el-form-item>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+    import api from "@api/knowledgeLib.js";
+    import { tableRules } from "./rules";
+    export default {
+        name: "AddNewRuleTable",
+        data() {
+            return {
+                numTypes: "",
+                subConceptIdIndex: "",
+                operMaxList: [
+                    { name: "<=", key: "<=" },
+                    { name: "<", key: "<" }
+                ],
+                operMinList: [
+                    { name: ">", key: ">" },
+                    { name: ">=", key: ">=" }
+                ],
+                rules: tableRules,
+                theRef: null
+            };
+        },
+        methods: {
+            setScrollRight() {
+                this.$nextTick(() => {
+                    this.$refs.table.bodyWrapper.scrollLeft = this.$refs.table.bodyWrapper.scrollWidth;
+                });
+            },
+            maxChange(e, val, type) {
+                if (
+                    type === "i" &&
+                    this.klRuleByIdSub[val].subMaxOperator &&
+                    this.klRuleByIdSub[val].subMaxOperator != ""
+                ) {
+                    this.$emit("clearValidate", [
+                        `klRuleByIdSub[${val}].subMinValue`,
+                        `klRuleByIdSub[${val}].subMinOperator`
+                    ]);
+                } else if (
+                    type === "s" &&
+                    this.klRuleByIdSub[val].subMaxValue &&
+                    this.klRuleByIdSub[val].subMaxValue != ""
+                ) {
+                    this.$emit("clearValidate", [
+                        `klRuleByIdSub[${val}].subMinValue`,
+                        `klRuleByIdSub[${val}].subMinOperator`
+                    ]);
+                }
+                this.setScrollRight();
+            },
+            minChange(e, val, type) {
+                if (
+                    type === "i" &&
+                    this.klRuleByIdSub[val].subMinOperator &&
+                    this.klRuleByIdSub[val].subMinOperator != ""
+                ) {
+                    this.$emit("clearValidate", [
+                        `klRuleByIdSub[${val}].subMaxOperator`,
+                        `klRuleByIdSub[${val}].subMaxValue`
+                    ]);
+                } else if (
+                    type === "s" &&
+                    this.klRuleByIdSub[val].subMinValue &&
+                    this.klRuleByIdSub[val].subMinValue != ""
+                ) {
+                    this.$emit("clearValidate", [
+                        `klRuleByIdSub[${val}].subMaxOperator`,
+                        `klRuleByIdSub[${val}].subMaxValue`
+                    ]);
+                }
+                this.setScrollRight();
+            },
+            addGroup(scope) {
+                this.$emit("addGroup", null, { groupId: scope.row.groupId });
+                this.$refs.table.bodyWrapper.scrollLeft = 0;
+            },
+            addChildGroup(scope) {
+                this.$emit("addGroup", scope.row.groupId, { index: scope.$index });
+                this.$refs.table.bodyWrapper.scrollLeft = 0;
+            },
+            scrollFun() {
+                this.$refs.table.bodyWrapper.scrollTop =
+                    this.$refs.table.bodyWrapper.scrollTop + 60;
+            },
+            // table 隔行换色
+            // rowStyle({ row }) {
+            //   if (row.rowIndex % 2 == 0) {
+            //     return {
+            //       background: "#DFF7EF"
+            //     };
+            //   }
+            // },
+            // cellStyle
+            cellStyle({ row, column, rowIndex, columnIndex }) {
+                if (column.label == "组" || column.label == "基础规则") return {};
+                return { "vertical-align": "top", "padding-top": "14px" };
+            },
+            // 最大值 选择rule
+            subMaxOperator(scope, rule, value, callback) {
+                const { subMaxValue, subMinOperator, subMinValue } = scope.row;
+                const val = value + subMinOperator + subMinValue + subMaxValue;
+                if (!val || (!value && subMaxValue !== "")) {
+                    callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+                } else {
+                    callback();
+                }
+            },
+            // 最大值 数值rule
+            subMaxValue(scope, rule, value, callback) {
+                const { subMaxOperator, subMinOperator, subMinValue } = scope.row;
+                const val = value + subMaxOperator + subMinValue + subMinOperator;
+                const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
+                if (!val || (value == "" && subMaxOperator)) {
+                    callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+                } else if (value !== "" && !isNum) {
+                    callback(new Error("只能输入数字"));
+                } else {
+                    callback();
+                }
+            },
+            // 最小值 选择rule
+            subMinOperatorRule(scope, rule, value, callback) {
+                const { subMaxValue, subMaxOperator, subMinValue } = scope.row;
+                const val = value + subMaxOperator + subMinValue + subMaxValue;
+                if (!val || (!value && subMinValue !== "")) {
+                    callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+                } else {
+                    callback();
+                }
+            },
+            // 最小值 数值rule
+            subMinValueRule(scope, rule, value, callback) {
+                const { subMaxValue, subMinOperator, subMaxOperator } = scope.row;
+                const val = value + subMaxOperator + subMaxValue + subMinOperator;
+                const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
+                if (!val || (value == "" && subMinOperator)) {
+                    callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+                } else if (value !== "" && !isNum) {
+                    callback(new Error("只能输入数字"));
+                } else {
+                    callback();
+                }
+            },
+            // 医学内容rule
+            subEqValue(scope, rule, value, callback) {
+                if (value === "") {
+                    callback(new Error("请输入" + this.textName(scope.$index)));
+                } else if (value.length > 200) {
+                    callback(new Error(this.textName(scope.$index) + "不能超过200字"));
+                } else {
+                    callback();
+                }
+            },
+            // 判断是否为最后一条规则
+            isLastDate(id) {
+                const tableLength = this.klRuleByIdSub.filter(
+                    (item) => item.groupId !== id
+                ).length;
+                return tableLength === 0;
+            },
+            // 是否超出最大规则数
+            isMax(id) {
+                const typeNum = this.klRuleByIdSub.filter((item) => item.groupId === id)
+                    .length;
+                return typeNum >= this.maxNum;
+            },
+            // 基础规则类型选择
+            subTypeChange(e, index) {
+                this.$emit("subTypeChange", e, index);
+            },
+            //
+            setTheRef(e, val) {
+                this.theRef = val;
+            },
+            // 规则术语类型
+            subCodeChange(val, index) {
+                //基础规则术语类型修改
+                this.$emit("childSubCodeChange", val, index, this.numTypes);
+            },
+            clearConcept(index) {
+                this.$emit("childClearConcept", index);
+            },
+            clearNumText(index) {
+                this.$emit("childClearNumText", index);
+            },
+            //医学标准术语change
+            subConceptIdfocus(index) {
+                this.subConceptIdIndex = "";
+                this.subConceptIdIndex = index;
+                this.setTheRef(1, `klRuleByIdSub[${index}].subConceptId`);
+            },
+            // 医学标准术语
+            searchConcept(val) {
+                const param = {
+                    excludedConceptIds: [
+                        this.klRuleByIdSub[this.subConceptIdIndex].subType
+                    ],
+                    libType: this.klRuleByIdSub[this.subConceptIdIndex].subLenCode,
+                    name: val
+                };
+                api
+                    .searchConcept(param)
+                    .then((res) => {
+                        if (res.data.code == "0") {
+                            const data = res.data.data;
+                            this.$emit("setFormData", this.subConceptIdIndex, data);
+                        }
+                    })
+                    .catch((error) => {
+                        console.log(error);
+                    });
+            },
+            dataTypeChange(val, index) {
+                this.$emit("ChildDataTypeChange", val, index);
+            },
+            // 处理要合并相同行的列
+            getSpanArr(data) {
+                this.spanArr = [];
+                for (var i = 0; i < data.length; i++) {
+                    if (i === 0) {
+                        // 如果是第一条记录(即索引是0的时候),向数组中加入1
+                        /** *
+                         * 例子:
+                         * name:1
+                         * name:1
+                         * name:2
+                         * name:2
+                         * 最终结果:spanArr = [2,0,2,0]
+                         */
+                        this.spanArr.push(1);
+                        this.pos = 0;
+                    } else {
+                        if (data[i].groupId === data[i - 1].groupId) {
+                            // 如果remark相等就累加,并且push 0
+                            this.spanArr[this.pos] += 1;
+                            this.spanArr.push(0);
+                        } else {
+                            // 不相等push 1,并且pos 要换成当前下标
+                            this.spanArr.push(1);
+                            this.pos = i;
+                        }
+                    }
+                }
+            },
+            // 合并单元格
+            ObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
+                if (columnIndex == 0) {
+                    const _row = this.spanArr[rowIndex];
+                    const _col = _row > 0 ? 1 : 0;
+                    return {
+                        rowspan: _row,
+                        colspan: _col
+                    };
+                }
+            },
+            showDataType(index) {
+                return (
+                    (this.numTypes + ",").indexOf(
+                        this.klRuleByIdSub[index].subLenCode + ","
+                    ) === -1
+                );
+            },
+            textName(index) {
+                return this.klRuleByIdSub[index].subType !== 6 &&
+                this.klRuleByIdSub[index].dataType == "2"
+                    ? "医学内容"
+                    : "正则表达式";
+            },
+            blurRef() {
+                console.log("scroll");
+                console.log(this.$refs[this.theRef]);
+                if (this.theRef) {
+                    this.$refs[this.theRef].blur();
+                    // console.log(document.getElementById(this.theRef).blur,'hehehe');
+                    // document.getElementById(this.theRef).focus()
+                    // document.getElementById(this.theRef).value = 123
+                }
+            }
+        },
+        components: {},
+        mounted() {
+            // this.theRef
+            // console.log('mounted');
+            // let that = this;
+            // this.$refs.table.bodyWrapper.addEventListener(
+            //   "scroll",
+            //   that.blurRef,
+            //   false
+            // );
+        },
+        created() {
+            this.numTypes = localStorage.getItem("zskNumDict");
+            this.getSpanArr(this.klRuleByIdSub);
+        },
+        beforeUpdate() {
+            this.getSpanArr(this.klRuleByIdSub);
+        },
+
+        updated() {
+            // let that = this;
+            // this.$nextTick(() => {
+            //   // FIX 滚动添加事件
+            //   this.$refs.table.bodyWrapper.removeEventListener(
+            //     "scroll",
+            //     that.blurRef,
+            //     false
+            //   );
+            //   setTimeout(() => {
+            //     that.$refs.table.bodyWrapper.addEventListener(
+            //       "scroll",
+            //       that.blurRef,
+            //       false
+            //     );
+            //   }, 300);
+            // });
+        },
+        props: {
+            klRuleByIdSub: {
+                type: Array,
+                required: true
+            },
+            maxNum: {
+                default: null
+            }
+        }
+    };
+</script>
+

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

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

+ 89 - 0
src/components/knowledgeExtra/rules.js

@@ -0,0 +1,89 @@
+export const formRules =  {
+  parDescription: [
+    { required: true, message: "请输入规则名称", trigger: ["change"] },
+    {
+      validator: (rule, value, callback) => {
+        if (value.length > 100) {
+          callback(new Error("规则名称不能超过100字"));
+        } else {
+          callback();
+        }
+      },
+      trigger: "change"
+    }
+  ],
+  parRuleType: [
+    { required: true, message: "请选择规则类型", trigger: ["blur"] }
+  ],
+  parLenCode: [
+    { required: true, message: "请选择规则术语类型", trigger: ["blur"] }
+  ],
+  parConceptId: [
+    { required: true, message: "请输入医学标准术语", trigger: ["blur"] }
+  ],
+  parHasSub: [
+    { required: true, message: "请选择有无子条件", trigger: ["blur"] }
+  ],
+  parMsg: [
+    { required: true, message: "请输入附加信息", trigger: ["change"] },
+    {
+      validator: (rule, value, callback) => {
+        if (value.length > 100) {
+          callback(new Error("附加信息不能超过100字"));
+        } else {
+          callback();
+        }
+      },
+      trigger: "change"
+    }
+  ],
+
+}
+
+export const tableRules = {
+  subDescription: [
+    { required: true, message: "请输入基础规则名称", trigger: ["change"] },
+    {
+      validator: (rule, value, callback) => {
+        if (value && value.length > 100) {
+          callback(new Error("规则名称不能超过100字"));
+        } else {
+          callback();
+        }
+      },
+      trigger: "change"
+    }
+  ],
+  subType: [
+    { required: true, message: "请选择基础规则类型", trigger: ["blur"] }
+  ],
+  subLenCode: [
+    {
+      required: true,
+      message: "请选择基础规则术语类型",
+      trigger: ["blur"]
+    }
+  ],
+  subConceptId: [
+    { required: true, message: "请输入医学标准术语", trigger: ["blur"] }
+  ],
+  dataType: [
+    { required: true, message: "请选择类型", trigger: ["blur"] }
+  ],
+  
+  
+  subEqValue: [
+    {
+      validator: (rule, value, callback) => {
+        if (value === "") {
+          callback(new Error("请输入" + this.textName));
+        } else if (value.length > 200) {
+          callback(new Error(this.textName + "不能超过200字"));
+        } else {
+          callback();
+        }
+      },
+      trigger: "blur"
+    }
+  ]
+}

+ 1 - 1
src/components/login/login.less

@@ -67,7 +67,7 @@
     outline: none;
     color: #424243;
     font-size: 14px;
-    padding: 0px 15px;
+    padding: 0px 30px;
     border: 1px solid  #97A4BA;
     border-radius: 4px;
   }

BIN
src/images/add-new-rule-del.png


BIN
src/images/add-new-rule-sub.png


BIN
src/images/add.png


BIN
src/images/exclamationpoint.png


+ 17 - 1
src/less/admin.less

@@ -96,7 +96,16 @@
 .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 {
   color: @adminBase;
 }
-
+.el-button--text.delete,.el-button--text.leaveBtn {
+  color: red;
+}
+.el-message-box__btns .el-button--default.leaveBtn {
+  color: @adminBase;
+}
+// .el-select-dropdown__item.selected.searchListNone {
+//   color: #606266;
+//   font-weight: normal;
+// }
 .el-button--text:focus, .el-button--text:hover, .el-date-table td.available:hover {
   color: @adminBase;
   opacity: .6;
@@ -110,6 +119,13 @@
 }
 .el-message-box__btns .el-button--default{
   color: #fff;
+
+}
+.el-message-box__btns .el-button--default.cancelBtn{
+  color: @adminBase;
+}
+.el-message-box__btns .el-button--default.cancel{
+  color: @adminBase;
 }
 .el-button.is-disabled, .el-button.is-disabled:focus, .el-button.is-disabled:hover{
   color: #aaa;

+ 33 - 2
src/routes.js

@@ -10,6 +10,8 @@ import Pacs from '@components/icss/pacs/Pacs.vue'; //检查关联维护
 import AddPacs from '@components/icss/pacs/AddPacs.vue';  //检查关联维护--添加关联
 import DrugManage from '@components/icss/drug/DrugManage.vue'; //药品关联维护
 import AddDrug from '@components/icss/drug/AddDrug.vue';  //药品关联维护--添加关联
+import ScaleManage from '@components/icss/scale/ScaleManage.vue'; //量表关联维护
+import AddScale from '@components/icss/scale/AddScale.vue';  //量表关联维护--添加关联
 import Operation from '@components/icss/operation/Operation.vue'; //手术/操作关联维护
 import AddOperation from '@components/icss/operation/AddOperation.vue';  //手术/操作关联维护--添加关联
 import Fusion from '@components/icss/fusion/Fusion.vue'; //输血关联维护
@@ -17,10 +19,19 @@ import AddFusion from '@components/icss/fusion/AddFusion.vue';  //输血关联
 import DeptManage from '@components/icss/dept/DeptManage.vue'; //科室关联维护
 import AddDept from '@components/icss/dept/AddDept.vue';  //科室关联维护--添加关联
 import Correlation from '@components/icss/correlation/Correlation.vue';  //关联维护设置
+import Nursing from '@components/icss/nursing/nursing.vue';  //护理关联维护
+import AddNursing from '@components/icss/nursing/Addnursing.vue';  //护理关联维护--添加关联
+import Tcmdisease from '@components/icss/tcmdisease/tcmdisease.vue';  //中医疾病关联维护
+import AddTcmdisease from '@components/icss/tcmdisease/Addtcmdisease.vue';  //中医疾病关联维护--添加关联
+import Tcmdrome from '@components/icss/tcmdrome/tcmdrome.vue';  //中医疾病关联维护
+import AddTcmdrome from '@components/icss/tcmdrome/AddTcmdrome.vue';  //中医疾病关联维护--添加关联
+
 import Plan from '@components/icss/plan/Plan.vue';  //关联维护设置
 import AddPlan from '@components/icss/plan/AddPlan.vue';  //关联维护设置
 import Bill from '@components/icss/bill/Bill.vue';  //开单
 import AddBill from '@components/icss/bill/AddBill.vue';  //开单-编辑
+import ZskRuleManager from '@components/knowledgeExtra/RuleManager.vue';  //知识库规则维护
+import AddZskRule from '@components/knowledgeExtra/AddNewRule.vue';   //知识库添加规则
 
 export default [
   {
@@ -38,25 +49,45 @@ export default [
     children: [
       { path: 'YXSYK-JTZSWH', component: MedicinePrompt, name: 'MedicinePrompt' }, //医学术语提示信息维护
       { path: 'LT-YXSYKWH-TJYXSYJTZS', component: AddMedicinePrompt, name: 'AddMedicinePrompt' }, //医学术语提示信息维护添加
-      { path: 'YXSYK-ZDGLWH', component: ChemicalAndCommonMapping, name: 'ChemicalAndCommonMapping',}, //诊断关联维护
-      { path: 'LT-ZDGLWH-TJHYDXXYGBXDY', component: AddChemicalAndCommonMapping, name: 'AddChemicalAndCommonMapping',}, //诊断关联维护--添加关联
+      { path: 'YXSYK-ZDGLWH', component: ChemicalAndCommonMapping, name: 'ChemicalAndCommonMapping', }, //诊断关联维护
+      { path: 'LT-ZDGLWH-TJHYDXXYGBXDY', component: AddChemicalAndCommonMapping, name: 'AddChemicalAndCommonMapping', }, //诊断关联维护--添加关联
       { path: 'YXSYK-JYGLWH', component: Lis, name: 'Lis' }, //检验关联维护
       { path: 'LT-JYGLWH-TJHYDXXYGBXDY', component: AddLis, name: 'AddLis' }, //检验关联维护--添加关联
       { path: 'YXSYK-JCGLWH', component: Pacs, name: 'Pacs' }, //检查关联维护
       { path: 'LT-JCGLWH-TJHYDXXYGBXDY', component: AddPacs, name: 'AddPacs' }, //检查关联维护--添加关联
       { path: 'YXSYK-YPGLWH', component: DrugManage, name: 'DrugManage' }, //药品关联维护
       { path: 'LT-YPGLWH-TJHYDXXYGBXDY', component: AddDrug, name: 'AddDrug' }, //药品关联维护--添加关联
+      { path: 'YXSYK-LBGLWH', component: ScaleManage, name: 'ScaleManage' }, //量表关联维护
+      { path: 'LT-YPLBWH-TJHYDXXYGBXDY', component: AddScale, name: 'AddScale' }, //量表关联维护--添加关联
       { path: 'YXSYK-SSCZGLWH', component: Operation, name: 'Operation' }, //手术/操作关联维护
       { path: 'LT-SSCZGLWH-TJHYDXXYGBXDY', component: AddOperation, name: 'AddOperation' }, //手术/操作关联维护--添加关联
       { path: 'YXSYK-SXGLWH', component: Fusion, name: 'Fusion' }, //输血关联维护
       { path: 'LT-SXGLWH-TJHYDXXYGBXDY', component: AddFusion, name: 'AddFusion' }, //输血关联维护--添加关联
       { path: 'YXSYK-KSGLWH', component: DeptManage, name: 'DeptManage' }, //科室关联维护
       { path: 'LT-KSGLWH-TJHYDXXYGBXDY', component: AddDept, name: 'AddDept' }, //科室关联维护--添加关联
+      { path: 'YXSYK-HLGLWH', component: Nursing, name: 'Nursing' }, //护理关联维护
+      { path: 'LT-HLGLWH-TJHYDXXYGBXDY', component: AddNursing, name: 'AddNursing' }, //护理关联维护--添加关联
+      { path: 'YXSYK-ZYJBGLWH', component: Tcmdisease, name: 'Tcmdisease' }, //中医疾病关联维护
+      { path: 'LT-ZYJBGLWH-TJHYDXXYGBXDY', component: AddTcmdisease, name: 'AddTcmdisease' }, //中医疾病关联维护
+      { path: 'YXSYK-ZYZHGLWH', component: Tcmdrome, name: 'Tcmdrome' }, //中医疾病关联维护
+      { path: 'LT-ZYZHGLWH-TJHYDXXYGBXDY', component: AddTcmdrome, name: 'AddTcmdrome' }, //中医疾病关联维护
+
+
       { path: 'YXSYK-GLWH', component: Correlation, name: 'Correlation' }, //关联维护设置
       { path: 'XTPZ-DZBLFAPZ', component: Plan, name: 'Plan' }, //电子病历方案配置
       { path: 'LT-DZBLFAPZ-EDIT', component: AddPlan, name: 'AddPlan' }, //电子病历方案配置--新增编辑
       { path: 'GZWH-KDHLXGZWH', component: Bill, name: 'Bill' }, //开单
       { path: 'GZWH-KDHLXGZWH-EDIT', component: AddBill, name: 'AddBill' }, //开单
+      {
+        path: 'GZWH-GZWH',
+        component: ZskRuleManager,
+        name: 'ZskRuleManager',
+      },
+      {
+        path: 'GZWH-GZWH-TJGZ',
+        component: AddZskRule,
+        name: 'AddZskRule',
+      },
     ],
   },
 ];

+ 0 - 0
td


File diff suppressed because it is too large
+ 8616 - 0
yarn.lock