소스 검색

诊断关联

morphone1995 4 년 전
부모
커밋
e2487e7c84

+ 12 - 1
src/api/config.js

@@ -12,11 +12,22 @@ export default {
     'getConceptKnowledge':'/api/knowledgeman/conceptDetail/getByConceptId',//术语静态知识详情
     'getAllConcept':'/api/knowledgeman/conceptDetail/index',   //医学术语--获取所有概念(标准术语)
 	  'saveConceptInfo':'/api/knowledgeman/conceptDetail/insertOrUpdate',   //保存术语静态知识
-    'getLisMappingPage': '/tran/diseaseConfig/getPage', //诊断
     'delLisMappingById': '/api/knowledgeman/lisMapping/delLisMappingById',  //医学数据-化验大小项与公表项维护-单个删除
     'getConceptInfoAssay': '/api/knowledgeman/concept/getAllForRelation',  //化验子项维护-搜索术语
     'getAllLisConcept':'api/knowledgeman/concept/getAllLisConcept',  //医学数据-化验大小项与公表项维护-获取所有化验公表项
     'hasLisMapping': '/api/knowledgeman/lisMapping/hasLisMapping',  //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
+
+    'retrievalSearch': '/demo/retrieval/index',   //术语检索
+    'getLisMappingPage': '/tran/diseaseConfig/getPage', //诊断列表
+    'diseaseIsExistRecord': '/tran/diseaseConfig/isExistRecord',   //诊断-映射关系是否已存在
+    'saveOrUpdateDiseaseRecord': '/tran/diseaseConfig/saveOrUpdateRecord',   //诊断-保存或修改映射关系
+    'deleteDiseaseRecord': '/tran/diseaseConfig/deleteRecord',   //诊断-删除映射关系
+    'exportDiseaseRecord': '/tran/diseaseConfig/exportExcel',   //诊断-数据导出
+    'importDiseaseRecord': '/tran/diseaseConfig/importExcel',   //诊断-数据导入
+
+    
+
+
     'getAccessdMenu': '/sys/user/getUserOrgMenu',  //获取左侧菜单项
     'delConceptInfo':'/api/knowledgeman/conceptDetail/delete',   //删除术语静态知识
     'login': '/sys/user/getJwt',

+ 62 - 34
src/api/icss.js

@@ -2,37 +2,65 @@ import axios from 'axios';
 import config from '@api/config.js';
 const urls = config.urls;
 export default {
-    getTremList(param){
-      return axios.post(urls.getConceptKnowledge,param);
-    },
-    getAllConcept(param) {  //医学术语--获取所有概念(标准术语)
-        return axios.post(urls.getAllConcept, param)
-    },
-    saveTermPrompts(param){
-      return axios.post(urls.saveConceptInfo,param);
-    },
-    getLisMappingPage(param) {  //医学数据-化验大小项与公表项维护-列表
-        return axios.post(urls.getLisMappingPage, param)
-    },
-    delLisMappingById(param) {  //医学数据-化验大小项与公表项维护-单个删除
-        return axios.post(urls.delLisMappingById, param)
-    },
-    getConceptInfoAssay(param) {
-        return axios.post(urls.getConceptInfoAssay, param)    //化验子项-搜索术语
-    },
-    getAllLisConcept(param) {   //医学数据-化验大小项与公表项维护-获取所有化验公表项
-        return axios.post(urls.getAllLisConcept, param)
-    },
-    saveLisMapping(param) {  //医学数据-化验大小项与公表项维护-新增
-        return axios.post(urls.saveLisMapping, param)
-    },
-    hasLisMapping(param) {  //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
-        return axios.post(urls.hasLisMapping, param)
-    },
-    delConceptInfo(param){
-      return axios.post(urls.delConceptInfo,param);
-    },
-    getConceptKnowledgeList(param){
-      return axios.post(urls.getConceptKnowledgeList,param);
-    },
-}
+  getTremList(param) {
+    return axios.post(urls.getConceptKnowledge, param);
+  },
+  getAllConcept(param) {
+    //医学术语--获取所有概念(标准术语)
+    return axios.post(urls.getAllConcept, param);
+  },
+  saveTermPrompts(param) {
+    return axios.post(urls.saveConceptInfo, param);
+  },
+  getLisMappingPage(param) {
+    //医学数据-化验大小项与公表项维护-列表
+    return axios.post(urls.getLisMappingPage, param);
+  },
+  delLisMappingById(param) {
+    //医学数据-化验大小项与公表项维护-单个删除
+    return axios.post(urls.delLisMappingById, param);
+  },
+  getConceptInfoAssay(param) {
+    return axios.post(urls.getConceptInfoAssay, param); //化验子项-搜索术语
+  },
+  getAllLisConcept(param) {
+    //医学数据-化验大小项与公表项维护-获取所有化验公表项
+    return axios.post(urls.getAllLisConcept, param);
+  },
+  saveLisMapping(param) {
+    //医学数据-化验大小项与公表项维护-新增
+    return axios.post(urls.saveLisMapping, param);
+  },
+  hasLisMapping(param) {
+    //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
+    return axios.post(urls.hasLisMapping, param);
+  },
+  delConceptInfo(param) {
+    return axios.post(urls.delConceptInfo, param);
+  },
+  getConceptKnowledgeList(param) {
+    return axios.post(urls.getConceptKnowledgeList, param);
+  },
+  retrievalSearch(param) {
+    // 术语搜索
+    return axios.post(urls.retrievalSearch, param);
+  },
+
+  diseaseIsExistRecord(param) {
+    return axios.post(urls.diseaseIsExistRecord, param);
+  },
+  saveOrUpdateDiseaseRecord(param) {
+    return axios.post(urls.saveOrUpdateDiseaseRecord, param);
+  },
+  deleteDiseaseRecord(param) {
+    return axios.post(urls.deleteDiseaseRecord, param);
+  },
+  exportDiseaseRecord(param) {
+    return axios.post(urls.exportDiseaseRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importDiseaseRecord(param) {
+    return axios.post(urls.importDiseaseRecord, param);
+  },
+};

+ 1 - 0
src/api/index.js

@@ -20,4 +20,5 @@ export default {
   getAccessdMenu() {
     return axios.post(urls.getAccessdMenu);
   },
+ 
 }

+ 0 - 473
src/components/icss/AddChemicalAndCommonMapping.vue

@@ -1,473 +0,0 @@
-<template>
-    <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
-        <crumbs
-                title="化验大小项与公表项对应维护-添加关联"
-                class="topBack"
-                :param="$route.params"
-                linkTo="ChemicalAndCommonMapping"
-        ></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" @focus="focuInput" type="text" v-model = "mealText">
-                    <span class="searchName" @click="searchMealItem(1)">搜索</span>
-                    <ul
-                            v-if="showMealNameList&&mealNameList.length >0"
-                            class="itemList mealNameList"
-                            ref="mealNameList"
-                    >
-                        <li
-                                v-for="item in mealNameList"
-                                class="mealNameItem ellipsis"
-                                :title="item.conceptName"
-                                @click="selectMealName(item)"
-                                :key="item.conceptId">
-                            {{item.conceptName}}
-                        </li>
-                    </ul>
-
-                </div>
-                <div class="itemLabel clearfix">
-                    <label  class="itemLabelName isRequired">已选择化验大项:</label>
-                    <span class="selectItemName">{{form.mealName}}</span>
-                </div>
-                <div class="itemLabel clearfix">
-                    <label  class="itemLabelName">选择化验小项:</label>
-                    <input class="searchInput"  @focus="focuInput" type="text" v-model = "itemText">
-                    <span class="searchName" @click="searchMealItem(2)">搜索</span>
-                    <ul
-                            v-if="showItemNameList&&itemNameList.length >0"
-                            class="itemList itemNameList"
-                            ref="itemNameList"
-                    >
-                        <li
-                                v-for="item in itemNameList"
-                                class="mealNameItem ellipsis"
-                                :title="item.conceptName"
-                                @click="selectItemName(item)"
-                                :key="item.conceptId">
-                            {{item.conceptName}}
-                        </li>
-                    </ul>
-                </div>
-                <div class="itemLabel">
-                    <label  class="itemLabelName">已选择化验小项:</label>
-                    <span class="selectItemName">{{form.itemName}}</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.conceptName"
-                                @click="selectUniqueName(item)"
-                                :key="item.conceptName">
-                            {{item.conceptName}}
-                        </li>
-                    </ul>
-                </div>
-                <div class="itemLabel">
-                    <label  class="itemLabelName isRequired">已选择公表项:</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: 'AddChemicalAndCommonMapping',
-    data() {
-      return {
-        mealText: '', //化验大项搜索文字内容
-        itemText: '',   //化验小项搜索文字内容
-        uniqueText: '',     //公表项搜索文字内容
-        isEdit: false,
-        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.form.mealName = data.mealName
-      //     this.form.itemName = data.itemName
-      //     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.mealText.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() {
-        const param = {
-          conceptName: this.uniqueText
-        }
-        if(!param.conceptName) {
-          return
-        }
-        api.getAllLisConcept(param).then((res) => {
-          if(res.data.code === '0') {
-            this.uniqueNameList = res.data.data
-            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.mealText = ''
-        this.mealNameList = []
-      },
-      selectItemName(item) {
-        this.form.itemName = item.conceptName
-        this.form.itemId = item.conceptId
-        this.itemText = ''
-        this.itemNameList = []
-      },
-      selectUniqueName(item) {
-        this.form.uniqueName = item.conceptName
-        this.form.uniqueId = item.conceptId
-        //搜索公表项自动填充大小项(目前暂时不需要)
-        // let nameArr = item.conceptName.split('--');
-        // this.form.mealName = nameArr[0]
-        // this.form.itemName = nameArr[1]
-        // this.$refs['uniqueNameList'].style.display='none'
-        this.uniqueText = ''
-        this.uniqueNameList = []
-      },
-      initForm() {
-        this.form.mealName = ''
-        this.form.mealId = ''
-        this.form.itemName = ''
-        this.form.itemId = ''
-        this.form.uniqueName = ''
-        this.form.uniqueId = ''
-      },
-      submitForm() {
-        const { itemId, mealId, uniqueId } = this.form
-        if (!mealId || !uniqueId) {
-          this.warning('请填写相关数据')
-          return
-        }
-        //通过必填验证,提交保存
-        const param = {
-          "itemId": itemId,
-          "mealId": mealId,
-          "uniqueId": uniqueId
-        }
-        this.showSaveDialog(param);
-      },
-      saveLisMapping(param, msg, type) {
-        api.saveLisMapping(param).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
-        })
-      },
-      showSaveDialog(param) {
-        //  修改(不需要)
-        //   if(this.isEdit) {
-        //       this.saveLisMapping(param)
-        //   } else {
-        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
-        api.hasLisMapping(param).then((res) => {
-          if (!res.data.data) {
-            this.saveLisMapping(param, '关联建立成功', 'success' )
-          } else {
-            this.showConfirmDialog('该关联已存在是否替换旧的关系信息', () => {
-              this.saveLisMapping(param, '关联建立成功', 'success' )
-            });
-          }
-        }).catch((err) => {
-          this.warning(err);
-        })
-
-        //   }
-      },
-      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>

+ 0 - 276
src/components/icss/ChemicalAndCommonMapping.vue

@@ -1,276 +0,0 @@
-<template>
-    <div>
-        <crumbs title="化验大小项与公表项对应维护" style="min-width: 980px">
-            <el-form :inline="true" class="demo-form-inline">
-                <el-form-item label="化验大项:">
-                    <el-input size="mini" v-model="filter.mealName" placeholder="化验大项" clearable></el-input>
-                </el-form-item>
-                <el-form-item label="化验小项:">
-                    <el-input size="mini" v-model="filter.itemName" 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="gmtOperate"
-                    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="itemName"
-                    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="operatorName"
-                    label="操作人">
-                </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: 'ChemicalAndCommonMapping',   //化验大小项和公表维护
-    data: function() {
-        return {
-            list: [],
-          searched: false,
-            filter: {
-                mealName:'',
-                itemName:'',
-                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 param = 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.getLisMappingPage(param).then((res) => {
-            loading.close()
-            if(res.data.code == '0') {
-                this.list = res.data.data.records
-            }
-            this.total = res.data.data.total;
-            if(this.inCurrentPage!==undefined){
-              this.currentPage=this.inCurrentPage;
-              this.inCurrentPage = undefined;
-            }
-          })
-        },
-        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: 'AddChemicalAndCommonMapping', 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: 'AddChemicalAndCommonMapping',
-            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={
-          mealName:'',
-          itemName:'',
-          uniqueName:''
-        };
-      },
-        getFilterItems(isTurnPage) {
-          //翻页时筛选条件没点确定则清空
-          if(isTurnPage&&!this.searched){
-            this.clearFilter();
-          };
-            const param = {
-                current: this.inCurrentPage||this.currentPage,
-                size: this.pageSize,
-                mealName:this.filter.mealName.trim(),
-                itemName:this.filter.itemName.trim(),
-                uniqueName:this.filter.uniqueName.trim()
-            };
-            return param;
-        },
-        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.delLisMappingById({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);
-            })
-          });
-        }
-    }
-}
-</script>
-
-
-<style lang="less">
-    @import "../../less/admin.less";
-    .delete{
-       color: red;
-    }
-    .delete:hover {
-        color: red;
-    } 
-    .pagination {
-        min-width: 1010px;
-    }
-</style>

+ 489 - 0
src/components/icss/disease/AddChemicalAndCommonMapping.vue

@@ -0,0 +1,489 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
+    <crumbs
+      title="诊断关联维护--添加关联"
+      class="topBack"
+      :param="$route.params"
+      linkTo="ChemicalAndCommonMapping"
+    ></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="mealText" />
+        </div>
+
+        <div class="itemLabel clearfix">
+          <!-- <label class="itemLabelName isRequired">诊断名称预览:</label> -->
+          <label class="itemLabelName">诊断名称预览:</label>
+          <span class="selectItemName">{{mealText}}</span>
+        </div>
+        <!-- <div class="itemLabel clearfix">
+          <label class="itemLabelName">选择化验大项:</label>
+          <input class="searchInput" @focus="focuInput" type="text" v-model="mealText" />
+          <span class="searchName" @click="searchMealItem(1)">搜索</span>
+          <ul
+            v-if="showMealNameList&&mealNameList.length >0"
+            class="itemList mealNameList"
+            ref="mealNameList"
+          >
+            <li
+              v-for="item in mealNameList"
+              class="mealNameItem ellipsis"
+              :title="item.conceptName"
+              @click="selectMealName(item)"
+              :key="item.conceptId"
+            >{{item.conceptName}}</li>
+          </ul>
+        </div>-->
+        <!-- <div class="itemLabel clearfix">
+          <label class="itemLabelName isRequired">已选择化验大项:</label>
+          <span class="selectItemName">{{form.mealName}}</span>
+        </div>-->
+        <!-- <div class="itemLabel clearfix">
+          <label class="itemLabelName">选择化验小项:</label>
+          <input class="searchInput" @focus="focuInput" type="text" v-model="itemText" />
+          <span class="searchName" @click="searchMealItem(2)">搜索</span>
+          <ul
+            v-if="showItemNameList&&itemNameList.length >0"
+            class="itemList itemNameList"
+            ref="itemNameList"
+          >
+            <li
+              v-for="item in itemNameList"
+              class="mealNameItem ellipsis"
+              :title="item.conceptName"
+              @click="selectItemName(item)"
+              :key="item.conceptId"
+            >{{item.conceptName}}</li>
+          </ul>
+        </div>-->
+        <!-- <div class="itemLabel">
+          <label class="itemLabelName">已选择化验小项:</label>
+          <span class="selectItemName">{{form.itemName}}</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: 'AddChemicalAndCommonMapping',
+  data() {
+    return {
+      mealText: '', //化验大项搜索文字内容
+      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.mealText = 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.mealText.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: 4,
+        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.diseaseNames;
+          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.mealText = '';
+      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.mealText = '';
+      this.uniqueText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      const { mealText } = this;
+      const { uniqueName } = this.form;
+      if (!mealText || !uniqueName) {
+        this.warning('请填写相关数据');
+        return;
+      }
+      let params = {
+        hisName: mealText,
+        uniqueName: uniqueName
+      };
+      this.showSaveDialog(params);
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .diseaseIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '关联建立成功', 'success');
+          } else {
+            // 已存在,提示修改
+            // this.showConfirmDialog('该关联已存在是否替换旧的关系信息', () => {
+            //   this.saveLisMapping(params, '关联建立成功', 'success');
+            // });
+            this.warning('该条关联已存在,请重新编辑!');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateDiseaseRecord(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/disease/ChemicalAndCommonMapping.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="ICD-10编码"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准诊断名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <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: 'ChemicalAndCommonMapping', //化验大小项和公表维护
+  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.getLisMappingPage(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(),
+        icdCode: ''
+      };
+      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: 'AddChemicalAndCommonMapping', 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: 'AddChemicalAndCommonMapping',
+        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
+          .deleteDiseaseRecord({ 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.exportDiseaseRecord().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: 'ImportDiseaseRecord', 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>

+ 6 - 4
src/routes.js

@@ -3,8 +3,9 @@ import HomePage from '@components/common/HomePage.vue';
 import MedicinePrompt from '@components/icss/MedicinePrompt.vue'   //医学术语静态知识
 import AddMedicinePrompt from '@components/icss/AddMedicinePrompt.vue'   //医学术语静态知识
 
-import ChemicalAndCommonMapping from '@components/icss/ChemicalAndCommonMapping.vue'; //化验大小项与公表维护
-import AddChemicalAndCommonMapping from '@components/icss/AddChemicalAndCommonMapping.vue'  //化验大小项与公表维护--添加关联
+import ChemicalAndCommonMapping from '@components/icss/disease/ChemicalAndCommonMapping.vue'; //诊断关联维护
+import AddChemicalAndCommonMapping from '@components/icss/disease/AddChemicalAndCommonMapping.vue';  //诊断关联维护--添加关联
+import ImportDiseaseRecord from '@components/icss/disease/ImportDiseaseRecord.vue';  //诊断关联维护--导入数据
 
 
 export default [
@@ -22,8 +23,9 @@ 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-YXSJWH-TJHYDXXYGBXDY',component:AddChemicalAndCommonMapping,name:'AddChemicalAndCommonMapping'},  //化验大小项与公表维护--添加关联
+      {path:'YXSYK-ZDGLWH',component:ChemicalAndCommonMapping,name:'ChemicalAndCommonMapping'},  //诊断关联维护
+      {path:'LT-ZDGLWH-TJHYDXXYGBXDY',component:AddChemicalAndCommonMapping,name:'AddChemicalAndCommonMapping'},  //诊断关联维护--添加关联
+      {path:'LT-ZDGLWH-DRSJ',component:ImportDiseaseRecord,name:'ImportDiseaseRecord'},  //诊断关联维护--导入数据
     ]
   }
 ]