luolei 4 éve
szülő
commit
f4cf210eb9

+ 26 - 11
src/components/basicKnow/AddTerm.vue

@@ -72,7 +72,7 @@
                       v-for="item in group.options"
                       :key="item.id"
                       :label="item.name"
-                      :value="item.code"
+                      :value="item.name"
                     ></el-option>
                   </el-option-group>
                 </el-select>
@@ -130,7 +130,6 @@
                 />
               </td>
               <td>
-                <!-- {{data.type}} -->
                 <template v-if="index==0&&copy">
                   <el-select
                     v-model="data.type"
@@ -303,6 +302,7 @@ export default {
       data: {
         name: '',
         type: '',
+        code: '',
         remark: '',
         isConcept: 1,
         spell: ''
@@ -472,7 +472,7 @@ export default {
       }]
       for(let i = 0;i < data.klConceptSub.length;i++){
         let tmp = data.klConceptSub[i]
-        tmp.name = tmp.libName
+        tmp.name = tmp.synonymName
         tmp.type = tmp.typeName
         tmp.typeId = tmp.libType
       }
@@ -489,7 +489,7 @@ export default {
             this.data = redata.libName[0];
             this.singleword = redata.libName;
             this.synonymous = redata.otherNames;
-            this.allwords = redata.libName.concat(result.data.otherNames);
+            this.allwords = redata.libName.concat(redata.otherNames);
             this.showMore = redata.isHasCommon;
             this.maxAge = redata.maxAge;
             this.minAge = redata.minAge;
@@ -607,6 +607,7 @@ export default {
             this.unfit = true;
           } else {
             // let current = this.synonymous[index-1];
+            console.log(9999000000)
             let current = this.allwords[index];
             current.spell = pinyin.getCamelChars(current.name);
             this.unfit = false;
@@ -631,7 +632,7 @@ export default {
             this.unfit = false;
             this.searchType = 'similar';
             this.searchIndex = index;
-            this.getSimilarList(this.synonymous[index].name);
+            this.getSimilarList(current.name);
           }
         }
       }
@@ -741,6 +742,7 @@ export default {
 
       // 过滤同义词空数据
       let realData = [];
+      console.log(99999,this.allWords)
       if (this.id) {
         //修改用暂存的列表
         realData = this.synonymous.filter(item => {
@@ -763,9 +765,18 @@ export default {
         });
       }
       let detailList = [];
+      console.log(this.data,realData,2222)
       for (let i = 0; i < realData.length; i++) {
-        realData[i].type = this.data.type;
+        let obj = {}
+        realData[i].synonymName = realData[i].name;
+        realData[i].typeId = this.data.code;
+
+        // obj.isConcept=realData[i].isConcept
+        // obj.remark=realData[i].remark
+        // obj.spell=realData[i].spell
+
         detailList.push(realData[i]);
+        // detailList.push(obj);
       }
       // 校验是否有名称全为数字
       const pattern = /[^0-9]/g;
@@ -804,6 +815,7 @@ export default {
           spell: this.data.spell,
           status: this.data.status||1,
           libType: this.data.typeId,
+          typeId:this.data.typeId,
           synonymName: this.data.synonymName,
           isHasCommon: this.data.isHasCommon,
           libId: this.data.libId,
@@ -819,15 +831,17 @@ export default {
           libName: this.data.name,
           remark: this.data.remark,
           spell: this.data.spell,
-          libType: this.data.typeId||this.data.type,
-          libId: this.data.libId||-1*Math.random(),
+          libType: this.data.typeId||this.data.code,
+          typeId:this.data.typeId||this.data.code,
+          libId: this.data.libId,
           status: this.data.status||1,
           isHasCommon: this.data.isHasCommon||0,
-          synonymName: this.data.synonymName,
-          klConceptSub: [],
+          synonymName: '',
+          klConceptSub: detailList||[],
         };
       }
-      // return
+      console.log(params,5555)
+      // return false
       this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
       api.saveBaseConceptInfo(params).then(res => {
         const result = res.data;
@@ -858,6 +872,7 @@ export default {
       this.typeList.map((v, i) => {
         if (v.name == e) {
           this.showMore = v.isHasCommon;
+          this.data.code = v.code
         }
       });
       if (e == '诊断') {

+ 1 - 1
src/components/basicKnow/BasicRelationship.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="基础术语维护" minWidth="995px" class="knowledgeTitle">
+    <crumbs title="基础关系类型维护" minWidth="995px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="关系类型名称:">
           <el-select v-model="filter.type" clearable filterable placeholder="请选择" size="mini">

+ 14 - 8
src/components/basicKnow/TreeTab.vue

@@ -15,16 +15,23 @@ export default {
     return {
       curId:'1',
         tab:[
-          {name:'ICD10疾病类别',id:'1'},
-          {name:'科室疾病类别',id:'2'},
-          {name:'药物类别',id:'3'},
-          {name:'症状类别',id:'4'},
-          {name:'手术和操作类别',id:'5'},
-          {name:'实验室检查类别',id:'6'},
-          {name:'辅助检查类别',id:'7'},
+          {name:'化学物质类别',id:'1'},
+          {name:'治疗学类别',id:'2'},
+          {name:'药理学类别',id:'3'},
+          {name:'解剖学类别',id:'4'},
+          {name:'实验室检查类别',id:'7'},
+          {name:'辅助检查类别',id:'8'},
         ],
     }
   },
+  mounted(){
+    let elSide = document.querySelector('.el-aside'),tabWidth = document.querySelector('.tabList');
+    window.onresize = function(){
+      tabWidth = document.querySelector('.tabList')
+      tabWidth.style.left = elSide.offsetWidth+20+'px'
+    }
+    tabWidth.style.left = elSide.offsetWidth+20+'px'
+  },
   methods:{
       handleTabClick(id){
         this.curId = id
@@ -44,7 +51,6 @@ export default {
   border-bottom: 10px solid #dee2ea;
   box-sizing: border-box;
   ul {
-      margin: 0 0 0 20px;
       background-color: #fff;
     li {
       float: left;

+ 1 - 1
src/components/common/Crumbs.vue

@@ -65,7 +65,7 @@ div.container {
 
 h4 {
   font-size: 15px;
-  width: 280px;
+  width: auto;
   overflow: hidden; /*超出部分隐藏*/
   white-space: nowrap; /*不换行*/
   text-overflow: ellipsis; /*超出部分文字以...显示*/

+ 4 - 0
src/components/knowledgeExtra/DiseaseTree.vue

@@ -240,6 +240,10 @@ export default {
           const { data } = res
           if(data.code == '0') {
             this.message(res.data.msg||'术语关系建立成功','success');
+            this.$router.push({
+              name: 'AboutDisease',
+              params: Object.assign({}, this.$route.params, { currentPage: 1 })
+            });
           } else {
             this.message(data.msg);
           }

+ 1 - 1
src/components/knowledgeExtra/KnowledgeAll.vue

@@ -77,7 +77,7 @@ export default {
     },
     data(){
       return{
-        minTitle:'分诊人体图数据维护-添加',
+        minTitle:'树形结构维护',
         tab:[
           {name:'ICD10疾病类别',id:'1'},
           {name:'科室疾病类别',id:'2'},

+ 1 - 1
src/components/knowledgeExtra/KnowledgeBaseType.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs title="基础术语维护" minWidth="995px" class="knowledgeTitle">
+    <crumbs title="基础术语类型维护" minWidth="995px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="术语类型:">
           <el-select v-model="filter.type" clearable filterable placeholder="请选择" size="mini">