morphone1995 преди 4 години
родител
ревизия
fd745e57de

+ 18 - 1
src/api/config.js

@@ -24,8 +24,25 @@ export default {
     'deleteDiseaseRecord': '/tran/diseaseConfig/deleteRecord',   //诊断-删除映射关系
     'exportDiseaseRecord': '/tran/diseaseConfig/exportExcel',   //诊断-数据导出
     'importDiseaseRecord': '/tran/diseaseConfig/importExcel',   //诊断-数据导入
+    'getpacsPage': '/tran/pacsConfig/getPage',   //检查列表
+    'pacsIsExistRecord': '/tran/pacsConfig/isExistRecord',   //检查-映射关系是否已存在
+    'saveOrUpdatePacsRecord': '/tran/pacsConfig/saveOrUpdateRecord',   //检查-保存或修改映射关系
+    'deletePacsRecord': '/tran/pacsConfig/deleteRecord',   //检查-删除映射关系
+    'exportPacsRecord': '/tran/pacsConfig/exportExcel',   //检查-数据导出
+    'importPacsRecord': '/tran/pacsConfig/importExcel',   //检查-数据导入
+    'getDrugPage': '/tran/drugConfig/getPage',   //药品列表
+    'drugIsExistRecord': '/tran/drugConfig/isExistRecord',   //药品-映射关系是否已存在
+    'saveOrUpdateDrugRecord': '/tran/drugConfig/saveOrUpdateRecord',   //药品-保存或修改映射关系
+    'deleteDrugRecord': '/tran/drugConfig/deleteRecord',   //药品-删除映射关系
+    'exportDrugRecord': '/tran/drugConfig/exportExcel',   //药品-数据导出
+    'importDrugRecord': '/tran/drugConfig/importExcel',   //药品-数据导入
 
-    
+    'getOperationPage': '/tran/operationConfig/getPage',   //手术/操作列表
+    'operationIsExistRecord': '/tran/operationConfig/isExistRecord',   //手术/操作-映射关系是否已存在
+    'saveOrUpdateOperationRecord': '/tran/operationConfig/saveOrUpdateRecord',   //手术/操作-保存或修改映射关系
+    'deleteOperationRecord': '/tran/operationConfig/deleteRecord',   //手术/操作-删除映射关系
+    'exportOperationRecord': '/tran/operationConfig/exportExcel',   //手术/操作-数据导出
+    'importOperationRecord': '/tran/operationConfig/importExcel',   //手术/操作-数据导入
 
 
     'getAccessdMenu': '/sys/user/getUserOrgMenu',  //获取左侧菜单项

+ 68 - 5
src/api/icss.js

@@ -12,10 +12,7 @@ export default {
   saveTermPrompts(param) {
     return axios.post(urls.saveConceptInfo, param);
   },
-  getLisMappingPage(param) {
-    //医学数据-化验大小项与公表项维护-列表
-    return axios.post(urls.getLisMappingPage, param);
-  },
+
   delLisMappingById(param) {
     //医学数据-化验大小项与公表项维护-单个删除
     return axios.post(urls.delLisMappingById, param);
@@ -45,7 +42,10 @@ export default {
     // 术语搜索
     return axios.post(urls.retrievalSearch, param);
   },
-
+  getLisMappingPage(param) {
+    //诊断列表-列表
+    return axios.post(urls.getLisMappingPage, param);
+  },
   diseaseIsExistRecord(param) {
     return axios.post(urls.diseaseIsExistRecord, param);
   },
@@ -63,4 +63,67 @@ export default {
   importDiseaseRecord(param) {
     return axios.post(urls.importDiseaseRecord, param);
   },
+  getpacsPage(param) {
+    //检查列表-列表
+    return axios.post(urls.getpacsPage, param);
+  },
+  pacsIsExistRecord(param) {
+    return axios.post(urls.pacsIsExistRecord, param);
+  },
+  saveOrUpdatePacsRecord(param) {
+    return axios.post(urls.saveOrUpdatePacsRecord, param);
+  },
+  deletePacsRecord(param) {
+    return axios.post(urls.deletePacsRecord, param);
+  },
+  exportPacsRecord(param) {
+    return axios.post(urls.exportPacsRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importPacsRecord(param) {
+    return axios.post(urls.importPacsRecord, param);
+  },
+  getDrugPage(param) {
+    //药品列表-列表
+    return axios.post(urls.getDrugPage, param);
+  },
+  drugIsExistRecord(param) {
+    return axios.post(urls.drugIsExistRecord, param);
+  },
+  saveOrUpdateDrugRecord(param) {
+    return axios.post(urls.saveOrUpdateDrugRecord, param);
+  },
+  deleteDrugRecord(param) {
+    return axios.post(urls.deleteDrugRecord, param);
+  },
+  exportDrugRecord(param) {
+    return axios.post(urls.exportDrugRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importDrugRecord(param) {
+    return axios.post(urls.importDrugRecord, param);
+  },
+  getOperationPage(param) {
+    //手术/操作列表-列表
+    return axios.post(urls.getOperationPage, param);
+  },
+  operationIsExistRecord(param) {
+    return axios.post(urls.operationIsExistRecord, param);
+  },
+  saveOrUpdateOperationRecord(param) {
+    return axios.post(urls.saveOrUpdateOperationRecord, param);
+  },
+  deleteOperationRecord(param) {
+    return axios.post(urls.deleteOperationRecord, param);
+  },
+  exportOperationRecord(param) {
+    return axios.post(urls.exportOperationRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importOperationRecord(param) {
+    return axios.post(urls.importOperationRecord, param);
+  },
 };

+ 437 - 0
src/components/icss/drug/AddDrug.vue

@@ -0,0 +1,437 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
+    <crumbs title="药品关联维护--添加关联" class="topBack" :param="$route.params" linkTo="DrugManage"></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.name"
+              @click="selectUniqueName(item)"
+              :key="item.name"
+            >{{item.name}}</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: 'AddDrug',
+  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();
+      }
+    },
+    getTagList(type) {
+      let param = {
+        relationPosition: 3
+      };
+      if (type == 1) {
+        param.name = this.hisName.trim();
+        param.typeId = 12;
+      } else if (type == 2) {
+        param.name = this.itemText.trim();
+        param.typeId = 13;
+      }
+      if (!param.name) {
+        return;
+      }
+      api.getConceptInfoAssay(param).then(res => {
+        if (res.data.code === '0') {
+          if (type == 1) {
+            this.mealNameList = res.data.data;
+            this.showSearchList('showMealNameList');
+          } else if (type == 2) {
+            this.itemNameList = res.data.data;
+            this.showSearchList('showItemNameList');
+          }
+        }
+      });
+    },
+
+    // 标准术语搜索列表
+    getAllLisConcept() {
+      let params = {
+        type: 5,  //药品
+        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.drugNames;
+          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.name;
+      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
+        .drugIsExistRecord(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.saveOrUpdateDrugRecord(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/drug/DrugManage.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="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>
+            <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: 'DrugManage', //化验大小项和公表维护
+  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.getDrugPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      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: 'AddDrug', 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: 'AddDrug',
+        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
+          .deleteDrugRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            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.exportDrugRecord().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: 'ImportDrugRecord', 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/drug/ImportDrugRecord.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="importDisWrapper clearfix">
+    <crumbs
+      title="药品关联维护-导入关联"
+      class="topBack"
+      :param="$route.params"
+      linkTo="DrugManage"
+    ></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
+        .exportDrugRecord()
+        .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.importDrugRecord(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>

+ 437 - 0
src/components/icss/operation/AddOperation.vue

@@ -0,0 +1,437 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
+    <crumbs title="药品关联维护--添加关联" class="topBack" :param="$route.params" linkTo="Operation"></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.name"
+              @click="selectUniqueName(item)"
+              :key="item.name"
+            >{{item.name}}</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: 'AddOperation',
+  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();
+      }
+    },
+    getTagList(type) {
+      let param = {
+        relationPosition: 3
+      };
+      if (type == 1) {
+        param.name = this.hisName.trim();
+        param.typeId = 12;
+      } else if (type == 2) {
+        param.name = this.itemText.trim();
+        param.typeId = 13;
+      }
+      if (!param.name) {
+        return;
+      }
+      api.getConceptInfoAssay(param).then(res => {
+        if (res.data.code === '0') {
+          if (type == 1) {
+            this.mealNameList = res.data.data;
+            this.showSearchList('showMealNameList');
+          } else if (type == 2) {
+            this.itemNameList = res.data.data;
+            this.showSearchList('showItemNameList');
+          }
+        }
+      });
+    },
+
+    // 标准术语搜索列表
+    getAllLisConcept() {
+      let params = {
+        type: 6,  //手术/操作
+        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.operationNames;
+          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.name;
+      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
+        .operationIsExistRecord(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.saveOrUpdateOperationRecord(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>

+ 166 - 0
src/components/icss/operation/ImportOperationRecord.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="importDisWrapper clearfix">
+    <crumbs
+      title="手术/操作关联维护-导入关联"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Operation"
+    ></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
+        .exportOperationRecord()
+        .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.importOperationRecord(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>

+ 331 - 0
src/components/icss/operation/Operation.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="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>
+            <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: 'Operation', //化验大小项和公表维护
+  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.getOperationPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      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: 'AddOperation', 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: 'AddOperation',
+        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
+          .deleteOperationRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            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.exportOperationRecord().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: 'ImportOperationRecord', 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>

+ 437 - 0
src/components/icss/pacs/AddPacs.vue

@@ -0,0 +1,437 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
+    <crumbs title="检查关联维护--添加关联" class="topBack" :param="$route.params" linkTo="Pacs"></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: 'AddPacs',
+  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();
+      }
+    },
+    getTagList(type) {
+      let param = {
+        relationPosition: 3
+      };
+      if (type == 1) {
+        param.name = this.hisName.trim();
+        param.typeId = 12;
+      } else if (type == 2) {
+        param.name = this.itemText.trim();
+        param.typeId = 13;
+      }
+      if (!param.name) {
+        return;
+      }
+      api.getConceptInfoAssay(param).then(res => {
+        if (res.data.code === '0') {
+          if (type == 1) {
+            this.mealNameList = res.data.data;
+            this.showSearchList('showMealNameList');
+          } else if (type == 2) {
+            this.itemNameList = res.data.data;
+            this.showSearchList('showItemNameList');
+          }
+        }
+      });
+    },
+
+    // 标准术语搜索列表
+    getAllLisConcept() {
+      let params = {
+        type: 3,  //辅检
+        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.pacsNames;
+          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
+        .pacsIsExistRecord(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.saveOrUpdatePacsRecord(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>

+ 166 - 0
src/components/icss/pacs/ImportPacsRecord.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="importDisWrapper clearfix">
+    <crumbs
+      title="检查关联维护-导入关联"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Pacs"
+    ></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
+        .exportPacsRecord()
+        .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.importPacsRecord(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>

+ 331 - 0
src/components/icss/pacs/Pacs.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="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>
+            <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: 'Pacs', //化验大小项和公表维护
+  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.getpacsPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      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: 'AddPacs', 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: 'AddPacs',
+        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
+          .deletePacsRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            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.exportPacsRecord().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: 'ImportPacsRecord', 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>

+ 30 - 0
src/routes.js

@@ -7,6 +7,19 @@ import ChemicalAndCommonMapping from '@components/icss/disease/ChemicalAndCommon
 import AddChemicalAndCommonMapping from '@components/icss/disease/AddChemicalAndCommonMapping.vue';  //诊断关联维护--添加关联
 import ImportDiseaseRecord from '@components/icss/disease/ImportDiseaseRecord.vue';  //诊断关联维护--导入数据
 
+import Pacs from '@components/icss/pacs/Pacs.vue'; //诊断关联维护
+import AddPacs from '@components/icss/pacs/AddPacs.vue';  //诊断关联维护--添加关联
+import ImportPacsRecord from '@components/icss/pacs/ImportPacsRecord.vue';  //诊断关联维护--导入数据
+
+import DrugManage from '@components/icss/drug/DrugManage.vue'; //药品关联维护
+import AddDrug from '@components/icss/drug/AddDrug.vue';  //药品关联维护--添加关联
+import ImportDrugRecord from '@components/icss/drug/ImportDrugRecord.vue';  //药品关联维护--导入数据
+
+import Operation from '@components/icss/operation/Operation.vue'; //手术/操作关联维护
+import AddOperation from '@components/icss/operation/AddOperation.vue';  //手术/操作关联维护--添加关联
+import ImportOperationRecord from '@components/icss/operation/ImportOperationRecord.vue';  //手术/操作关联维护--导入数据
+
+
 
 export default [
   {
@@ -23,9 +36,26 @@ export default [
     children: [
       {path:'YXSYK-JTZSWH',component:MedicinePrompt,name:'MedicinePrompt'},         //医学术语提示信息维护
       {path:'LT-YXSYKWH-TJYXSYJTZS',component:AddMedicinePrompt,name:'AddMedicinePrompt'},         //医学术语提示信息维护添加
+
       {path:'YXSYK-ZDGLWH',component:ChemicalAndCommonMapping,name:'ChemicalAndCommonMapping'},  //诊断关联维护
       {path:'LT-ZDGLWH-TJHYDXXYGBXDY',component:AddChemicalAndCommonMapping,name:'AddChemicalAndCommonMapping'},  //诊断关联维护--添加关联
       {path:'LT-ZDGLWH-DRSJ',component:ImportDiseaseRecord,name:'ImportDiseaseRecord'},  //诊断关联维护--导入数据
+
+      // {path:'YXSYK-JYGLWH',component:ChemicalAndCommonMapping,name:'ChemicalAndCommonMapping'},  //检验关联维护
+      // {path:'LT-JYGLWH-TJHYDXXYGBXDY',component:AddChemicalAndCommonMapping,name:'AddChemicalAndCommonMapping'},  //检验关联维护--添加关联
+      // {path:'LT-JYGLWH-DRSJ',component:ImportDiseaseRecord,name:'ImportDiseaseRecord'},  //检验关联维护--导入数据
+
+      {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'},  //手术/操作关联维护--导入数据
     ]
   }
 ]