Procházet zdrojové kódy

术语映射接口修改

wyq před 4 roky
rodič
revize
277552a031

+ 93 - 90
src/api/config.js

@@ -19,96 +19,99 @@ export default {
     'hasLisMapping': '/api/knowledgeman/lisMapping/hasLisMapping',  //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
 
     'retrievalSearch': '/demo/retrieval/index',   //术语检索
-    'getLisMappingPage': '/tran/diseaseConfig/getPage', //诊断列表
-    'diseaseIsExistRecord': '/tran/diseaseConfig/isExistRecord',   //诊断-映射关系是否已存在
-    'saveOrUpdateDiseaseRecord': '/tran/diseaseConfig/saveOrUpdateRecord',   //诊断-保存或修改映射关系
-    'deleteDiseaseRecord': '/tran/diseaseConfig/deleteRecord',   //诊断-删除映射关系
-    'exportDiseaseRecord': '/tran/diseaseConfig/exportExcel',   //诊断-数据导出
-    'importDiseaseRecord': '/tran/diseaseConfig/importExcel',   //诊断-数据导入
-    'exportDiseaseModule': '/tran/diseaseConfig/exportExcelModule',   //诊断-数据导入模板导出
-
-    'getLisPage': '/tran/lisConfig/getPage',   //检验列表
-    'lisIsExistRecord': '/tran/lisConfig/isExistRecord',   //检验-映射关系是否已存在
-    'saveOrUpdateLisRecord': '/tran/lisConfig/saveOrUpdateRecord',   //检验-保存或修改映射关系
-    'deleteLisRecord': '/tran/lisConfig/deleteRecord',   //检验-删除映射关系
-    'exportLisRecord': '/tran/lisConfig/exportExcel',   //检验-数据导出
-    'importLisRecord': '/tran/lisConfig/importExcel',   //检验-数据导入
-    'exportLisModule': '/tran/lisConfig/exportExcelModule',   //科室-数据导入模板导出
-
-    'getpacsPage': '/tran/pacsConfig/getPage',   //检查列表
-    'pacsIsExistRecord': '/tran/pacsConfig/isExistRecord',   //检查-映射关系是否已存在
-    'saveOrUpdatePacsRecord': '/tran/pacsConfig/saveOrUpdateRecord',   //检查-保存或修改映射关系
-    'deletePacsRecord': '/tran/pacsConfig/deleteRecord',   //检查-删除映射关系
-    'exportPacsRecord': '/tran/pacsConfig/exportExcel',   //检查-数据导出
-    'importPacsRecord': '/tran/pacsConfig/importExcel',   //检查-数据导入
-    'exportPacsModule': '/tran/pacsConfig/exportExcelModule',   //科室-数据导入模板导出
-
-    'getDrugPage': '/tran/drugConfig/getPage',   //药品列表
-    'drugIsExistRecord': '/tran/drugConfig/isExistRecord',   //药品-映射关系是否已存在
-    'saveOrUpdateDrugRecord': '/tran/drugConfig/saveOrUpdateRecord',   //药品-保存或修改映射关系
-    'deleteDrugRecord': '/tran/drugConfig/deleteRecord',   //药品-删除映射关系
-    'exportDrugRecord': '/tran/drugConfig/exportExcel',   //药品-数据导出
-    'importDrugRecord': '/tran/drugConfig/importExcel',   //药品-数据导入
-    'exportDrugModule': '/tran/drugConfig/exportExcelModule',   //科室-数据导入模板导出
-
-      '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',   //手术/操作-删除映射关系
-    'exportOperationRecord': '/tran/operationConfig/exportExcel',   //手术/操作-数据导出
-    'importOperationRecord': '/tran/operationConfig/importExcel',   //手术/操作-数据导入
-    'exportOperationModule': '/tran/operationConfig/exportExcelModule',   //科室-数据导入模板导出
-
-    'getFusionPage': '/tran/transfusionConfig/getPage',   //输血列表
-    'fusionIsExistRecord': '/tran/transfusionConfig/isExistRecord',   //输血-映射关系是否已存在
-    'saveOrUpdateFusionRecord': '/tran/transfusionConfig/saveOrUpdateRecord',   //输血-保存或修改映射关系
-    'deleteFusionRecord': '/tran/transfusionConfig/deleteRecord',   //输血-删除映射关系
-    'exportFusionRecord': '/tran/transfusionConfig/exportExcel',   //输血-数据导出
-    'importFusionRecord': '/tran/transfusionConfig/importExcel',   //输血-数据导入
-    'exportFusionModule': '/tran/transfusionConfig/exportExcelModule',   //科室-数据导入模板导出
-
-    'getDeptPage': '/tran/deptConfig/getPage',   //科室列表
-    'deptIsExistRecord': '/tran/deptConfig/isExistRecord',   //科室-映射关系是否已存在
-    'saveOrUpdateDeptRecord': '/tran/deptConfig/saveOrUpdateRecord',   //科室-保存或修改映射关系
-    'deleteDeptRecord': '/tran/deptConfig/deleteRecord',   //科室-删除映射关系
-    'exportDeptRecord': '/tran/deptConfig/exportExcel',   //科室-数据导出
-    'importDeptRecord': '/tran/deptConfig/importExcel',   //科室-数据导入
-    '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',   //中医证候-数据导入模板导出
-
+    'getLisMappingPage': '/tran/mappingConfig/getPage', //诊断列表
+    'diseaseIsExistRecord': '/tran/mappingConfig/isExistRecord',   //诊断-映射关系是否已存在
+    'saveOrUpdateDiseaseRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //诊断-保存或修改映射关系
+    'deleteDiseaseRecord': '/tran/mappingConfig/deleteRecord',   //诊断-删除映射关系
+    'exportDiseaseRecord': '/tran/mappingConfig/exportExcel',   //诊断-数据导出
+    'importDiseaseRecord': '/tran/mappingConfig/importExcel',   //诊断-数据导入
+    'exportDiseaseModule': '/tran/mappingConfig/exportExcelModule',   //诊断-数据导入模板导出
+
+    'getLisPage': '/tran/mappingConfig/getPage',   //检验列表
+    'lisIsExistRecord': '/tran/mappingConfig/isExistRecord',   //检验-映射关系是否已存在
+    'saveOrUpdateLisRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //检验-保存或修改映射关系
+    'deleteLisRecord': '/tran/mappingConfig/deleteRecord',   //检验-删除映射关系
+    'exportLisRecord': '/tran/mappingConfig/exportExcel',   //检验-数据导出
+    'importLisRecord': '/tran/mappingConfig/importExcel',   //检验-数据导入
+    'exportLisModule': '/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
+
+    'getpacsPage': '/tran/mappingConfig/getPage',   //检查列表
+    'pacsIsExistRecord': '/tran/mappingConfig/isExistRecord',   //检查-映射关系是否已存在
+    'saveOrUpdatePacsRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //检查-保存或修改映射关系
+    'deletePacsRecord': '/tran/mappingConfig/deleteRecord',   //检查-删除映射关系
+    'exportPacsRecord': '/tran/mappingConfig/exportExcel',   //检查-数据导出
+    'importPacsRecord': '/tran/mappingConfig/importExcel',   //检查-数据导入
+    'exportPacsModule': '/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
+
+    'getDrugPage': '/tran/mappingConfig/getPage',   //药品列表
+    'drugIsExistRecord': '/tran/mappingConfig/isExistRecord',   //药品-映射关系是否已存在
+    'saveOrUpdateDrugRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //药品-保存或修改映射关系
+    'deleteDrugRecord': '/tran/mappingConfig/deleteRecord',   //药品-删除映射关系
+    'exportDrugRecord': '/tran/mappingConfig/exportExcel',   //药品-数据导出
+    'importDrugRecord': '/tran/mappingConfig/importExcel',   //药品-数据导入
+    'exportDrugModule': '/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
+
+      'getScalePageCDSS': '/tran/mappingConfig/getPage',   //量表列表
+      'scaleIsExistRecordCDSS': '/tran/mappingConfig/isExistRecord',   //量表-映射关系是否已存在
+      'saveOrUpdateScaleRecordCDSS': '/tran/mappingConfig/saveOrUpdateRecord',   //量表-保存或修改映射关系
+      'deleteScaleRecordCDSS': '/tran/mappingConfig/deleteRecord',   //量表-删除映射关系
+      'exportScaleRecordCDSS': '/tran/mappingConfig/exportExcel',   //量表-数据导出
+      'importScaleRecordCDSS': '/tran/mappingConfig/importExcel',   //量表-数据导入
+      'exportScaleModuleCDSS': '/tran/mappingConfig/exportExcelModule',
+
+
+      'getOperationPage': '/tran/mappingConfig/getPage',   //手术/操作列表
+    'operationIsExistRecord': '/tran/mappingConfig/isExistRecord',   //手术/操作-映射关系是否已存在
+    'saveOrUpdateOperationRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //手术/操作-保存或修改映射关系
+    'deleteOperationRecord': '/tran/mappingConfig/deleteRecord',   //手术/操作-删除映射关系
+    'exportOperationRecord': '/tran/mappingConfig/exportExcel',   //手术/操作-数据导出
+    'importOperationRecord': '/tran/mappingConfig/importExcel',   //手术/操作-数据导入
+    'exportOperationModule': '/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
+
+    'getFusionPage': '/tran/mappingConfig/getPage',   //输血列表
+    'fusionIsExistRecord': '/tran/mappingConfig/isExistRecord',   //输血-映射关系是否已存在
+    'saveOrUpdateFusionRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //输血-保存或修改映射关系
+    'deleteFusionRecord': '/tran/mappingConfig/deleteRecord',   //输血-删除映射关系
+    'exportFusionRecord': '/tran/mappingConfig/exportExcel',   //输血-数据导出
+    'importFusionRecord': '/tran/mappingConfig/importExcel',   //输血-数据导入
+    'exportFusionModule': '/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
+
+    'getDeptPage': '/tran/mappingConfig/getPage',   //科室列表
+    'deptIsExistRecord': '/tran/mappingConfig/isExistRecord',   //科室-映射关系是否已存在
+    'saveOrUpdateDeptRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //科室-保存或修改映射关系
+    'deleteDeptRecord': '/tran/mappingConfig/deleteRecord',   //科室-删除映射关系
+    'exportDeptRecord': '/tran/mappingConfig/exportExcel',   //科室-数据导出
+    'importDeptRecord': '/tran/mappingConfig/importExcel',   //科室-数据导入
+    'exportDeptModule': '/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
+
+
+    'getNursePage': '/tran/mappingConfig/getPage',   //护理列表
+    'nurseIsExistRecord': '/tran/mappingConfig/isExistRecord',   //护理-映射关系是否已存在
+    'saveOrUpdateRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //护理列表添加
+    'deleteNurseRecord': '/tran/mappingConfig/deleteRecord',   //护理-删除映射关系
+    'exportNurseRecord': '/tran/mappingConfig/exportExcel',   //护理-数据导出
+    'importNurseRecord': '/tran/mappingConfig/importExcel',   //检验-数据导入
+    'exportNurseModule': '/tran/mappingConfig/exportExcelModule',   //护理-数据导入模板导出
+
+    'getTcmdiseasePage': '/tran/mappingConfig/getPage',   //中医疾病列表
+    'tcmIsExistRecord': '/tran/mappingConfig/isExistRecord',   //中医疾病-映射关系是否已存在
+    'saveOrUpdateRecordTcm': '/tran/mappingConfig/saveOrUpdateRecord',   //护理列表添加
+    'deleteTcmRecord': '/tran/mappingConfig/deleteRecord',   //中医疾病-删除映射关系
+    'exportTcmRecord': '/tran/mappingConfig/exportExcel',   //中医疾病-数据导出
+    'importTcmRecord': '/tran/mappingConfig/importExcel',   //中医疾病-数据导入
+    'exportTcmModule': '/tran/mappingConfig/exportExcelModule',   //护理-数据导入模板导出
+
+    'getTcmsyndromePage': '/tran/mappingConfig/getPage',   //中医证候列表
+    'tcmdromeIsExistRecord': '/tran/mappingConfig/isExistRecord',   //中医证候-映射关系是否已存在
+    'saveOrUpdateRecordTcmdrome': '/tran/mappingConfig/saveOrUpdateRecord',   //中医证候列表添加
+    'deleteTcmdromeRecord': '/tran/mappingConfig/deleteRecord',
+    'exportTcmdromeRecord': '/tran/mappingConfig/exportExcel',   //中医证候-数据导出
+    'importTcmdromeRecord': '/tran/mappingConfig/importExcel',   //中医证候-数据导入
+    'exportTcmdromeModule': '/tran/mappingConfig/exportExcelModule',   //中医证候-数据导入模板导出
+
+
+    'getRelatedMapping': '/tran/mappingConfig/getRelatedMapping',//查询映射关联
+    'getTermMatching': '/term/termMatching',//查询推荐匹配
 
 
     'getHospitalInfo': '/tran/hospitalInfo/getHospitalInfo',   //医院信息——获取医院信息

+ 9 - 0
src/api/icss.js

@@ -424,4 +424,13 @@ export default {
     return request({ method: 'post', url: urls.updateBillmanStatus, data: param });
   },
 
+
+  getRelatedMapping(param) {
+    //查询已映射关系
+    return axios.post(urls.getRelatedMapping, param);
+  },
+  getTermMatching(param) {
+    //推荐匹配
+    return axios.post(urls.getTermMatching, 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.236: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';
 

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

@@ -268,6 +268,10 @@ export default {
               'userLoginDTO',
               JSON.stringify(data.userLoginDTO)
             );
+            localStorage.setItem(
+              'hospitalLoginDTO',
+              JSON.stringify(data.hospitalLoginDTO)
+            );
             if (hasConcole) {
               const url = '/admin/LT-KZT';
               this.$router.push({ path: url });

+ 703 - 0
src/components/common/LtModal.vue

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

+ 78 - 14
src/components/icss/dept/DeptManage.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="科室关联维护" style="min-width: 980px">
+    <crumbs title="科室关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -14,19 +14,26 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院科室名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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>
@@ -59,6 +66,15 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'科室名称'"
+      :standard="'科室名称'"
+      :type="7"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -66,16 +82,23 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'DeptManage',
   data: function() {
     return {
       list: [],
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -85,9 +108,14 @@ export default {
       fileName: '',
       formData: {},
       headers: {},
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components:{
+    LtModal
+  },
   created() {
     const param = this.$route.params;
     if(param.currentPage){
@@ -158,7 +186,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 7,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -175,7 +205,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddDept', params: pam });
+      // this.$router.push({ name: 'AddDept', params: pam });
+      this.data = {}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -187,10 +219,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDept',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      // this.$router.push({
+      //   name: 'AddDept',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -294,7 +328,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportDeptRecord().then(res => {
+          api.exportDeptRecord({type:7}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '科室关联数据.xls');
@@ -327,6 +361,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 7);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -385,14 +425,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

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

@@ -1,36 +1,38 @@
 <template>
   <div>
-    <crumbs title="诊断关联维护" style="min-width: 980px">
+    <crumbs title="诊断关联维护" style="min-width: 980px" class="knowledgeTitle">
       <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)"
-          />
+          <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 class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院诊断名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <el-table :data="list" border style="width: 100%">
         <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院诊断名称" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="icdCode" label="ICD-10编码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="code" label="ICD-10编码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准诊断名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
@@ -58,6 +60,15 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'诊断名称'"
+      :standard="'诊断名称'"
+      :type="4"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -65,35 +76,47 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'ChemicalAndCommonMapping', //化验大小项和公表维护
   data: function() {
     return {
       list: [],
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match: ''
       },
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const param = this.$route.params;
-    if(param.currentPage){
-      this.inCurrentPage = param.currentPage
+    if (param.currentPage) {
+      this.inCurrentPage = param.currentPage;
     }
-    if(param.filter){
-      this.filter = param.filter
+    if (param.filter) {
+      this.filter = param.filter;
     }
     //返回时避免参数未赋值就获取列表
-    setTimeout(()=> {
+    setTimeout(() => {
       // this.clearFilter();
       this.getDataList();
     });
@@ -158,7 +181,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        icdCode: ''
+        icdCode: '',
+        type: 4,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -175,7 +200,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddChemicalAndCommonMapping', params: pam });
+      this.data = {};
+      this.showModal();
+      // this.$router.push({ name: 'AddChemicalAndCommonMapping', params: pam });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -187,10 +214,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddChemicalAndCommonMapping',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      this.data = item;
+      this.showModal();
+      // this.$router.push({
+      //   name: 'AddChemicalAndCommonMapping',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -293,7 +322,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportDiseaseRecord().then(res => {
+          api.exportDiseaseRecord({type:4}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '诊断关联数据.xls');
@@ -327,6 +356,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 4);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -384,17 +419,40 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
-
 }
 .delete:hover {
   color: red !important;
@@ -424,8 +482,8 @@ export default {
 .exportBox6 {
   .leftbtn {
     background-color: #fff !important;
-    border-color: #48C5D7 !important;
-    color: #48C5D7 !important;
+    border-color: #48c5d7 !important;
+    color: #48c5d7 !important;
   }
 }
 </style>

+ 77 - 15
src/components/icss/drug/DrugManage.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="药品关联维护" style="min-width: 980px">
+    <crumbs title="药品关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -13,19 +13,26 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院药品名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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>
@@ -58,6 +65,14 @@
         ></el-pagination>
       </div>
     </div>
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'药品名称'"
+      :standard="'药品名称'"
+      :type="5"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -65,25 +80,37 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'DrugManage', //化验大小项和公表维护
   data: function() {
     return {
       list: [],
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components:{
+    LtModal
+  },
   created() {
     const param = this.$route.params;
     if(param.currentPage){
@@ -150,7 +177,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 5,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -167,7 +196,8 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddDrug', params: pam });
+        this.showModal()
+      // this.$router.push({ name: 'AddDrug', params: pam });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -179,10 +209,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDrug',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      // this.$router.push({
+      //   name: 'AddDrug',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -285,7 +317,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportDrugRecord().then(res => {
+          api.exportDrugRecord({type:5}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '药品关联数据.xls');
@@ -299,7 +331,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDrugModule().then(res => {
+      api.exportDrugModule({type:5}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '药品导入模板.xls');
@@ -319,6 +351,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 5);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -377,14 +415,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

+ 77 - 14
src/components/icss/fusion/Fusion.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="输血关联维护" style="min-width: 980px">
+    <crumbs title="输血关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -13,19 +13,26 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院输血类型:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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>
@@ -57,6 +64,14 @@
         ></el-pagination>
       </div>
     </div>
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'输血类型'"
+      :standard="'输血类型'"
+      :type="8"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -64,25 +79,37 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'Fusion', //化验大小项和公表维护
   data: function() {
     return {
       list: [],
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components:{
+    LtModal
+  },
   created() {
     const param = this.$route.params;
     if(param.currentPage){
@@ -150,7 +177,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 8,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -167,7 +196,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddFusion', params: pam });
+      // this.$router.push({ name: 'AddFusion', params: pam });
+      this.data = {}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -179,10 +210,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddFusion',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      // this.$router.push({
+      //   name: 'AddFusion',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -285,7 +318,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportFusionRecord().then(res => {
+          api.exportFusionRecord({type:8}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '输血关联数据.xls');
@@ -318,6 +351,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 8);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -375,14 +414,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

+ 94 - 31
src/components/icss/lis/Lis.vue

@@ -1,18 +1,18 @@
 <template>
   <div>
-    <crumbs title="检验关联维护" style="min-width: 1060px">
+    <crumbs title="检验关联维护" style="min-width: 1060px" class="knowledgeTitle">
       <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)"
-          />
+          <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 class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="检验套餐:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
@@ -22,13 +22,15 @@
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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>
@@ -61,6 +63,16 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'检验套餐'"
+      :detail="'检验细项'"
+      :standard="'检验标准术语'"
+      :type="1"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -68,40 +80,51 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'Lis', //化验大小项和公表维护
   data: function() {
     return {
       list: [],
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       searched: false,
       filter: {
         hisName: '', // 检验套餐
         hisDetailName: '', //检验细项
-        uniqueName: '' //标准检验项
+        uniqueName: '', //标准检验项
+        match: ''
       },
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const param = this.$route.params;
-    if(param.currentPage){
-      this.inCurrentPage = param.currentPage
+    if (param.currentPage) {
+      this.inCurrentPage = param.currentPage;
     }
-    if(param.filter){
-      this.filter = param.filter
+    if (param.filter) {
+      this.filter = param.filter;
     }
     //返回时避免参数未赋值就获取列表
-    setTimeout(()=> {
+    setTimeout(() => {
       // that.clearFilter();
       this.getDataList();
     });
-
   },
   watch: {
     filter: {
@@ -158,7 +181,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hisDetailName: this.filter.hisDetailName.trim()
+        hisDetailName: this.filter.hisDetailName.trim(),
+        type: 1,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -175,7 +200,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddLis', params: pam });
+      this.data = {};
+      this.showModal();
+      // this.$router.push({ name: 'AddLis', params: pam });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -187,10 +214,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddLis',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      this.data = item;
+      this.showModal();
+      // this.$router.push({
+      //   name: 'AddLis',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -294,12 +323,16 @@ export default {
         // }
       })
         .then(() => {
-          api.exportLisRecord().then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '检验数据.xls');
-            }
-          });
+          api
+            .exportLisRecord({
+              type: 1
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '检验数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -327,6 +360,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 1);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -384,14 +423,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

+ 78 - 14
src/components/icss/nursing/nursing.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="护理关联维护" style="min-width: 980px">
+    <crumbs title="护理关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -14,19 +14,26 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医学护理名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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>
@@ -58,6 +65,15 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'护理名称'"
+      :standard="'护理名称'"
+      :type="11"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -65,16 +81,23 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'DeptManage',
   data: function() {
     return {
       list: [],
       searched: false,
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -84,9 +107,14 @@ export default {
       fileName: '',
       formData: {},
       headers: {},
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components:{
+    LtModal
+  },
   created() {
     const param = this.$route.params;
     if(param.currentPage){
@@ -157,7 +185,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 11,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -174,7 +204,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddNursing', params: pam });
+      // this.$router.push({ name: 'AddNursing', params: pam });
+      this.data={}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -186,10 +218,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddNursing',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      // this.$router.push({
+      //   name: 'AddNursing',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
+      this.data=item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -293,7 +327,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportNurseRecord().then(res => {
+          api.exportNurseRecord({type:11}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '护理关联数据.xls');
@@ -326,6 +360,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 11);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -384,14 +424,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

+ 78 - 14
src/components/icss/operation/Operation.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="手术/操作关联维护" style="min-width: 980px">
+    <crumbs title="手术/操作关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -13,19 +13,26 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院手术/操作名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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>
@@ -62,6 +69,15 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'手术/操作名称'"
+      :standard="'手术/操作名称'"
+      :type="6"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -69,25 +85,37 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'Operation', //化验大小项和公表维护
   data: function() {
     return {
       list: [],
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const param = this.$route.params;
     if(param.currentPage){
@@ -155,7 +183,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 6,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -172,7 +202,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddOperation', params: pam });
+      // this.$router.push({ name: 'AddOperation', params: pam });
+      this.data = {}
+        this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -184,10 +216,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddOperation',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      // this.$router.push({
+      //   name: 'AddOperation',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
+      this.data = item
+        this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -290,7 +324,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportOperationRecord().then(res => {
+          api.exportOperationRecord({type:6}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '手术/操作关联数据.xls');
@@ -324,6 +358,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 6);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -381,14 +421,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

+ 78 - 14
src/components/icss/pacs/Pacs.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="检查关联维护" style="min-width: 980px">
+    <crumbs title="检查关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -13,19 +13,26 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院检查项目:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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>
@@ -57,6 +64,15 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'检查项目'"
+      :standard="'检查项目'"
+      :type="3"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -64,25 +80,37 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'Pacs', //化验大小项和公表维护
   data: function() {
     return {
       list: [],
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components:{
+    LtModal
+  },
   created() {
     const that = this;
     //返回时避免参数未赋值就获取列表
@@ -155,7 +183,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 3,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -172,7 +202,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddPacs', params: pam });
+        this.data = {}
+        this.showModal()
+      // this.$router.push({ name: 'AddPacs', params: pam });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -184,10 +216,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddPacs',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+        this.data = item
+        this.showModal()
+      // this.$router.push({
+      //   name: 'AddPacs',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -290,7 +324,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportPacsRecord().then(res => {
+          api.exportPacsRecord({type:3}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '检查关联数据.xls');
@@ -323,6 +357,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 3);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -381,14 +421,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

+ 477 - 419
src/components/icss/scale/ScaleManage.vue

@@ -1,437 +1,495 @@
 <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>
+    <crumbs title="量表关联维护" style="min-width: 980px" class="knowledgeTitle">
+      <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 class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="医院量表名称:">
+          <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="标准量表名称:">
+          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine">
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">检索</el-button>
+          <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="contents knowledgeContents">
+      <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>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'量表名称'"
+      :standard="'量表名称'"
+      :type="10"
+      :data="data"
+    ></LtModal>
+  </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();
-            },
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+import LtModal from '@components/common/LtModal';
+export default {
+  name: 'ScaleManage', //化验大小项和公表维护
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
+      },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
+    };
+  },
+  components: {
+    LtModal
+  },
+  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;
-                    }
-                });
-            },
+    // 获取列表数据
+    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;
-            },
+    // 处理列表请求数据参数
+    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: '',
+        type: 10,
+        isMatch: this.filter.match
+      };
+      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: ''
-                };
-            },
+    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 });
+      this.data = {};
+      this.showModal();
+    },
+    // 修改诊断关联-跳转至编辑页面
+    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 })
+      //   });
+      this.data = item;
+      this.showModal();
+    },
+    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);
-                        });
-                });
-            },
+    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' });
-                    });
-            },
+    // 导出数据
+    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({type:10}).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);
-                    }
-                });
-            },
+    // 导入模板
+    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(() => {});
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 10);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
+      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 = '';
-            }
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
-    };
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
+    }
+  }
+};
 </script>
 
 
-<style lang="less">
-    @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 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;
+}
+.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>

+ 80 - 15
src/components/icss/tcmdisease/tcmdisease.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="中医疾病关联维护" style="min-width: 980px">
+    <crumbs title="中医疾病关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -14,24 +14,31 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院中医疾病名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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="code" label="中医疾病代码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准中医疾病名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
@@ -59,6 +66,16 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'中医疾病名称'"
+      :standard="'中医疾病名称'"
+      :detail="'中医疾病代码'"
+      :type="12"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -66,7 +83,7 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'Tcmdisease',
   data: function() {
@@ -75,8 +92,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -85,9 +109,14 @@ export default {
       fileName: '',
       formData: {},
       headers: {},
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const param = this.$route.params;
     if(param.currentPage){
@@ -158,7 +187,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 12,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -175,7 +206,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddTcmdisease', params: pam });
+      // this.$router.push({ name: 'AddTcmdisease', params: pam });
+      this.data = {}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -187,10 +220,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddTcmdisease',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+      // this.$router.push({
+      //   name: 'AddTcmdisease',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -294,7 +329,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportTcmRecord().then(res => {
+          api.exportTcmRecord({type:12}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '中医疾病关联数据.xls');
@@ -327,6 +362,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 12);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -385,14 +426,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

+ 80 - 15
src/components/icss/tcmdrome/tcmdrome.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="中医证候关联维护" style="min-width: 980px">
+    <crumbs title="中医证候关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item>
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
@@ -14,24 +14,31 @@
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label class="selectMedicine">
+          <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+            <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院中医证候名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <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-form>
+      <el-form class="secLine">
+        <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
-    <div class="contents">
+    <div class="contents knowledgeContents">
       <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="code" label="中医证候代码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准中医证候名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
@@ -59,6 +66,16 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'中医证候名称'"
+      :standard="'中医证候名称'"
+      :detail="'中医证候代码'"
+      :type="13"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -66,7 +83,7 @@
 import api from '@api/icss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@components/common/LtModal';
 export default {
   name: 'Tcmdrome',
   data: function() {
@@ -75,8 +92,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match: ''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -85,9 +109,14 @@ export default {
       fileName: '',
       formData: {},
       headers: {},
-      uploadInfo: '导入'
+      uploadInfo: '导入',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const param = this.$route.params;
     if(param.currentPage){
@@ -158,7 +187,9 @@ export default {
         size: this.pageSize,
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
-        uniqueCode: ''
+        uniqueCode: '',
+        type: 13,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -175,7 +206,9 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddTcmdrome', params: pam });
+        this.data = {}
+        this.showModal()
+      // this.$router.push({ name: 'AddTcmdrome', params: pam });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -187,10 +220,12 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddTcmdrome',
-        params: Object.assign(pam, { isEdit: true, data: item })
-      });
+        this.data = item
+        this.showModal()
+      // this.$router.push({
+      //   name: 'AddTcmdrome',
+      //   params: Object.assign(pam, { isEdit: true, data: item })
+      // });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -294,7 +329,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportTcmdromeRecord().then(res => {
+          api.exportTcmdromeRecord({type:13}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '中医证候关联数据.xls');
@@ -327,6 +362,12 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 13);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      formData.append(
+        'hospitalId',
+        JSON.parse(localStorage.getItem('hospitalLoginDTO')).id
+      );
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -385,14 +426,38 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };
 </script>
 
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
+/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;
 }

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

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

+ 2 - 0
src/components/login/Login.vue

@@ -231,6 +231,8 @@ export default {
                 } else if (res.data.code == '0') {
                   const token = JSON.stringify(res.data.data);
                   localStorage.setItem('token', token);
+                  const uesrId = JSON.stringify(res.data.data.type);
+                  localStorage.setItem('uesrId', uesrId);
                   this.$message({
                     message: '登录成功!',
                     type: 'success',

+ 4 - 0
src/less/common.less

@@ -25,6 +25,10 @@
 /*
 *公用样式
 */
+.leftbtn {
+  color: #48C5D7!important;
+  border-color: #48C5D7;
+}
 .el-container {
   background: @baseBackage;
 	width: 100%;