Selaa lähdekoodia

Merge branch 'test' of http://192.168.2.236:10080/zhouna/cdssHospital into test

luolei 4 vuotta sitten
vanhempi
commit
82e04f3506

+ 15 - 2
src/api/config.js

@@ -25,14 +25,12 @@ export default {
     'deleteDiseaseRecord': '/tran/diseaseConfig/deleteRecord',   //诊断-删除映射关系
     'exportDiseaseRecord': '/tran/diseaseConfig/exportExcel',   //诊断-数据导出
     'importDiseaseRecord': '/tran/diseaseConfig/importExcel',   //诊断-数据导入
-
     'getLisPage': '/tran/lisConfig/getPage',   //检验列表
     'lisIsExistRecord': '/tran/lisConfig/isExistRecord',   //检验-映射关系是否已存在
     'saveOrUpdateLisRecord': '/tran/lisConfig/saveOrUpdateRecord',   //检验-保存或修改映射关系
     'deleteLisRecord': '/tran/lisConfig/deleteRecord',   //检验-删除映射关系
     'exportLisRecord': '/tran/lisConfig/exportExcel',   //检验-数据导出
     'importLisRecord': '/tran/lisConfig/importExcel',   //检验-数据导入
-
     'getpacsPage': '/tran/pacsConfig/getPage',   //检查列表
     'pacsIsExistRecord': '/tran/pacsConfig/isExistRecord',   //检查-映射关系是否已存在
     'saveOrUpdatePacsRecord': '/tran/pacsConfig/saveOrUpdateRecord',   //检查-保存或修改映射关系
@@ -51,7 +49,22 @@ export default {
     'deleteOperationRecord': '/tran/operationConfig/deleteRecord',   //手术/操作-删除映射关系
     'exportOperationRecord': '/tran/operationConfig/exportExcel',   //手术/操作-数据导出
     'importOperationRecord': '/tran/operationConfig/importExcel',   //手术/操作-数据导入
+    'getFusionPage': '/tran/transfusionConfig/getPage',   //输血列表
+    'fusionIsExistRecord': '/tran/transfusionConfig/isExistRecord',   //输血-映射关系是否已存在
+    'saveOrUpdateFusionRecord': '/tran/transfusionConfig/saveOrUpdateRecord',   //输血-保存或修改映射关系
+    'deleteFusionRecord': '/tran/transfusionConfig/deleteRecord',   //输血-删除映射关系
+    'exportFusionRecord': '/tran/transfusionConfig/exportExcel',   //输血-数据导出
+    'importFusionRecord': '/tran/transfusionConfig/importExcel',   //输血-数据导入
+
+    'getDeptPage': '/tran/deptConfig/getPage',   //科室列表
+    'deptIsExistRecord': '/tran/deptConfig/isExistRecord',   //科室-映射关系是否已存在
+    'saveOrUpdateDeptRecord': '/tran/deptConfig/saveOrUpdateRecord',   //科室-保存或修改映射关系
+    'deleteDeptRecord': '/tran/deptConfig/deleteRecord',   //科室-删除映射关系
+    'exportDeptRecord': '/tran/deptConfig/exportExcel',   //科室-数据导出
+    'importDeptRecord': '/tran/deptConfig/importExcel',   //科室-数据导入
 
+    'getHospitalInfo': '/tran/hospitalInfo/getHospitalInfo',   //医院信息——获取医院信息
+    'saveHospitalInfoRecord': '/tran/hospitalInfo/saveRecord',   //医院信息——修改医院信息
 
     'getAccessdMenu': '/sys/user/getUserOrgMenu',  //获取左侧菜单项
     'delConceptInfo':'/graph/conceptInfo/changeStatus',   //删除术语静态知识

+ 49 - 2
src/api/icss.js

@@ -63,7 +63,6 @@ export default {
   importDiseaseRecord(param) {
     return axios.post(urls.importDiseaseRecord, param);
   },
-
   getLisPage(param) {
     //检验列表-列表
     return axios.post(urls.getLisPage, param);
@@ -85,7 +84,6 @@ export default {
   importLisRecord(param) {
     return axios.post(urls.importLisRecord, param);
   },
-
   getpacsPage(param) {
     //检查列表-列表
     return axios.post(urls.getpacsPage, param);
@@ -149,4 +147,53 @@ export default {
   importOperationRecord(param) {
     return axios.post(urls.importOperationRecord, param);
   },
+  getFusionPage(param) {
+    //输血列表-列表
+    return axios.post(urls.getFusionPage, param);
+  },
+  fusionIsExistRecord(param) {
+    return axios.post(urls.fusionIsExistRecord, param);
+  },
+  saveOrUpdateFusionRecord(param) {
+    return axios.post(urls.saveOrUpdateFusionRecord, param);
+  },
+  deleteFusionRecord(param) {
+    return axios.post(urls.deleteFusionRecord, param);
+  },
+  exportFusionRecord(param) {
+    return axios.post(urls.exportFusionRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importFusionRecord(param) {
+    return axios.post(urls.importFusionRecord, param);
+  },
+  getDeptPage(param) {
+    //科室列表-列表
+    return axios.post(urls.getDeptPage, param);
+  },
+  deptIsExistRecord(param) {
+    return axios.post(urls.deptIsExistRecord, param);
+  },
+  saveOrUpdateDeptRecord(param) {
+    return axios.post(urls.saveOrUpdateDeptRecord, param);
+  },
+  deleteDeptRecord(param) {
+    return axios.post(urls.deleteDeptRecord, param);
+  },
+  exportDeptRecord(param) {
+    return axios.post(urls.exportDeptRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importDeptRecord(param) {
+    return axios.post(urls.importDeptRecord, param);
+  },
+
+  getHospitalInfo(param) {
+    return axios.post(urls.getHospitalInfo, param);
+  },
+  saveHospitalInfoRecord(param) {
+    return axios.post(urls.saveHospitalInfoRecord, param);
+  },
 };

+ 101 - 0
src/components/icss/correlation/Correlation.vue

@@ -0,0 +1,101 @@
+<template>
+  <div class="importDisWrapper clearfix">
+    <crumbs title="关联维护设置" class="topBack" style="min-width: 980px"></crumbs>
+    <div class="importDisBox">
+      <el-form ref="form" :model="form" label-width="120px">
+        <el-form-item label="术语关联:">
+          <el-switch
+            v-if="showInfo"
+            v-model="form.value"
+            active-color="#4BC4D7"
+            inactive-color="#ff4949"
+            @change="handleChange($event,form.value)"
+            :disabled="disabled"
+          ></el-switch>
+          <span class="showInfo">{{showInfo}}</span>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  data() {
+    return {
+      form: {
+        value: true
+      },
+      hospitalId: '',
+      disabled: false,
+      showInfo: ''
+    };
+  },
+  created() {
+    this.getHospital();
+  },
+  methods: {
+    // 关联
+    handleChange($event, isCorre) {
+      this.showInfo = $event ? '开' : '关'
+      this.disabled = true;
+      let params = {
+        id: this.hospitalId,
+        connect: $event ? 1 : 0 //0-不对接,1-对接
+      };
+      api
+        .saveHospitalInfoRecord(params)
+        .then(res => {
+          if (res.data.code === '0') {
+            this.$message({
+              showClose: true,
+              message: '操作成功!',
+              type: 'success'
+            });
+            setTimeout(() => {
+              this.disabled = false;
+            }, 1500);
+          }
+        })
+        .catch(err => {
+          this.$message({
+            showClose: true,
+            message: '操作失败!',
+            type: 'error'
+          });
+          this.disabled = false;
+        });
+    },
+
+    // 获取医院信息
+    getHospital() {
+      api.getHospitalInfo().then(res => {
+        this.hospitalId = res.data.data.id;
+        this.showInfo = res.data.data.connect === 1 ? '开' : '关'
+        this.form.value = res.data.data.connect === 1? true : false
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="less">
+.importDisWrapper {
+  min-width: 940px;
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .importDisBox {
+    padding: 80px 60px 120px 60px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .showInfo{
+    margin-left: 10px;
+  }
+}
+</style>

+ 411 - 0
src/components/icss/dept/AddDept.vue

@@ -0,0 +1,411 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
+    <crumbs title="科室关联维护-添加关联" class="topBack" :param="$route.params" linkTo="DeptManage"></crumbs>
+    <div class="AddChemicalAndCommonMappingBox clearfix">
+      <div class="titleBox clearfix">
+        <p class="title">医院术语</p>
+        <p class="title">标准术语</p>
+      </div>
+      <div class="leftBox clearfix">
+        <div class="itemLabel clearfix">
+          <label class="itemLabelName">科室名称</label>
+          <input class="searchInput" type="text" v-model="hisName" />
+        </div>
+        <div class="itemLabel clearfix">
+          <label class="itemLabelName">科室名称预览:</label>
+          <span class="selectItemName">{{hisName}}</span>
+        </div>
+      </div>
+      <div class="midBox">
+        <img class="midLogo" src="../../../images/relation.png" alt />
+        <p class="midTitle">相互关联</p>
+      </div>
+      <div class="rightBox">
+        <div class="itemLabel">
+          <label class="itemLabelName">科室名称</label>
+          <input class="searchInput" @focus="focuInput" type="text" v-model="uniqueText" />
+          <span class="searchName" @click="searchMealItem(3)">搜索</span>
+          <ul
+            v-if="showUniqueNameList&&uniqueNameList.length >0"
+            class="itemList uniqueNameList"
+            ref="uniqueNameList"
+          >
+            <li
+              v-for="item in uniqueNameList"
+              class="mealNameItem ellipsis"
+              :title="item"
+              @click="selectUniqueName(item)"
+              :key="item"
+            >{{item}}</li>
+          </ul>
+        </div>
+        <div class="itemLabel">
+          <!-- <label class="itemLabelName isRequired">诊断名称预览:</label> -->
+          <label class="itemLabelName">科室名称预览:</label>
+          <span class="selectItemName">{{form.uniqueName}}</span>
+        </div>
+      </div>
+    </div>
+    <div class="btn">
+      <!-- <span class="sumbit" @click="submitForm">建立关联</span> -->
+      <el-button type="primary" :disabled="saveDisable" @click="submitForm">建立关联</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import api from '@api/icss.js';
+
+export default {
+  name: 'AddDept',
+  data() {
+    return {
+      hisName: '', //检查项目
+      itemText: '', //化验小项搜索文字内容
+      uniqueText: '', //公表项搜索文字内容
+      isEdit: false,
+      editId: '',
+      mealNameList: [],
+      itemNameList: [],
+      uniqueNameList: [],
+      showMealNameList: false,
+      showItemNameList: false,
+      showUniqueNameList: false,
+      form: {
+        mealName: '', //大项名称
+        mealId: '', //大项Id
+        itemName: '', //小项名称
+        itemId: '', //小项Id
+        uniqueName: '', //公表名称,必填
+        uniqueId: '' //公表项Id
+      },
+      saveDisable: false //保存按钮禁止点击
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data } = this.$route.params;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.uniqueText = data.uniqueName;
+      this.hisName = data.hisName;
+      this.form.uniqueName = data.uniqueName;
+    }
+  },
+  methods: {
+    close() {
+      this.mealNameList = [];
+      this.itemNameList = [];
+      this.uniqueNameList = [];
+      this.showSearchList();
+    },
+    // 搜索
+    searchMealItem(type) {
+      if (type == '1' || type == '2') {
+        this.getTagList(type);
+      } else if (type == '3') {
+        // 搜索标准术语列表
+        this.getAllLisConcept();
+      }
+    },
+   
+    // 标准术语搜索列表
+    getAllLisConcept() {
+      let params = {
+        type: 7,  //科室
+        inputStr: this.uniqueText,
+        sex: 3,
+        age: 0
+      };
+      if (!params.inputStr) {
+        return;
+      }
+      api.retrievalSearch(params).then(res => {
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.deptNames;
+          this.showSearchList('showUniqueNameList');
+        }
+      });
+    },
+
+    // 获取焦点搜索
+    focuInput() {
+      this.showSearchList();
+    },
+
+    // 显示搜索列表数据
+    showSearchList(type) {
+      this.showMealNameList = false;
+      this.showItemNameList = false;
+      this.showUniqueNameList = false;
+      if (type === 'showMealNameList') {
+        this.showMealNameList = true;
+      } else if (type === 'showItemNameList') {
+        this.showItemNameList = true;
+      } else if (type === 'showUniqueNameList') {
+        this.showUniqueNameList = true;
+      }
+    },
+    selectMealName(item) {
+      this.form.mealName = item.conceptName;
+      this.form.mealId = item.conceptId;
+      // this.$refs['mealNameList'].style.display='none'
+      this.hisName = '';
+      this.mealNameList = [];
+    },
+    selectItemName(item) {
+      this.form.itemName = item.conceptName;
+      this.form.itemId = item.conceptId;
+      this.itemText = '';
+      this.itemNameList = [];
+    },
+    // 选中诊断标准术语
+    selectUniqueName(item) {
+      this.form.uniqueName = item;
+      this.uniqueNameList = [];
+    },
+    // 初始化表单数据
+    initForm() {
+      this.form.uniqueName = '';
+      this.hisName = '';
+      this.uniqueText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      const { hisName } = this;
+      const { uniqueName } = this.form;
+      if (!hisName || !uniqueName) {
+        this.warning('请填写相关数据');
+        return;
+      }
+      let params = {
+        hisName: hisName,
+        uniqueName: uniqueName
+      };
+      this.showSaveDialog(params);
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .deptIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '关联建立成功', 'success');
+          } else {
+            // 已存在,提示修改
+            // this.showConfirmDialog('该关联已存在是否替换旧的关系信息', () => {
+            //   this.saveLisMapping(params, '关联建立成功', 'success');
+            // });
+            this.warning('该条关联已存在,请重新编辑!');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateDeptRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          // this.$router.push({name: 'ChemicalAndCommonMapping'});
+          this.initForm();
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+<style lang="less">
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  // .groupTitle {
+  //     width: calc(100% - 50px);
+  //     height: 40px;
+  //     background: #fff;
+  //     padding: 0 20px 0 30px;
+  //     margin-bottom: 20px;
+  //     line-height: 40px;
+  //     position: relative;
+  //     z-index: 5;
+
+  // }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    font-size: 14px;
+  }
+  .midBox {
+    width: 6%;
+    padding: 50px 0 0 0;
+    text-align: center;
+  }
+  .midTitle {
+    width: 40px;
+    margin: 0 auto;
+  }
+  .midLogo {
+    margin: 0 auto;
+  }
+  .leftBox,
+  .rightBox {
+    border: 1px solid #a9a9a9;
+    padding: 20px 20px;
+  }
+  .itemLabel {
+    width: 100%;
+    min-height: 50px;
+    line-height: 50px;
+    position: relative;
+  }
+  .itemLabelName,
+  .searchInput,
+  .searchName {
+    float: left;
+    color: #606266;
+  }
+  .itemLabelName {
+    width: 150px;
+  }
+  .isRequired::before {
+    content: '*';
+    color: red;
+  }
+  .searchInput,
+  .mealNameItem {
+    padding: 0 5px;
+  }
+  .searchInput,
+  .searchName {
+    display: inline-block;
+    height: 32px;
+    line-height: 32px;
+    border: 1px solid #a9a9a9;
+    margin: 8px 0 0 0;
+  }
+
+  .searchName {
+    text-align: center;
+    border-left: none;
+    cursor: pointer;
+    padding: 0 12px;
+    font-size: 16px;
+  }
+  .itemList {
+    position: absolute;
+    background: #fff;
+    width: 162px;
+    max-height: 150px;
+    border: 1px solid #a9a9a9;
+    left: 150px;
+    top: 42px;
+    z-index: 2;
+    overflow-y: auto;
+  }
+  .itemList {
+    width: calc(100% - 131px);
+  }
+  .mealNameItem {
+    height: 30px;
+    line-height: 30px;
+    font-size: 14px;
+    cursor: pointer;
+  }
+  .mealNameItem:hover {
+    background: #f5f7fa;
+  }
+  .selectItemName {
+    display: inline-block;
+    width: calc(100% - 160px);
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .sumbit {
+    position: absolute;
+    display: inline-block;
+    width: 80px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #a9a9a9;
+    text-align: center;
+    right: 100px;
+  }
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
+    }
+  }
+}
+</style>

+ 331 - 0
src/components/icss/dept/DeptManage.vue

@@ -0,0 +1,331 @@
+<template>
+  <div>
+    <crumbs title="科室关联维护" style="min-width: 980px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <el-button size="mini" @click="importPage">导入</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>
+          <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="uniqueCode"
+          label="对应项编码"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准科室名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination">
+        <el-pagination
+          :current-page.sync="currentPage"
+          @current-change="currentChange"
+          background
+          :page-size="pageSize"
+          :page-sizes="pageSizeArr"
+          @size-change="handleSizeChange"
+          :layout="pageLayout"
+          :total="total"
+        ></el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'DeptManage', 
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getDeptPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: ''
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddDept', 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: 'AddDept',
+        params: Object.assign(pam, { isEdit: true, data: item })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteDeptRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$confirm('确定要导出全部科室关联数据吗?', '', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'leftbtn',
+        customClass: 'exportBox',
+        title: '导出数据',
+        beforeClose: (action, instance, done) => {
+          if (action === 'confirm') {
+            // instance.confirmButtonLoading = true;
+            instance.confirmButtonText = '导出中...';
+            api.exportDeptRecord().then(res => {
+              if (res.status === 200) {
+                setTimeout(() => {
+                  utils.downloadExportedData(res.data, '科室关联数据.xls');
+                  done();
+                }, 1500);
+              }
+            });
+          } else {
+            done();
+          }
+        }
+      })
+        .then(() => {
+          this.$message({ message: '导出成功', type: 'success' });
+        })
+        .catch(() => {
+          this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+
+    // 跳转至导入页面
+    importPage() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'ImportDeptRecord', params: pam });
+      // this.$router.push({ name: 'ImportDiseaseRecord'});
+    }
+  }
+};
+</script>
+
+
+<style lang="less">
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.exportBox {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    text-align: center;
+  }
+  /deep/ .el-message-box__btns {
+    text-align: center;
+    margin-bottom: 24px;
+  }
+  /deep/ .leftbtn {
+    margin-right: 46px;
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+}
+</style>

+ 166 - 0
src/components/icss/dept/ImportDeptRecord.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="importDisWrapper clearfix">
+    <crumbs
+      title="科室关联维护-导入关联"
+      class="topBack"
+      :param="$route.params"
+      linkTo="DeptManage"
+    ></crumbs>
+    <div class="importDisBox">
+      <P>
+        数据导入后,
+        <span :style="{color: '#D9001B'}">将删除原有数据,替换为导入的新数据。</span>请确保导入的内容为所需的全部关联。
+      </P>
+      <P>建议您先下载现有全部数据,在此基础上新增或修改数据。</P>
+      <div>
+        <span>科室关联数据</span>
+        <span class="down" @click="exportData">下载</span>
+      </div>
+      <div class="upload">
+        <el-input
+          placeholder="点击上传文件"
+          suffix-icon="el-icon-folder-opened"
+          @click.native="uploadClick"
+          v-model="fileName"
+          disabled
+        ></el-input>
+
+        <div>
+          <el-button size="small" @click="handleUpload">{{uploadInfo}}</el-button>
+        </div>
+        <input
+          type="file"
+          name="uploadfile "
+          id="upFile"
+          @change="uploadFile($event)"
+          accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+        />
+      </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 {
+  data() {
+    return {
+      fileName: '',
+      formData: {},
+      headers: {},
+      uploadInfo: '开始导入'
+    };
+  },
+  created() {},
+  methods: {
+    // 导出现有全部数据
+    exportData() {
+      api
+        .exportDeptRecord()
+        .then(res => {
+          if (res.status === 200) {
+            utils.downloadExportedData(res.data, '科室关联数据.xls');
+            this.$message({ message: '导出成功', type: 'success' });
+          }
+        })
+        .catch(err => {
+          this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+
+    uploadClick() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      this.fileName = e.target.files[0].name; // 表单同步显示
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      this.formData = formData;
+      this.header = header;
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+
+    // 上传文件
+    handleUpload() {
+      if (!this.fileName) {
+        this.$message('请先选择上传文件');
+        return;
+      }
+      this.uploadInfo = '导入中...';
+      api.importDeptRecord(this.formData, this.header).then(res => {
+        if (res.status === 200) {
+          this.fileName = '';
+          this.formData = {};
+          this.$message({
+            message: '上传成功',
+            type: 'success'
+          });
+          setTimeout(() => {
+            this.uploadInfo = '开始导入';
+          }, 300);
+        } else {
+          this.fileName = '';
+          this.formData = {};
+          this.$message({
+            message: '上传失败',
+            type: 'error'
+          });
+          setTimeout(() => {
+            this.uploadInfo = '开始导入';
+          }, 300);
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="less">
+.importDisWrapper {
+  min-width: 940px;
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .importDisBox {
+    padding: 20px 60px 120px 60px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+    p,
+    span {
+      font-size: 14px;
+    }
+    .down {
+      color: #85a7f1;
+      margin-left: 48px;
+      line-height: 48px;
+      cursor: pointer;
+    }
+  }
+  .upload {
+    .el-input {
+      width: 240px;
+    }
+    .el-button {
+      margin-left: 170px;
+      margin-top: 20px;
+    }
+    #upFile {
+      display: none !important;
+    }
+  }
+}
+</style>

+ 1 - 0
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -34,6 +34,7 @@
         <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"

+ 1 - 0
src/components/icss/drug/DrugManage.vue

@@ -34,6 +34,7 @@
         <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"

+ 412 - 0
src/components/icss/fusion/AddFusion.vue

@@ -0,0 +1,412 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
+    <crumbs title="血库关联维护-添加关联" class="topBack" :param="$route.params" linkTo="Fusion"></crumbs>
+    <div class="AddChemicalAndCommonMappingBox clearfix">
+      <div class="titleBox clearfix">
+        <p class="title">医院术语</p>
+        <p class="title">标准术语</p>
+      </div>
+      <div class="leftBox clearfix">
+        <div class="itemLabel clearfix">
+          <label class="itemLabelName">用血类型</label>
+          <input class="searchInput" type="text" v-model="hisName" />
+        </div>
+        <div class="itemLabel clearfix">
+          <label class="itemLabelName">用血类型预览:</label>
+          <span class="selectItemName">{{hisName}}</span>
+        </div>
+      </div>
+      <div class="midBox">
+        <img class="midLogo" src="../../../images/relation.png" alt />
+        <p class="midTitle">相互关联</p>
+      </div>
+      <div class="rightBox">
+        <div class="itemLabel">
+          <label class="itemLabelName">用血类型</label>
+          <input class="searchInput" @focus="focuInput" type="text" v-model="uniqueText" />
+          <span class="searchName" @click="searchMealItem(3)">搜索</span>
+          <ul
+            v-if="showUniqueNameList&&uniqueNameList.length >0"
+            class="itemList uniqueNameList"
+            ref="uniqueNameList"
+          >
+            <li
+              v-for="item in uniqueNameList"
+              class="mealNameItem ellipsis"
+              :title="item"
+              @click="selectUniqueName(item)"
+              :key="item"
+            >{{item}}</li>
+          </ul>
+        </div>
+        <div class="itemLabel">
+          <!-- <label class="itemLabelName isRequired">诊断名称预览:</label> -->
+          <label class="itemLabelName">用血类型预览:</label>
+          <span class="selectItemName">{{form.uniqueName}}</span>
+        </div>
+      </div>
+    </div>
+    <div class="btn">
+      <!-- <span class="sumbit" @click="submitForm">建立关联</span> -->
+      <el-button type="primary" :disabled="saveDisable" @click="submitForm">建立关联</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import api from '@api/icss.js';
+
+export default {
+  name: 'AddFusion',
+  data() {
+    return {
+      hisName: '', //检查项目
+      itemText: '', //化验小项搜索文字内容
+      uniqueText: '', //公表项搜索文字内容
+      isEdit: false,
+      editId: '',
+      mealNameList: [],
+      itemNameList: [],
+      uniqueNameList: [],
+      showMealNameList: false,
+      showItemNameList: false,
+      showUniqueNameList: false,
+      form: {
+        mealName: '', //大项名称
+        mealId: '', //大项Id
+        itemName: '', //小项名称
+        itemId: '', //小项Id
+        uniqueName: '', //公表名称,必填
+        uniqueId: '' //公表项Id
+      },
+      saveDisable: false //保存按钮禁止点击
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data } = this.$route.params;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.uniqueText = data.uniqueName;
+      this.hisName = data.hisName;
+      this.form.uniqueName = data.uniqueName;
+    }
+  },
+  methods: {
+    close() {
+      this.mealNameList = [];
+      this.itemNameList = [];
+      this.uniqueNameList = [];
+      this.showSearchList();
+    },
+    // 搜索
+    searchMealItem(type) {
+      if (type == '1' || type == '2') {
+        this.getTagList(type);
+      } else if (type == '3') {
+        // 搜索标准术语列表
+        this.getAllLisConcept();
+      }
+    },
+
+
+    // 标准术语搜索列表
+    getAllLisConcept() {
+      let params = {
+        type: 8,  //血液
+        inputStr: this.uniqueText,
+        sex: 3,
+        age: 0
+      };
+      if (!params.inputStr) {
+        return;
+      }
+      api.retrievalSearch(params).then(res => {
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.transfusionNames;
+          this.showSearchList('showUniqueNameList');
+        }
+      });
+    },
+
+    // 获取焦点搜索
+    focuInput() {
+      this.showSearchList();
+    },
+
+    // 显示搜索列表数据
+    showSearchList(type) {
+      this.showMealNameList = false;
+      this.showItemNameList = false;
+      this.showUniqueNameList = false;
+      if (type === 'showMealNameList') {
+        this.showMealNameList = true;
+      } else if (type === 'showItemNameList') {
+        this.showItemNameList = true;
+      } else if (type === 'showUniqueNameList') {
+        this.showUniqueNameList = true;
+      }
+    },
+    selectMealName(item) {
+      this.form.mealName = item.conceptName;
+      this.form.mealId = item.conceptId;
+      // this.$refs['mealNameList'].style.display='none'
+      this.hisName = '';
+      this.mealNameList = [];
+    },
+    selectItemName(item) {
+      this.form.itemName = item.conceptName;
+      this.form.itemId = item.conceptId;
+      this.itemText = '';
+      this.itemNameList = [];
+    },
+    // 选中诊断标准术语
+    selectUniqueName(item) {
+      this.form.uniqueName = item;
+      this.uniqueNameList = [];
+    },
+    // 初始化表单数据
+    initForm() {
+      this.form.uniqueName = '';
+      this.hisName = '';
+      this.uniqueText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      const { hisName } = this;
+      const { uniqueName } = this.form;
+      if (!hisName || !uniqueName) {
+        this.warning('请填写相关数据');
+        return;
+      }
+      let params = {
+        hisName: hisName,
+        uniqueName: uniqueName
+      };
+      this.showSaveDialog(params);
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .fusionIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '关联建立成功', 'success');
+          } else {
+            // 已存在,提示修改
+            // this.showConfirmDialog('该关联已存在是否替换旧的关系信息', () => {
+            //   this.saveLisMapping(params, '关联建立成功', 'success');
+            // });
+            this.warning('该条关联已存在,请重新编辑!');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateFusionRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          // this.$router.push({name: 'ChemicalAndCommonMapping'});
+          this.initForm();
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+<style lang="less">
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  // .groupTitle {
+  //     width: calc(100% - 50px);
+  //     height: 40px;
+  //     background: #fff;
+  //     padding: 0 20px 0 30px;
+  //     margin-bottom: 20px;
+  //     line-height: 40px;
+  //     position: relative;
+  //     z-index: 5;
+
+  // }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    font-size: 14px;
+  }
+  .midBox {
+    width: 6%;
+    padding: 50px 0 0 0;
+    text-align: center;
+  }
+  .midTitle {
+    width: 40px;
+    margin: 0 auto;
+  }
+  .midLogo {
+    margin: 0 auto;
+  }
+  .leftBox,
+  .rightBox {
+    border: 1px solid #a9a9a9;
+    padding: 20px 20px;
+  }
+  .itemLabel {
+    width: 100%;
+    min-height: 50px;
+    line-height: 50px;
+    position: relative;
+  }
+  .itemLabelName,
+  .searchInput,
+  .searchName {
+    float: left;
+    color: #606266;
+  }
+  .itemLabelName {
+    width: 150px;
+  }
+  .isRequired::before {
+    content: '*';
+    color: red;
+  }
+  .searchInput,
+  .mealNameItem {
+    padding: 0 5px;
+  }
+  .searchInput,
+  .searchName {
+    display: inline-block;
+    height: 32px;
+    line-height: 32px;
+    border: 1px solid #a9a9a9;
+    margin: 8px 0 0 0;
+  }
+
+  .searchName {
+    text-align: center;
+    border-left: none;
+    cursor: pointer;
+    padding: 0 12px;
+    font-size: 16px;
+  }
+  .itemList {
+    position: absolute;
+    background: #fff;
+    width: 162px;
+    max-height: 150px;
+    border: 1px solid #a9a9a9;
+    left: 150px;
+    top: 42px;
+    z-index: 2;
+    overflow-y: auto;
+  }
+  .itemList {
+    width: calc(100% - 131px);
+  }
+  .mealNameItem {
+    height: 30px;
+    line-height: 30px;
+    font-size: 14px;
+    cursor: pointer;
+  }
+  .mealNameItem:hover {
+    background: #f5f7fa;
+  }
+  .selectItemName {
+    display: inline-block;
+    width: calc(100% - 160px);
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .sumbit {
+    position: absolute;
+    display: inline-block;
+    width: 80px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #a9a9a9;
+    text-align: center;
+    right: 100px;
+  }
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
+    }
+  }
+}
+</style>

+ 332 - 0
src/components/icss/fusion/Fusion.vue

@@ -0,0 +1,332 @@
+<template>
+  <div>
+    <crumbs title="输血关联维护" style="min-width: 980px">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item>
+          <el-button size="mini" @click="importPage">导入</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>
+          <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="mealName" label="化验大项" show-overflow-tooltip></el-table-column> -->
+        <el-table-column :resizable="false" prop="hisName" label="医院用血类型" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="uniqueCode"
+          label="对应项编码"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准用血术语" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination">
+        <el-pagination
+          :current-page.sync="currentPage"
+          @current-change="currentChange"
+          background
+          :page-size="pageSize"
+          :page-sizes="pageSizeArr"
+          @size-change="handleSizeChange"
+          :layout="pageLayout"
+          :total="total"
+        ></el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@api/icss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'Fusion', //化验大小项和公表维护
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '' //标准诊断名称
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0
+    };
+  },
+  created() {
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getFusionPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: ''
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddFusion', params: 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: 'AddFusion',
+        params: Object.assign(pam, { isEdit: true, data: item })
+      });
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteFusionRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$confirm('确定要导出全部输血关联数据吗?', '', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        cancelButtonClass: 'leftbtn',
+        customClass: 'exportBox',
+        title: '导出数据',
+        beforeClose: (action, instance, done) => {
+          if (action === 'confirm') {
+            // instance.confirmButtonLoading = true;
+            instance.confirmButtonText = '导出中...';
+            api.exportFusionRecord().then(res => {
+              if (res.status === 200) {
+                setTimeout(() => {
+                  utils.downloadExportedData(res.data, '输血关联数据.xls');
+                  done();
+                }, 1500);
+              }
+            });
+          } else {
+            done();
+          }
+        }
+      })
+        .then(() => {
+          this.$message({ message: '导出成功', type: 'success' });
+        })
+        .catch(() => {
+          this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+
+    // 跳转至导入页面
+    importPage() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'ImportFusionRecord', params: pam });
+      // this.$router.push({ name: 'ImportDiseaseRecord'});
+    }
+  }
+};
+</script>
+
+
+<style lang="less">
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.exportBox {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    text-align: center;
+  }
+  /deep/ .el-message-box__btns {
+    text-align: center;
+    margin-bottom: 24px;
+  }
+  /deep/ .leftbtn {
+    margin-right: 46px;
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+}
+</style>

+ 166 - 0
src/components/icss/fusion/ImportFusionRecord.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="importDisWrapper clearfix">
+    <crumbs
+      title="血库关联维护-导入关联"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Fusion"
+    ></crumbs>
+    <div class="importDisBox">
+      <P>
+        数据导入后,
+        <span :style="{color: '#D9001B'}">将删除原有数据,替换为导入的新数据。</span>请确保导入的内容为所需的全部关联。
+      </P>
+      <P>建议您先下载现有全部数据,在此基础上新增或修改数据。</P>
+      <div>
+        <span>血库关联数据</span>
+        <span class="down" @click="exportData">下载</span>
+      </div>
+      <div class="upload">
+        <el-input
+          placeholder="点击上传文件"
+          suffix-icon="el-icon-folder-opened"
+          @click.native="uploadClick"
+          v-model="fileName"
+          disabled
+        ></el-input>
+
+        <div>
+          <el-button size="small" @click="handleUpload">{{uploadInfo}}</el-button>
+        </div>
+        <input
+          type="file"
+          name="uploadfile "
+          id="upFile"
+          @change="uploadFile($event)"
+          accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+        />
+      </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 {
+  data() {
+    return {
+      fileName: '',
+      formData: {},
+      headers: {},
+      uploadInfo: '开始导入'
+    };
+  },
+  created() {},
+  methods: {
+    // 导出现有全部数据
+    exportData() {
+      api
+        .exportFusionRecord()
+        .then(res => {
+          if (res.status === 200) {
+            utils.downloadExportedData(res.data, '血库关联数据.xls');
+            this.$message({ message: '导出成功', type: 'success' });
+          }
+        })
+        .catch(err => {
+          this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+
+    uploadClick() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      this.fileName = e.target.files[0].name; // 表单同步显示
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      this.formData = formData;
+      this.header = header;
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+
+    // 上传文件
+    handleUpload() {
+      if (!this.fileName) {
+        this.$message('请先选择上传文件');
+        return;
+      }
+      this.uploadInfo = '导入中...';
+      api.importFusionRecord(this.formData, this.header).then(res => {
+        if (res.status === 200) {
+          this.fileName = '';
+          this.formData = {};
+          this.$message({
+            message: '上传成功',
+            type: 'success'
+          });
+          setTimeout(() => {
+            this.uploadInfo = '开始导入';
+          }, 300);
+        } else {
+          this.fileName = '';
+          this.formData = {};
+          this.$message({
+            message: '上传失败',
+            type: 'error'
+          });
+          setTimeout(() => {
+            this.uploadInfo = '开始导入';
+          }, 300);
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="less">
+.importDisWrapper {
+  min-width: 940px;
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .importDisBox {
+    padding: 20px 60px 120px 60px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+    p,
+    span {
+      font-size: 14px;
+    }
+    .down {
+      color: #85a7f1;
+      margin-left: 48px;
+      line-height: 48px;
+      cursor: pointer;
+    }
+  }
+  .upload {
+    .el-input {
+      width: 240px;
+    }
+    .el-button {
+      margin-left: 170px;
+      margin-top: 20px;
+    }
+    #upFile {
+      display: none !important;
+    }
+  }
+}
+</style>

+ 1 - 1
src/components/icss/lis/AddLis.vue

@@ -122,7 +122,7 @@ export default {
     },
     // 标准术语搜索列表
     getAllLisConcept(type) {
-      console.log(type ,type,'================');
+      // console.log(type ,type,'================');
       let params = {
         type: type, //手术/操作
         inputStr: this.uniqueText,

+ 1 - 0
src/components/icss/lis/Lis.vue

@@ -32,6 +32,7 @@
         <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"

+ 1 - 0
src/components/icss/operation/Operation.vue

@@ -34,6 +34,7 @@
         <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"

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

@@ -34,6 +34,7 @@
         <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"

+ 55 - 28
src/routes.js

@@ -23,43 +23,70 @@ import Operation from '@components/icss/operation/Operation.vue'; //手术/操
 import AddOperation from '@components/icss/operation/AddOperation.vue';  //手术/操作关联维护--添加关联
 import ImportOperationRecord from '@components/icss/operation/ImportOperationRecord.vue';  //手术/操作关联维护--导入数据
 
+import Fusion from '@components/icss/fusion/Fusion.vue'; //输血关联维护
+import AddFusion from '@components/icss/fusion/AddFusion.vue';  //输血关联维护--添加关联
+import ImportFusionRecord from '@components/icss/fusion/ImportFusionRecord.vue';  //输血关联维护--导入数据
 
+import DeptManage from '@components/icss/dept/DeptManage.vue'; //科室关联维护
+import AddDept from '@components/icss/dept/AddDept.vue';  //科室关联维护--添加关联
+import ImportDeptRecord from '@components/icss/dept/ImportDeptRecord.vue';  //科室关联维护--导入数据
+
+import Correlation from '@components/icss/correlation/Correlation.vue';  //关联维护设置
 
 export default [
   {
     path: '/',
     name: 'login',
-    component: Login
+    component: Login,
   },
-  {//朗通后台
+  {
+    //朗通后台
     path: '/admin',
     component: HomePage,
     meta: {
-      requireAuth: true
+      requireAuth: true,
     },
     children: [
-      {path:'YXSYK-JTZSWH',component:MedicinePrompt,name:'MedicinePrompt'},         //医学术语提示信息维护
-      {path:'LT-YXSYKWH-TJYXSYJTZS',component:AddMedicinePrompt,name:'AddMedicinePrompt'},         //医学术语提示信息维护添加
-
-      {path:'YXSYK-ZDGLWH',component:ChemicalAndCommonMapping,name:'ChemicalAndCommonMapping'},  //诊断关联维护
-      {path:'LT-ZDGLWH-TJHYDXXYGBXDY',component:AddChemicalAndCommonMapping,name:'AddChemicalAndCommonMapping'},  //诊断关联维护--添加关联
-      {path:'LT-ZDGLWH-DRSJ',component:ImportDiseaseRecord,name:'ImportDiseaseRecord'},  //诊断关联维护--导入数据
-
-      {path:'YXSYK-JYGLWH',component:Lis,name:'Lis'},  //检验关联维护
-      {path:'LT-JYGLWH-TJHYDXXYGBXDY',component:AddLis,name:'AddLis'},  //检验关联维护--添加关联
-      {path:'LT-JYGLWH-DRSJ',component:ImportLisRecord,name:'ImportLisRecord'},  //检验关联维护--导入数据
-
-      {path:'YXSYK-JCGLWH',component:Pacs,name:'Pacs'},  //检查关联维护
-      {path:'LT-JCGLWH-TJHYDXXYGBXDY',component:AddPacs,name:'AddPacs'},  //检查关联维护--添加关联
-      {path:'LT-JCGLWH-DRSJ',component:ImportPacsRecord,name:'ImportPacsRecord'},  //检查关联维护--导入数据
-
-      {path:'YXSYK-YPGLWH',component:DrugManage,name:'DrugManage'},  //药品关联维护
-      {path:'LT-YPGLWH-TJHYDXXYGBXDY',component:AddDrug,name:'AddDrug'},  //药品关联维护--添加关联
-      {path:'LT-YPGLWH-DRSJ',component:ImportDrugRecord,name:'ImportDrugRecord'},  //药品关联维护--导入数据
-
-      {path:'YXSYK-SSCZGLWH',component:Operation,name:'Operation'},  //手术/操作关联维护
-      {path:'LT-SSCZGLWH-TJHYDXXYGBXDY',component:AddOperation,name:'AddOperation'},  //手术/操作关联维护--添加关联
-      {path:'LT-SSCZGLWH-DRSJ',component:ImportOperationRecord,name:'ImportOperationRecord'},  //手术/操作关联维护--导入数据
-    ]
-  }
-]
+      { path: 'YXSYK-JTZSWH', component: MedicinePrompt, name: 'MedicinePrompt' }, //医学术语提示信息维护
+      { path: 'LT-YXSYKWH-TJYXSYJTZS', component: AddMedicinePrompt, name: 'AddMedicinePrompt' }, //医学术语提示信息维护添加
+
+      {
+        path: 'YXSYK-ZDGLWH',
+        component: ChemicalAndCommonMapping,
+        name: 'ChemicalAndCommonMapping',
+      }, //诊断关联维护
+      {
+        path: 'LT-ZDGLWH-TJHYDXXYGBXDY',
+        component: AddChemicalAndCommonMapping,
+        name: 'AddChemicalAndCommonMapping',
+      }, //诊断关联维护--添加关联
+      { path: 'LT-ZDGLWH-DRSJ', component: ImportDiseaseRecord, name: 'ImportDiseaseRecord' }, //诊断关联维护--导入数据
+
+      { path: 'YXSYK-JYGLWH', component: Lis, name: 'Lis' }, //检验关联维护
+      { path: 'LT-JYGLWH-TJHYDXXYGBXDY', component: AddLis, name: 'AddLis' }, //检验关联维护--添加关联
+      { path: 'LT-JYGLWH-DRSJ', component: ImportLisRecord, name: 'ImportLisRecord' }, //检验关联维护--导入数据
+
+      { path: 'YXSYK-JCGLWH', component: Pacs, name: 'Pacs' }, //检查关联维护
+      { path: 'LT-JCGLWH-TJHYDXXYGBXDY', component: AddPacs, name: 'AddPacs' }, //检查关联维护--添加关联
+      { path: 'LT-JCGLWH-DRSJ', component: ImportPacsRecord, name: 'ImportPacsRecord' }, //检查关联维护--导入数据
+
+      { path: 'YXSYK-YPGLWH', component: DrugManage, name: 'DrugManage' }, //药品关联维护
+      { path: 'LT-YPGLWH-TJHYDXXYGBXDY', component: AddDrug, name: 'AddDrug' }, //药品关联维护--添加关联
+      { path: 'LT-YPGLWH-DRSJ', component: ImportDrugRecord, name: 'ImportDrugRecord' }, //药品关联维护--导入数据
+
+      { path: 'YXSYK-SSCZGLWH', component: Operation, name: 'Operation' }, //手术/操作关联维护
+      { path: 'LT-SSCZGLWH-TJHYDXXYGBXDY', component: AddOperation, name: 'AddOperation' }, //手术/操作关联维护--添加关联
+      { path: 'LT-SSCZGLWH-DRSJ', component: ImportOperationRecord, name: 'ImportOperationRecord' }, //手术/操作关联维护--导入数据
+
+      { path: 'YXSYK-SXGLWH', component: Fusion, name: 'Fusion' }, //输血关联维护
+      { path: 'LT-SXGLWH-TJHYDXXYGBXDY', component: AddFusion, name: 'AddFusion' }, //输血关联维护--添加关联
+      { path: 'LT-SXGLWH-DRSJ', component: ImportFusionRecord, name: 'ImportFusionRecord' }, //输血关联维护--导入数据
+
+      { path: 'YXSYK-KSGLWH', component: DeptManage, name: 'DeptManage' }, //科室关联维护
+      { path: 'LT-KSGLWH-TJHYDXXYGBXDY', component: AddDept, name: 'AddDept' }, //科室关联维护--添加关联
+      { path: 'LT-KSGLWH-DRSJ', component: ImportDeptRecord, name: 'ImportDeptRecord' }, //科室关联维护--导入数据
+
+      { path: 'YXSYK-GLWH', component: Correlation, name: 'Correlation' }, //关联维护设置
+    ],
+  },
+];