Bläddra i källkod

Merge branch 'assistCheck' into test

zhangxc 5 år sedan
förälder
incheckning
c4230708b8

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "@vue/eslint-config-standard": "^3.0.4",
     "axios": "^0.18.0",
     "element-ui": "^2.4.7",
+    "jquery": "^3.4.1",
     "js-md5": "^0.7.3",
     "less": "^3.8.1",
     "less-loader": "^4.1.0",

+ 11 - 0
src/api/config.js

@@ -157,6 +157,7 @@ export default {
     'allKnowledgeType': 'api/knowledgeman/lexicon/getAllLexicon', //医学术语-类型列表
     'deletMedicalName': 'api/knowledgeman/concept/removeConceptInfo', //医学术语-命名维护-删除
     'getMedicalDetail': 'api/knowledgeman/concept/getConceptInfoDetail', //医学术语-命名维护-详情
+    'getSimilarList': 'api/knowledgeman/similar/getSimilarList', //医学术语-命名维护-相似词
     'addMedicalName': 'api/knowledgeman/concept/addConceptInfo', //医学术语-命名维护-添加修改
     'knowledgeRelation': 'api/knowledgeman/relation/getRelationInfoList', //医学术语-关系维护
     'delKnowledgeRelation': 'api/knowledgeman/relation/removeRelationInfo', //医学术语-关系维护-删除
@@ -218,6 +219,16 @@ export default {
     'addMultRelation': 'api/knowledgeman/multContact/addRelation', //知识库标准化-医学术语多层关联维护-添加或者编辑
     'reloadLib': 'api/knowledgeman/reload/createFile', //术语命名-加载词库
     'getDeptList': '/api/knowledgeman/concept/getConceptListByType', //术语命名-诊断-科室
+    'assistCheckMultContactList': '/api/knowledgeman/pacsMultContact/multContactList',   //医学术语维护-辅检层级维护列表
+    'assistCheckAddMultRelation': '/api/knowledgeman/pacsMultContact/addRelation',   //医学术语维护-辅检层级维护-添加关联
+    'assistCheckMultRelationDetail': '/api/knowledgeman/pacsMultContact/relationContactDetail',   //医学术语维护-辅检层级维护-详情
+    'assistCheckRemoveMultRelation': '/api/knowledgeman/pacsMultContact/removeRelationContact',   //医学术语维护-辅检层级维护-删除或恢复
+    'assistCheckPacsSonContactList': '/api/knowledgeman/pacsSonContact/pacsSonContactList', //医学术语维护-辅检子项维护列表
+    'assistCheckPacsAddPacsRelation': '/api/knowledgeman/pacsSonContact/addPacsRelation', //医学术语维护-辅检子项维护-添加或编辑
+    'assistCheckGetPacsContactDetail': '/api/knowledgeman/pacsSonContact/getPacsContactDetail', //医学术语维护-辅检子项维护-详情
+    'assistCheckRemoveRelationPacs': '/api/knowledgeman/pacsSonContact/removeRelationPacs', //医学术语维护-辅检子项维护-删除或恢复
+    
+
 	  /*********预问诊相关接口**********/
 	  'questionList':'/api/precman/questionInfo_prec/page',     //预问诊-填写单列表
     'questionAdd':'/api/precman/questionInfo_prec/saveOrUpdate',      //预问诊-填写单添加

+ 3 - 0
src/api/icss.js

@@ -253,6 +253,9 @@ export default {
     addMedicalName(param) {//命名维护--新增、修改
         return axios.post(urls.addMedicalName, param)
     },
+    getSimilarList(param) { //命名维护--相似词
+        return axios.post(urls.getSimilarList, param)
+    },
     knowledgeRelation(param) {//关系维护
         return axios.post(urls.knowledgeRelation, param)
     },

+ 30 - 0
src/api/medicalTerm.js

@@ -0,0 +1,30 @@
+import axios from 'axios';
+import config from './config.js';
+const urls = config.urls;
+
+export default {
+    assistCheckMultContactList(param) {   //医学术语维护-辅检层级维护列表
+        return axios.post(urls.assistCheckMultContactList, param)
+    },
+    assistCheckAddMultRelation(param) {   //医学术语维护-辅检层级维护-添加关联
+        return axios.post(urls.assistCheckAddMultRelation, param)
+    },
+    assistCheckMultRelationDetail(param) {   //医学术语维护-辅检层级维护-详情
+        return axios.post(urls.assistCheckMultRelationDetail, param)
+    },
+    assistCheckRemoveMultRelation(param) {   //医学术语维护-辅检层级维护-删除或恢复
+        return axios.post(urls.assistCheckRemoveMultRelation, param)
+    },
+    assistCheckPacsSonContactList(param) { //医学术语维护-辅检子项维护列表
+        return axios.post(urls.assistCheckPacsSonContactList, param)
+    },
+    assistCheckPacsAddPacsRelation(param) { //医学术语维护-辅检子项维护-添加或编辑
+        return axios.post(urls.assistCheckPacsAddPacsRelation, param)
+    },
+    assistCheckGetPacsContactDetail(param) { //医学术语维护-辅检子项维护-详情
+        return axios.post(urls.assistCheckGetPacsContactDetail, param)
+    },
+    assistCheckRemoveRelationPacs(param) {  //医学术语维护-辅检子项维护-删除或恢复
+        return axios.post(urls.assistCheckRemoveRelationPacs, param)
+    },
+}

+ 126 - 0
src/api/utils.js

@@ -1,3 +1,102 @@
+import $ from 'jquery';
+
+function getWindowInnerHeight(){
+  if(window.innerHeight!=undefined){
+    return window.innerHeight;
+  }else{
+    let by = document.body, ele = document.documentElement;
+    return Math.min(by.clientHeight,ele.clientHeight);
+  }
+};
+function getWindowInnerWidth(){
+  let width = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth
+  return width
+};
+function getPageCoordinate(event,stic){//获取鼠标点击的位置
+  let e = event || window.event;
+  var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+  var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+  var x = e.pageX || (e.clientX + scrollX);
+  var y = (e.pageY+(stic?25:0)) || (e.clientY + scrollY + (stic?25:0));//弹窗位置偏下25
+  let obj = {
+    boxLeft : x ,
+    boxTop : y+18
+  }
+  return obj;
+}
+
+ /**
+ * @param {拖动元素/清除拖动事件监听} type add:添加事件监听  del:移除事件监听
+ * @param {展开元素id} addDom 
+ */
+let width = '',//屏幕宽度
+  height = '', //屏幕高度
+  dragWrapper = '',//拖拽元素
+  mouseX = 0,//鼠标距离页面左侧
+  mouseY = 0,//鼠标距离页面上部
+  dragX = 0,//鼠标可拖拽到左边的最大距离(元素定位左侧距离)
+  dragY = 0,//鼠标可拖拽到上边的最大距离(元素定位上边距离)
+  isDrag = false,//元素是否处于拖拽中
+  addPart = null;//展开区域,这个展开的宽度应当是固定宽度了
+/**
+ * 
+ * @param {事件对象} event 
+ * @param {被拖动的元素} dragModalWrap
+ * @param {可拖动的区域} dragModalTitle 
+ */
+function handleMove(event) {
+  let wrap = $("#"+dragWrapper); //被拖拽的元素
+  let dragDes = $("#"+addPart); //展開区域
+  let page = getPageCoordinate(event, '0');//获取鼠标位置
+  let maxDragX = 0,dragDesWidth = 0;
+  let wrapHeight = wrap[0].offsetHeight;//直接用.height()获取的高度不准确
+  let wrapWidth = wrap[0].offsetWidth;
+  let maxDragY = height - wrapHeight; //最大可拖拽y方向距离
+  if (dragDes[0]) { //存在就有类似治疗方案的弹窗,最大可推拽x方向距离
+    dragDesWidth = dragDes[0].offsetWidth//展开元素的宽度
+    maxDragX = width - wrapWidth - dragDesWidth
+  } else {
+    maxDragX = width - wrapWidth
+  }
+  if (isDrag) {
+    dragX = page.boxLeft - mouseX //鼠标可拖拽到左边的最大距离
+    dragY = page.boxTop - mouseY //鼠标可拖拽到上边的最大距离
+    if (dragX < 300) { //不能超出左边界
+      dragX = 300
+    }
+    if (dragY < 100) { //不能超出上边界
+      dragY = 100
+    }
+    if (dragDes[0]) {
+      if (width - dragX - dragDesWidth < wrapWidth) { //不能超出右边界
+        dragX = maxDragX
+      }
+    } else {
+      if (width - dragX < wrapWidth) { //不能超出右边界
+        dragX = maxDragX
+      }
+    }
+    if (height - dragY < wrapHeight) { //不能超出下边界
+      dragY = maxDragY
+    }
+    // isMove = true
+    wrap.css({
+      left: dragX + 'px',
+      marginLeft: 0 + 'px',
+      marginTop: 0 + 'px',
+      top: dragY + 'px',
+      bottom:'auto',
+      right:'inherit',
+    })
+  }
+}
+/**
+ * 鼠标弹起弹窗不在跟随鼠标移动
+ */
+function handleUp(){
+  isDrag = false;
+  return
+}
 export default {
   //判断字符串是否能转成json
   isJsonStr(str) {
@@ -292,5 +391,32 @@ export default {
   getImgName(url){
     const arr = url.split("/");
     return arr[arr.length-1];
+  },
+ 
+  dragBox(dragWrap,dragTop,type,addDom,img) {
+    let drag = $("#"+dragTop); //拖拽区域
+    let wrap = $("#"+dragWrap); //被拖拽的元素
+    width = getWindowInnerWidth(); 
+    height = getWindowInnerHeight();
+    addPart = addDom||null;
+    dragWrapper = dragWrap;
+    if (type === 'del') {
+      $(document).off('mousemove', handleMove)
+      $(document).off('mouseup', handleUp)
+    } else {
+      drag.on('mousedown', function (event) {
+        let lenHeight = wrap.height()
+        if(img){
+          $("#preImg").css("height",(lenHeight)+'px')
+          $("#dragModalWrap").css("height",(lenHeight)+'px')
+        }
+        let page = getPageCoordinate(event, '0');
+        mouseX = page.boxLeft - wrap.offset().left; //鼠标到拖拽元素的左边界的距离
+        mouseY = page.boxTop - wrap.offset().top; //鼠标到拖拽元素的上边界的距离
+        isDrag = true
+      })
+      $(document).on('mousemove', handleMove)
+      $(document).on('mouseup', handleUp)
+    }
   }
 }

+ 67 - 4
src/components/icss/AddMedicalName.vue

@@ -5,6 +5,7 @@
             linkTo="MedicalName"></crumbs>
     <div class="contents">
       <div class="content">
+        
         <h3>添加术语:</h3>
         <p class="titl">医学标准术语:</p>
         <table class="deptbox" v-if="id == ''">
@@ -22,6 +23,12 @@
               <p v-if="id">{{data.name}}</p>
               <!-- 4-18 需求变更 -->
               <input v-else type="text" v-model="data.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(1)">
+             <SimilarListDrag 
+                :searchType='searchType'
+                :similarList = 'similarList'
+                isShow = "true"
+             >
+             </SimilarListDrag>
             </td>
             <td>
               <input type="text" v-model="data.spell" placeholder="请输入拼音" maxlength="50"  @input="handlePinyin($event,1)">
@@ -52,7 +59,7 @@
               <span v-else>{{data.type}}</span>
             </td>
             <td class="desc">
-              <input v-model="data.remark" placeholder="请输入术语说明" maxlength="120"></input>
+              <input v-model="data.remark" placeholder="请输入术语说明" maxlength="120"/>
             </td>
           </tr>
         </table>
@@ -72,7 +79,13 @@
               <td :title="item.name&&item.name.length>9?item.name:''">
                 <!-- 使用原生input,输入限制 -->
                 <!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
-                <input type="text" v-model="item.name" :title="item.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(2,index,99)" >
+                <input type="text" v-model="item.name" :title="item.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(2,index,99)" />
+                <SimilarListDrag 
+                    :searchType='searchType'
+                    :similarList = 'similarList'
+                    :isShow = "index ===searchIndex"
+                >
+                </SimilarListDrag>
               </td>
               <!-- <td v-if="!item.isEdit">
                 {{item.spell}}
@@ -100,7 +113,7 @@
                 <span v-else>{{data.type}}</span>
               </td>
               <td class="desc">
-                <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120"></input>
+                <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120" />
               </td>
               <td class="desc">
                 {{item.isConcept == 1?"标准词":"同义词"}}
@@ -143,6 +156,12 @@
               <!-- 使用原生input,输入限制 -->
               <!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
               <input type="text" v-model="item.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(2,index)">
+              <SimilarListDrag 
+                :searchType='searchType'
+                :similarList = 'similarList'
+                :isShow = "index ===searchIndex"
+              >
+              </SimilarListDrag>
             </td>
             <td>
               <input type="text" v-model="item.spell" placeholder="请输入拼音" maxlength="50"  @input="handlePinyin($event,3,index)">
@@ -151,7 +170,7 @@
               {{data.type}}
             </td>
             <td class="desc">
-              <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120"></input>
+              <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120" />
             </td>
             <td v-if="id">
               <span @click="deleLine(index)" class="delete">删除</span>
@@ -208,6 +227,8 @@
 <script type="text/javascript">
 import api from '@api/icss.js';
 import pinyin from '../../js/Convert_Pinyin.js';
+import utils from '@api/utils.js';
+import SimilarListDrag from './SimilarListDrag'
   export default {
     name:'AddMedicalName',
     data(){
@@ -258,6 +279,9 @@ import pinyin from '../../js/Convert_Pinyin.js';
         dioType:'', //默认展示一类
         deptList:[], //更多信息-科室
         dept:'',  //默认展示全科
+        similarList: [], //相似词列表
+        searchIndex: -1, //展示哪个的同义词
+        searchType: ''
       }
     },
     created(){
@@ -280,6 +304,16 @@ import pinyin from '../../js/Convert_Pinyin.js';
       },
     },
     methods:{
+      dragAdd(ev){
+        utils.dragBox('dragModalWrap','dragModalTitle','add')
+      },
+      dragDel(){
+          utils.dragBox('dragModalWrap','dragModalTitle','del')
+      },
+      closeTable(){
+        this.similarList = []
+      
+      },
       // 诊断类型下--更多信息-类型
       getDioType(flag){
         api.getknowledgeList().then((res)=>{
@@ -429,7 +463,11 @@ import pinyin from '../../js/Convert_Pinyin.js';
             let data = this.data;
             data.spell = pinyin.getCamelChars(data.name);
             this.unfit = false;
+            this.searchType = 'standard'
+            this.getSimilarList(this.data.name)
+
           }
+
         }else if(type==2){
           // 修改时术语名称、拼音和类型均不能修改
           if(flg == 99){
@@ -441,11 +479,15 @@ import pinyin from '../../js/Convert_Pinyin.js';
               });
               // this.synonymous[index-1].name = '';
               this.unfit = true;
+      
             }else{
               // let current = this.synonymous[index-1];
               let current = this.allwords[index];
               current.spell = pinyin.getCamelChars(current.name);
               this.unfit = false;
+              this.searchType = 'standard';
+              this.searchIndex = index;
+              this.getSimilarList(this.allwords[index].name)
             }
           }else{
             if(this.synonymous[index].name && !pattern.test(this.synonymous[index].name)){
@@ -459,6 +501,9 @@ import pinyin from '../../js/Convert_Pinyin.js';
               let current = this.synonymous[index];
               current.spell = pinyin.getCamelChars(current.name);
               this.unfit = false;
+              this.searchType = 'similar';
+              this.searchIndex = index;
+              this.getSimilarList(this.synonymous[index].name)
             }
           }
         }
@@ -475,6 +520,17 @@ import pinyin from '../../js/Convert_Pinyin.js';
         }
         // e.target.value = e.target.value.replace(/[^a-zA-Z]/g,'');
       },
+      getSimilarList(name){
+        if(!name){
+          return
+        }
+        const param = {
+          inputStr: name
+        }
+        api.getSimilarList(param).then((res) =>{
+          this.similarList = res.data.data
+        })
+      },
       addSpan(type){
         let singleSpan = {
           name:'',
@@ -675,11 +731,17 @@ import pinyin from '../../js/Convert_Pinyin.js';
           this.dept = '';
         } 
       }
+    },
+    components: {
+      SimilarListDrag
     }
   }
 </script>
 <style lang="less" scoped>
    @import "../../less/admin.less";
+   table,tr,td {
+     list-style: none;
+   }
    /deep/ .radioWrap .el-radio {
      display: block;
      height: 41px;
@@ -733,6 +795,7 @@ import pinyin from '../../js/Convert_Pinyin.js';
         width: 135px;
         border: 1px solid #666;
         padding:5px;
+        position: relative;
       }
       input{
         border:none;

+ 116 - 0
src/components/icss/SimilarListDrag.vue

@@ -0,0 +1,116 @@
+<template>
+    <div  
+    v-if="searchType ==='standard'&& similarList.length > 0&&isShow" 
+    class="similarBox clearfix"
+        id="dragModalWrap"
+    > 
+        <div class="tabTitle"  id="dragModalTitle" @mousedown="dragAdd($event)" @mouseup="dragDel">
+            相似词数据
+        </div>
+    
+        <div class="tableBox">
+            
+            <table class="similarTable">
+            <tr>
+                <td>序号</td>
+                <td>术语</td>
+                <td>归属</td>
+            </tr>
+            <tr v-for="(item,index) in similarList" :key="item.conceptId">
+                <td>{{index+1}}</td>
+                <td>{{item.name}}</td>
+                <td>{{item.isConceptRemark}}</td>
+            </tr>
+            </table>
+        </div>
+        <div class="closeTableBox"
+        >
+            <span class="closeTable"  @click="closeTable">关闭</span>
+        </div>
+    </div>
+</template>
+<script>
+import utils from '@api/utils.js';
+export default {
+    name: "SimilarListDrag",
+    props: ["searchType","similarList","isShow"],
+    data() {
+        return{
+
+        }
+    },
+    methods: {
+        dragAdd(ev){
+            utils.dragBox('dragModalWrap','dragModalTitle','add')
+        },
+        dragDel(){
+            utils.dragBox('dragModalWrap','dragModalTitle','del')
+        },
+        closeTable(){
+            this.similarList = []
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+.similarBox {
+    position: fixed;
+    background: #fff;
+    width: 400px;
+    max-height: 280px;
+    top: 350px;
+    // border: 1px solid #000;
+   
+     z-index: 10;
+     left: 660px;
+    //  top: 0;
+     box-shadow:0 0 12px #ccc;
+  }
+  .tabTitle {
+    width: 100%;
+    height: 40px;
+    line-height: 40px;
+    font-size: 16px;
+    font-weight: bold;
+    cursor: move;
+  }
+  .closeTableBox{
+    position: relative;
+    height: 35px;
+  }
+  .closeTable {
+    position: absolute;
+    display: inline-block;
+    width: 40px;
+    height: 24px;
+    line-height: 24px;
+    border-radius: 5px;
+    cursor: pointer;
+    border: 1px solid #000;
+    box-sizing: border-box;
+    right: 30px;
+    top: 5px;
+  }
+  .tableBox {
+    max-height: 200px;
+    overflow: auto;
+    padding: 0 30px;
+  }
+  .similarTable{
+          
+    width: 100%;
+    border-collapse: collapse;
+   
+    >tr{
+        height: 30px;
+    text-align: center;
+       border: 1px solid #000;
+      td{
+        border: 1px solid #000;
+        width: 135px;
+        position: relative;
+      }
+    }
+    
+  }
+</style>

+ 414 - 0
src/components/medicalTerm/AddAssistCheckMultRelation.vue

@@ -0,0 +1,414 @@
+<template>
+  <div class="addMedicalMultRelationWrapper">
+    <crumbs :title="minTitle" :param="$route.params" linkTo="AssistCheckMultRelation"></crumbs>
+    <div class="contents">
+      <div class="content">
+        <div class="addBtn" v-if="list.length == 0">
+          <el-button
+            @click="addConcept"
+          >+ 新 增</el-button>
+        </div>
+
+        <div class="conceptSearch" ref="conceptSearch" v-show="showSearch">
+          <h4  class="conceptTitle">术语(概念ID)搜索</h4>
+          <img class="closeSearch" src="../../images/close-icon.png" @click="closeSearch" alt="">
+          <input v-model="conceptText" type="text" ref="conceptInput" class="searchText" placeholder="请输入关键词搜索">
+          <!-- <span class="searchName" @click="searchConcept">搜索</span> -->
+          <ul class="conceptList" ref="conceptList">
+            <li 
+              v-for="item in conceptList" 
+              class="conceptItem ellipsis"
+              :title="item.conceptNameType"
+              @click="selectConcept(item)"
+              :key="item.conceptId">
+              {{item.conceptNameType}}
+            </li>
+          </ul>
+        </div>
+        <div class="tree">
+          <el-tree
+            :data="list"
+            :props="defaultProps"
+            node-key="conceptId"
+            draggable
+            :allow-drag="allowDrag"
+            :allow-drop="allowDrop"
+            :expand-on-click-node="true"
+            :default-expanded-keys="defaultExpandedArr"
+            @node-click = "handleNodeClick"
+          >
+            <span class="custom-tree-node" slot-scope="{ node, data }">
+                <span class="custom-tree-node-name ellipsis" :class="{colorGray: data.isDeletedConcept == 'Y'}" :title="node.label">{{ node.label }}</span>
+                <span class="btn-box">
+                  <el-button
+                      class="btn-add fl"
+                      v-if="data.level < 3"
+                      type="text"
+                      size="mini"
+                      @click="(e) => append(data, e)">
+                      + 增加
+                  </el-button>
+                  <el-button
+                      class="btn-del fr"
+                      v-if="!isEdit|| isEdit&&data.level != 0"
+                      type="text"
+                      size="mini"
+                      @click="() => remove(node, data)">
+                      删除
+                  </el-button>
+                </span>
+            </span>
+          </el-tree>
+        </div>
+        
+        <div class="btn">
+          <el-button
+            type="primary"
+            :disabled = 'saveDisable'
+            @click="confirm"
+          >确 定</el-button>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script type="text/javascript">
+import api from '@api/icss.js';
+import apis from '@api/medicalTerm.js';
+  export default {
+    name:'AddAssistCheckMultRelation',
+    data(){
+      const data = [
+        // {
+        //   id: 1,
+        //   label: '一级 1',
+        //   children: [{
+        //     id: 4,
+        //     label: '二级 1-1',
+        //     children: [{
+        //       id: 9,
+        //       label: '三级 1-1-1'
+        //     }, {
+        //       id: 10,
+        //       label: '三级 1-1-2'
+        //     }]
+        //   }]
+        // }, 
+        // {
+        //   id: 2,
+        //   label: '一级 2',
+        //   children: [{
+        //     id: 5,
+        //     label: '二级 2-1'
+        //   }, {
+        //     id: 6,
+        //     label: '二级 2-2'
+        //   }]
+        // }, 
+        // {
+        //   id: 3,
+        //   label: '一级 3',
+        //   children: [{
+        //     id: 7,
+        //     label: '二级 3-1'
+        //   }, {
+        //     id: 8,
+        //     label: '二级 3-2'
+        //   }]
+        // }
+      ];
+
+      return{
+        minTitle:'辅检层级关联维护-添加',
+        list: JSON.parse(JSON.stringify(data)),
+        defaultProps: {
+          children: 'nodeList',
+          label: 'conceptNameType'
+        },
+        conceptText: '',
+        conceptList: [], //概念列表
+        addLevel: 0,  //添加级别
+        excludedConceptIds:[],
+        operaList: [],
+        isEdit: false,  //是否为修改
+        relationConceptId: '', //关联父类ID
+        level: 0, //层级(修改时只能显示三级)
+        saveDisable: false,  //保存按钮禁止点击
+        showSearch: false,
+        defaultExpandedArr: []
+      }
+    },
+    created(){
+      const { isEdit, data } = this.$route.params
+      if(isEdit) {
+          // console.log('dataa', data)
+          this.isEdit = isEdit
+          this.minTitle = '辅检层级关联维护-修改'
+          const item = JSON.parse(JSON.stringify(data))
+          item.level = 0
+          item.isExpanded = false
+          item.nodeList = this.IteraNodeList(item.nodeList, [], 1)
+          this.list[0] = item
+      }
+    },
+    watch:{
+      conceptText(nextVal, prevVal) {
+        if(!nextVal.trim()) {
+          this.conceptList = []
+        }
+        if(nextVal.trim() &&nextVal != prevVal) {
+          this.searchConcept()
+        }
+      }
+    },
+    methods:{
+       allowDrop(draggingNode, dropNode, type) {
+        if(draggingNode.data.parentConceptName !== dropNode.data.parentConceptName){
+          return false
+        }else{
+          return type !== 'inner'
+        }
+      },
+      allowDrag(draggingNode) {
+        return draggingNode.data.level != 0;//一级不可拖动
+      },
+      handleNodeClick(data) {
+          if(data.nodeList.length > 0) {
+            if(!data.isExpanded) {
+              this.defaultExpandedArr.push(data.conceptId)
+            } else {
+              this.defaultExpandedArr = this.defaultExpandedArr.filter(item => item !== data.conceptId)
+            }
+            this.$set(data, 'isExpanded', !data.isExpanded);
+          }
+      
+      },
+      addConcept(e) {
+        this.addLevel = 0;
+        this.openSearch(e);
+      },
+      confirm() { 
+        if(!this.list[0] || this.list[0].nodeList.length == 0) {
+          this.message('请输入数据信息');
+          return
+        }
+        const param = {
+          conceptId: this.list[0].conceptId,
+          sonRelationId: 17,
+          isOrderBy: 1
+        }
+        const nodeListResult = []
+        this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
+        param.nodeList = nodeListResult
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+        apis.assistCheckAddMultRelation(param).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.message(res.data.msg||'术语建立成功','success');
+            setTimeout(() => {
+              //返回带搜索条件的首页
+              this.$router.push({name:'AssistCheckMultRelation',params:Object.assign({},this.$route.params,{currentPage:1})});
+            }, 2000);
+          } else {
+            this.message(data.msg);
+          }
+          this.saveDisable = false;
+        })
+      },
+      IteraNodeList(nodeList,  nodeListResult, type, level = 1) {
+        this.level= level + 1
+        for(let i = 0; i <nodeList.length; i++) {
+          let newChild;
+          if(type == '0') { //添加的时候保存所有的id列表
+            newChild = {conceptId: nodeList[i].conceptId, relationId: 17,nodeList:[],sonRelationId: 17,isExpanded:false}
+          } else if(type == '1') {  //修改的时候添加层级
+            const item = JSON.parse(JSON.stringify(nodeList[i]))
+            newChild = Object.assign(item, {level:  level, nodeList: [],sonRelationId: 17,isExpanded:false})
+          } else if(type == '2') { //移除节点的时候同时移除节点(搜索时排除的id列表)
+            newChild = nodeList[i].conceptId
+          }
+          
+          if(nodeList[i].nodeList &&nodeList[i].nodeList.length > 0&&level < 3) {
+            if(type == '0' || type =='1') {
+              this.IteraNodeList(nodeList[i].nodeList,  newChild.nodeList, type, level+1)
+            } else if(type == '2') {
+              this.IteraNodeList(nodeList[i].nodeList,  nodeListResult, type, level+1)
+            }
+            
+          }
+          nodeListResult.push(newChild)
+        }
+        return nodeListResult
+      },
+      searchConcept() {
+        let  excludedConceptIds = [];
+        if(this.list[0]) {
+          excludedConceptIds.push(this.list[0].conceptId)
+          this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
+        }
+        
+        const param = {
+          "name": this.conceptText,
+          "excludedConceptIds": this.excludedConceptIds,
+          "relationId": 17,
+          "relationPosition": 1,
+          "typeId": this.addLevel === 0 ? 71 : 16
+        }
+        if(this.addLevel === 0) {
+          param.relationTypeId = 16
+        }
+        if(this.addLevel > 0) {
+          param.relationPosition = 0
+        }
+        
+        api.getConceptInfoAssay(param).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.conceptList = data.data
+          }
+        })
+      },
+      selectConcept(item) {
+        if(this.addLevel == 0) {
+          this.list.push(Object.assign({}, item,  {nodeList: [], level: 0, conceptId: item.conceptId, conceptNameType: item.conceptNameType, sonRelationId: 17}))
+          this.list = JSON.parse(JSON.stringify(this.list))
+        }else {
+          const data = this.operaList
+          const newChild = Object.assign({}, item,  {nodeList: [], level: data.level+1, conceptId: item.conceptId, conceptNameType: item.conceptNameType, relationId: 17,sonRelationId: 17});
+          // const newChild = { id: id++, label: 'nodeList', level: data.level+1, children: [] };
+          if (!data.nodeList) {
+          this.$set(data, 'nodeList', []);
+          }
+          data.nodeList.push(newChild);
+        }
+        this.conceptList = [];
+        this.closeSearch();
+      },
+      openSearch(e) {
+        this.showSearch = true
+        this.$refs['conceptSearch'].style.top=  e.pageY - 120 + 'px';
+        this.$refs['conceptInput'].focus();
+      },
+      closeSearch() {
+        this.conceptText = ''
+        this.showSearch = false
+      },
+      append(data, e) {
+          this.addLevel = data.level+1;
+          this.relationConceptId = data.conceptId
+          this.operaList = data;
+          this.openSearch(e);
+
+          // const newChild = { id: id++, label: 'testtest', level: data.level+1, nodeList: [] };
+          // if (!data.nodeList) {
+          // this.$set(data, 'nodeList', []);
+          // }
+          // data.nodeList.push(newChild);
+      },
+
+      remove(node, data) {
+          const parent = node.parent;
+          const nodeList = parent.data.nodeList || parent.data;
+          const index = nodeList.findIndex(d => d.conceptId === data.conceptId);
+          nodeList.splice(index, 1);
+      },
+      message(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      
+    }
+  }
+</script>
+<style lang="less" scoped>
+@import "../../less/admin.less";
+.addMedicalMultRelationWrapper {
+  height: calc(100% - 70px);
+}
+.tree {
+  margin-bottom: 230px;
+}
+.contents {
+  height: 100%;
+}
+.btn-box {
+  position: absolute;
+  left: 350px;
+}
+.btn-del {
+  color: #8F8F8F;
+}
+.addBtn {
+  width: 66px;
+  order: 1px solid #21CBC7;
+  border-radius: 2px;
+}
+.conceptSearch {
+  position: absolute;
+  left: 560px;
+  width: 301px;
+  height: 300px;
+  background: #fff;
+  border: 1px solid #ccc;
+  text-align: center;
+  z-index: 2;
+}
+.conceptTitle {
+  width: 100%;
+  text-align: center;
+  padding: 20px 0;
+}
+.searchText {
+  padding: 0 15px;
+  width: 191px;
+  height: 34px;
+}
+.conceptList {
+  width: 221px;
+  height: 170px;
+  margin: -2px auto 0;
+  border: 2px solid #E1DFDF;
+  overflow: hidden;
+  overflow-y: auto;
+}
+.conceptItem {
+  height: 34px;
+  line-height: 34px;
+  text-align: left;
+  padding: 0 15px;
+  cursor: pointer;
+}
+.conceptItem:hover {
+  background: #f5f7fa;
+}
+.closeSearch {
+  position: absolute;
+  width: 30px;
+  right: 0;
+  top: 0;
+}
+.delete {
+  cursor: pointer;
+}
+.content{
+  background: #fff;
+  padding: 20px 20px 30px;
+  color: #545455;
+ 
+}
+
+.btn {
+  text-align: right;
+  margin-top: 20px;
+}
+.custom-tree-node-name {
+  display: inline-block;
+  width: 270px;
+}
+.colorGray {
+  color: #c1c1c1;
+} 
+</style>

+ 368 - 0
src/components/medicalTerm/AddAssistCheckSon.vue

@@ -0,0 +1,368 @@
+<template>
+    <div class="assayBox" @click="close">
+        <crumbs
+          :title="'辅检子项维护-'+titleText"
+          class="topBack"
+          :param="$route.params"
+          linkTo="AssistCheckSon"
+        ></crumbs>
+        <el-form :model="form" ref="ruleForm"  class="addDepartForm">
+            <p class="assayTitle">添加辅检标准术语</p>
+            <el-form-item  class="addDepartFormItem"  v-if="!isEdit" label="添加:" prop="department">
+                <input class="searchInput"  @focus="focuInput" type="text" v-model = "searchConcept"> 
+                <span class="searchName" @click="searchDiag">搜索</span>
+                <ul class="itemList" v-show="conceptList.length>0">
+                    <li 
+                    v-for="item in conceptList" 
+                    class="diagItem ellipsis"
+                    :title="item.conceptName"
+                    @click="selectDiag(item)"
+                    :key="item.conceptId">
+                    {{item.conceptNameType||item.conceptName}}
+                    </li>
+                </ul>
+            </el-form-item>
+             <el-form-item class="isRequired" label="已选择辅检标准术语:" prop="type">
+                {{form.conceptNameType||form.conceptName}}
+            </el-form-item>
+        </el-form>
+        <div class="symptomList">
+            <div class="screenIndex clearfix">
+                    <p class="assayTitle">辅检子项添加</p>
+                    <label class="screenIndexLabel">添加:</label>
+                    <input class="searchInput"  @focus="focuInput" type="text" v-model = "searchIndexVal"> 
+                    <span class="searchName" @click="searchIndex">搜索</span>
+                    <ul class="itemList indexList" v-show="indexList.length>0">
+                        <li 
+                        v-for="item in indexList" 
+                        class="diagItem ellipsis"
+                        :title="item.conceptName"
+                        @click="selectIndex(item)"
+                        :key="item.conceptName">
+                        {{item.conceptNameType||item.conceptName}}
+                        </li>
+                    </ul>
+            </div>
+            <table class="indexTab">
+                
+                <tr>
+                    <td class="selectedContent">已选择内容</td>
+                    <td class="selectedContentOpera">操作</td>
+                </tr>
+                <tr v-for="(item, index) in selectedIndexList" :key="item.conceptId"> 
+                    <!-- <td class="selectedContent ">{{item.parentConceptName?item.conceptName+'('+item.parentConceptName+')':item.conceptName}}</td> -->
+                    <td class="selectedContent ">{{item.conceptNameType||item.conceptName}}</td>
+                    <td class="selectedContentOpera"><el-button type="text" size="small" class="delete" @click="delSelectedIndex(item, index)">删除</el-button></td>
+                </tr>
+            </table>
+        </div>
+        <div class="btn">
+            <el-button
+            type="primary"
+            :disabled = 'saveDisable'
+            @click="submitForm('ruleForm')"
+            >确 定</el-button>
+        </div>
+    </div>
+    
+</template>
+
+<script>
+  import api from '@api/icss.js';
+  import apis from '@api/medicalTerm.js';
+  export default {
+    name: 'AddAssistCheckSon',
+    data() {
+      return{   
+        form: {
+            conceptId: '', 
+            conceptName:'' ,
+            conceptNameType:''
+        },
+        titleText: '添加辅检子项',
+        conceptList: [],
+        indexList: [],
+        selectedIndexList: [],  //选择的同义词
+        searchConcept: '',
+        searchIndexVal: '',
+        isEdit: false,
+        nodeList:[], //辅检子项列表
+        saveDisable: false 
+      }
+    },
+    created(){
+        const { isEdit, data } = this.$route.params;
+        if(isEdit) {
+          this.isEdit = isEdit;
+          this.titleText = '修改辅检子项';
+          this.form.conceptId = data.conceptId;
+          this.form.conceptName = data.conceptName;
+          this.form.conceptNameType = data.conceptNameType;
+          this.selectedIndexList = data.nodeList;
+        }
+    },
+    methods: {
+        close() {
+            this.conceptList = [];
+            this.indexList = [];
+        },
+        back(){
+            this.$router.go(-1);
+        },
+        searchDiag() {
+            const param = {
+              "name": this.searchConcept,
+              "relationId": 18,
+              "relationPosition": 1,
+              "relationTypeId": 16,
+              "typeId": 16
+            }
+            api.getConceptInfoAssay(param).then((res)=>{
+               if(res.data.code === '0') {
+                   this.conceptList = res.data.data
+                }
+            })
+        },
+        selectDiag(item) {
+            this.form.conceptId = item.conceptId;
+            this.form.conceptName = item.conceptName;
+            this.form.conceptNameType = item.conceptNameType;
+            this.searchConcept = '';
+            this.conceptList=[];
+        },
+        focuInput() {
+            // 聚焦时清空搜索结果?   
+        },
+        selectedTags() {//已选项ids
+          let selectedTags = []
+          for (let i =0; i < this.selectedIndexList.length; i++) {
+            selectedTags.push(this.selectedIndexList[i].conceptId)
+          }
+          return selectedTags
+        },
+        searchIndex() {
+           const notIds =[this.form.conceptId ,...this.selectedTags()];
+           const param = {
+            "name": this.searchIndexVal,
+            "relationId": 18,
+            "relationPosition": 0,
+            "typeId": 16,
+            // "relationConceptId":this.form.conceptId,
+            "excludedConceptIds":notIds
+          }
+          
+          api.getConceptInfoAssay(param).then((res)=>{
+             if(res.data.code === '0') {
+                 this.indexList = res.data.data;
+              }
+          })
+        },
+        selectIndex(item) {
+          this.selectedIndexList.push(item);
+          this.indexList = [];
+        },
+        delSelectedIndex(selectedItem, index) {
+            this.selectedIndexList.splice(index, 1)
+            this.nodeList.splice(index, 1)
+        },
+        submitForm(formName) {
+            if(!this.form.conceptId) {
+                this.warning('请选择辅检标准术语')
+                return
+            }
+            if(this.selectedIndexList.length === 0) {
+                this.warning('请添加辅检子项')
+                return
+            }
+            this.showDelDialog();
+        },
+        showDelDialog() {
+          const selected = this.selectedIndexList;
+          for (let i = 0; i < selected.length; i++) {
+            let item = {};
+            item.conceptId = selected[i].conceptId;
+            item.relationId = 18;
+            this.nodeList.push(item);
+          }
+          const param ={
+            "conceptId": this.form.conceptId,
+            "nodeList": this.nodeList,
+            "sonRelationId": 18
+          }
+          this.showConfirmDialog('是否建立该关联?', () => {
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+              apis.assistCheckPacsAddPacsRelation(param).then((res) => {
+              if (res.data.code  === '0') {
+                  this.warning(res.data.msg || '关联成功', 'success','1000')
+                  setTimeout(() => {
+                    //返回带搜索条件的首页
+                  this.$router.push({
+                      name:'AssistCheckSon',
+                    params: Object.assign({}, this.$route.params, {currentPage: 1})
+                  })
+                  }, 1000);
+              } else {
+                  this.warning(res.data.msg)
+              }
+              this.saveDisable = false
+              }).catch((err) => {
+                  this.warning(err);
+              })
+          });
+        },
+        showConfirmDialog(msg, resolve) {
+            this.$alert(msg, '提示', {
+                confirmButtonText: '确定',
+                type: 'warning'
+            }).then(() => {
+                resolve();
+            }).catch(() => {});
+        },
+        warning(msg, type,time) {
+            this.$message({
+                showClose: true,
+                message: msg,
+                type: type || 'warning',
+                duration:time || '3000'
+            })
+        },
+    }
+  }
+</script>
+
+<style lang="less">
+    @import '../../less/common.less';
+    .assayBox {
+        color: #606266;
+        min-width: 980px;
+        .topBack {
+            top: 0;
+        }
+        .assayTitle{
+            font-weight: bold;
+            margin-bottom: 20px;
+        }
+        .groupTitle {
+            background-color: #fff;
+            height: 40px;
+            line-height: 40px;
+            padding-left: 20px;
+        }
+        
+        .searchInput, .searchName {
+            display: inline-block;
+            height: 32px;
+            line-height: 32px;
+            border: 1px solid #a9a9a9;
+            margin: 0px 0 0 0;
+            padding: 0 5px;
+            float: left;
+            margin-top: 4px;
+        }
+        .isRequired .el-form-item__label::before {
+            content: '*';
+            color: red;
+        }
+        .searchName {
+            border-left: none;
+            cursor: pointer;
+            font-size: 16px;
+            padding: 0 14px;
+        }
+        .itemList {
+            position: absolute;
+            // display: none;
+            background: #fff;
+            width: 162px;
+            max-height: 150px;
+            border: 1px solid #a9a9a9;
+            left: 54px;
+            top: 37px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .diagItem {
+            padding: 0 5px;
+            height: 30px;
+            line-height: 30px;
+            font-size: 14px;
+            cursor: pointer;
+        }
+        .diagItem:hover {
+            background: #f5f7fa;
+        }
+        .addDepartForm {
+            position: relative;
+            background-color: #fff;
+            padding: 20px;
+            margin: 70px 20px 0px 20px;
+            border-bottom: 1px solid #c0c4cc;
+        }
+        .addDepartFormItem {
+            position: relative;
+        }
+        .symptomList {
+            background-color: #fff;
+             padding: 20px;
+             margin: 0px 20px 0px 20px;
+             min-height: 400px;
+        }
+        .screenIndexLabel {
+            float: left;
+            height: 40px;
+            line-height: 40px;
+            font-size: 14px;
+        }
+        .indexTab {
+            // width: 100%;
+            width: 600px;
+            border-collapse: collapse;
+            tr {
+                td {
+                    padding: 5px 10px;
+                    border-bottom: 1px solid #a9a9a9;
+                    text-align: center;
+                }
+            }
+            .selectedContent {
+                width: 25%;
+            }
+            .selectedContentGrop {
+                width: 55%;
+            }
+            .selectedContentOpera {
+                width: 20%;
+            }
+        }
+        .screenIndex {
+            width: 100%;
+            margin-bottom: 30px;
+            position: relative;
+        }
+        .indexList {
+            left: 42px;
+            top: 78px;
+        }
+        .groupInput {
+            text-align: center;
+            height: 28px;
+            color: #606266;
+            width: 60%;
+        }
+        .btn {
+            position: relative;
+            background-color: #fff;
+            margin: 0px 20px;
+            height: 40px;
+            padding: 20px;
+            .el-button {
+                position: absolute;
+                right: 20px;
+            }
+        }
+        .selectDepart {
+            
+        }
+    }
+    
+</style>

+ 263 - 0
src/components/medicalTerm/AssistCheckMultRelation.vue

@@ -0,0 +1,263 @@
+<template>
+    <div>
+        <crumbs title="辅检层级关联维护" minWidth="995px">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="医学标准术语:">
+                    <el-input size="mini" v-model="filter.term" placeholder="输入术语"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" style="margin:0 10px"  @click="addMedicalMultR">添加</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table :data="list"
+                      border
+                      style="width: 100%">
+                <el-table-column
+                        type="index"
+                        :index="indexMethod"
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        prop="operTime"
+                        label="操作时间"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column
+                        prop="libNameType"
+                        label="医学标准术语"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="otherNames"
+                        label="一级关联标准术语"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <!-- <el-table-column
+                        label="状态">
+                        <template slot-scope="scope">
+                          <span :class="scope.row.isDeleted == 'N'?'':'delete'">
+                            {{scope.row.isDeleted == 'N'?'启用中':'已删除'}}
+                          </span>
+                        </template>
+                </el-table-column> -->
+                <el-table-column
+                        prop="operName"
+                        label="操作人">
+                </el-table-column>
+                
+                <el-table-column
+                        label="操作" width="160">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button type="text" size="small" :class="scope.row.isDeleted == 'N'?'delete':'review'" @click="showDelDialog(scope.row)">{{scope.row.isDeleted == 'N'?'删除':'恢复'}}</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination v-if="total>pageSize"
+                           :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           layout="total,prev, pager, next, jumper"
+                           :total="total">
+            </el-pagination>
+        </div>
+
+    </div>
+</template>
+
+<script>
+  import api from '@api/medicalTerm.js';
+  export default {
+    name: 'AssistCheckMultRelation',
+    data: function () {
+      return {
+        list: [],
+        stateSelect:[
+          {id:'N',name:'启用中'},
+          {id:'Y',name:'已删除'},
+        ],
+        isState:'',
+        cacheData: {},
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+        searched: false,
+        filter: {
+          term:'',
+        },
+      }
+    },
+    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);
+      })
+    },
+    methods: {
+      addMedicalMultR(){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          filter: this.filter
+        } : {currentPage: this.currentPage};
+        this.$router.push({name:'AddAssistCheckMultRelation',
+          params:pam});
+      },
+      toEditProduct(row){
+        const param = {
+          conceptId: row.conceptId,
+          relationIds: [17,17,17],
+          typeIds: [16,16,16]
+        };
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          filter: this.filter
+        } : {currentPage: this.currentPage};
+        api.assistCheckMultRelationDetail(param).then((res) => {
+          const {code,data,msg} = res.data;
+          if(code=='0'){
+              const item = Object.assign({},row,data);
+              this.$router.push({name:'AddAssistCheckMultRelation',params:Object.assign(pam, {isEdit: true, data: item})});
+          }else{
+              this.$message({
+              message: msg,
+              type: 'warning'
+              });
+          }
+        })
+      },
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
+        this.searched = true;
+        api.assistCheckMultContactList(param).then((res) => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.list = data.records;
+            this.cacheData[param.current] = data.records;
+            this.total = data.total;
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
+        const param = {
+          name: this.filter.term,
+          current: this.currentPage,
+          size: this.pageSize,
+          relationId: 17,
+          startTypeIds: [71],
+          isOnlyHasRoot: 0
+        };
+        return param;
+      },
+      indexMethod(index) {
+        return ((this.currentPage - 1) * this.pageSize) + index + 1;
+      },
+      currentChange(next) {
+        this.currentPage = next;
+        if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+          this.list = this.cacheData[next];
+        } else {
+          this.getDataList(true);
+        }
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(item){
+        /*const param = {
+          term:item.term,
+          type:item.type,
+          id:item.id
+        }*/
+        const param = {
+          conceptId:item.conceptId,
+          // isDeleted:item.isDeleted === 'N'?'Y':'N',
+          relationIds: [17,17],
+          typeIds: [3,1]
+        }
+        let waringTxt = '是否删除该关系,可能对现有系统造成影响'
+        this.showConfirmDialog(waringTxt,()=>{
+          api.removeRelationContact(param).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.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      },
+      clearFilter(){
+        this.filter={
+          term:'',
+        };
+      },
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+    @import "../../less/admin.less";
+    .delete{
+        color: red;
+    }
+    .review{
+      color: #22ccc8;
+    }
+    .el-table .cell{
+      overflow: hidden;
+      white-space: nowrap;
+    }
+</style>

+ 247 - 0
src/components/medicalTerm/AssistCheckSon.vue

@@ -0,0 +1,247 @@
+<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.conceptName" 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="operTime"
+                    label="操作时间"
+                    width="180">
+                </el-table-column>
+                <el-table-column
+                    :resizable = "false"
+                    prop="libName"
+                    label="标准术语"
+                    show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                    :resizable = "false"
+                    prop="otherNames"
+                    label="子项"
+                    show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                    label="状态"
+                    show-overflow-tooltip>
+                    <template slot-scope="scope">
+                      <span :class="scope.row.isDeleted == 'N'?'':'delete'">
+                        {{scope.row.isDeleted == 'N'?'启用中':'已删除'}}
+                      </span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    :resizable = "false"
+                    prop="operName"
+                    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" :disabled="scope.row.isDeleted != 'N'">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button @click="showDelDialog(scope.row)" :class="scope.row.isDeleted == 'N'?'delete':'review'" type="text" size="small">{{scope.row.isDeleted == 'N'?'删除':'恢复'}}</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        <div class="pagination">
+            <el-pagination v-if="total>pageSize"
+                       :current-page.sync="currentPage"
+                       @current-change="currentChange"
+                       background
+                       :page-size="pageSize"
+                       layout="total,prev, pager, next, jumper"
+                       :total="total">
+            </el-pagination>
+        </div>       
+        </div>      
+    </div>
+</template>
+
+<script>
+  import api from '@api/medicalTerm.js';
+
+  export default {
+    name: 'AssistCheckSon',   //慢病指标值关联维护
+    data: function() {
+        return {
+            list: [],
+            searched: false,
+            filter:{
+              conceptName:'',
+            },
+            currentPage: 1,
+            pageSize: 10,
+            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);
+    })
+  },
+    methods: {
+        getDataList(isTurnPage) {
+            const param = this.getFilterItems(isTurnPage);
+            this.searched = true;
+            api.assistCheckPacsSonContactList(param).then((res) => {
+                if(res.data.code == '0') {
+                    this.list = res.data.data.records;
+                    this.total = res.data.data.total;
+                }
+            })
+        },
+        filterDatas() {
+            this.currentPage = 1;
+            this.getDataList();
+        },
+        addRelation() {
+          const pam = this.searched ? {
+            currentPage: this.currentPage,
+            filter: this.filter
+          } : {currentPage: this.currentPage};
+            this.$router.push({name:'AddAssistCheckSon', params: pam})
+        },
+        modifyRelation(row) {
+            const param = {
+                conceptId: row.conceptId,
+                // relationId:18
+                relationIds:[18], //9-23后台修改
+                typeIds:[16]
+            }
+            api.assistCheckGetPacsContactDetail(param).then((res) => {
+                if(res.data.code == '0') {
+                  const pam = this.searched ? {
+                    currentPage: this.currentPage,
+                    filter: this.filter
+                  } : {currentPage: this.currentPage};
+                    // const item = Object.assign({},row,{data: res.data.data});
+                    const item = res.data.data;
+                    this.$router.push({name:'AddAssistCheckSon',params:Object.assign(pam, {isEdit:true,data:item})});
+                }
+            })
+        },
+        currentChange(next) {
+            this.currentPage = next;
+            this.getDataList(true);
+        },
+        getFilterItems(isTurnPage) {
+          //翻页时筛选条件没点确定则清空
+          if(isTurnPage&&!this.searched){
+            this.filter.conceptName='';
+          };
+            const param = {
+                current: this.currentPage,
+                size: this.pageSize,
+                name:this.filter.conceptName
+            };
+            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(row){
+          const param = {
+            "conceptId": row.conceptId,
+            "isDeleted": row.isDeleted=== 'N'?'Y':'N',
+            "relationId": 18
+          };
+          const txt = row.isDeleted=== 'N'?'是否删除该关联?':'是否重新启用该关联?';
+          this.showConfirmDialog(txt,()=>{
+            api.assistCheckRemoveRelationPacs(param).then((res)=>{
+              if(res.data.code=='0'){
+                if(!this.searched){
+                  //未点确认时清空搜索条件
+                  this.filter={
+                    conceptName:'',
+                  };
+                }
+                if(row.isDeleted !== 'N'){       //恢复成功后跳转到筛选条件的首页
+                  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;
+    } 
+    .review{
+      color: #22ccc8;
+    }
+    .pagination {
+        min-width: 1010px;
+    }
+</style>

+ 12 - 0
src/routes.js

@@ -101,6 +101,13 @@ import QuestionWords from '@components/diagBase/QuestionWords.vue';
 //医学数据统计
 import MedicalStatistics from '@components/medicalStatistics/MedicalStatistics.vue';
 
+//医学术语库维护
+import AssistCheckMultRelation from '@components/medicalTerm/AssistCheckMultRelation.vue';
+import AddAssistCheckMultRelation from '@components/medicalTerm/AddAssistCheckMultRelation.vue';
+import AssistCheckSon from '@components/medicalTerm/AssistCheckSon.vue';
+import AddAssistCheckSon from '@components/medicalTerm/AddAssistCheckSon.vue';
+
+
 export default [
   {
     path: '/',
@@ -254,6 +261,11 @@ export default [
 
       {path:'LT-YXSYKWH-YXSYDCGLWH',component:MedicalMultRelation,name:'MedicalMultRelation'},   //医学术语--医学术语多层关联维护
       {path:'LT-YXSYKWH-TJYXSYDCGL',component:AddMedicalMultRelation,name:'AddMedicalMultRelation'},   //医学术语--添加医学术语多层关联
+      {path:'LT-YXSYKWH-FJCJGLWH',component:AssistCheckMultRelation,name:'AssistCheckMultRelation'},   //医学术语--辅检层级关联维护
+      {path:'LT-YXSYKWH-TJFJCJGL',component:AddAssistCheckMultRelation,name:'AddAssistCheckMultRelation'},   //医学术语--添加辅检层级关联
+      {path:'LT-YXSYKWH-FJZXWH',component:AssistCheckSon,name:'AssistCheckSon'},   //医学术语--辅检子项维护
+      {path:'LT-YXSYKWH-TJFJZX',component:AddAssistCheckSon,name:'AddAssistCheckSon'},   //医学术语--辅检子项维护
+       
 
       {path:'LT-YWZSJWH-DLTXDWH',component:SimpleQuestion,name:'SimpleQuestion'},  //预问诊-独立填写单
       {path:'LT-YWZSJWH-ZHTXDWH',component:CombinQuestion,name:'CombinQuestion'},  //预问诊-组合填写单

+ 3 - 3
vue.config.js

@@ -1,7 +1,7 @@
 const path = require('path');
 // const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.241:88';
-// const proxy_path = 'http://192.168.2.236:88';
+// const proxy_path = 'http://192.168.2.241:88';
+const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
 // const proxy_path = 'http://192.168.3.115:5050';
@@ -28,5 +28,5 @@ module.exports = {
                 '@api': path.resolve(__dirname,'./src/api/')
             }
         }
-    }
+    },
 };