浏览代码

医学术语关联维护诊断关联症状

zhangxc 5 年之前
父节点
当前提交
200490259d
共有 2 个文件被更改,包括 25 次插入12 次删除
  1. 9 6
      src/components/icss/AddConceptRelation.vue
  2. 16 6
      src/components/icss/ConceptRelation.vue

+ 9 - 6
src/components/icss/AddConceptRelation.vue

@@ -129,14 +129,16 @@ export default {
       nodeList:[],
       saveDisable: false,  //保存按钮禁止点击
       conceptType:'',
-      searchType:''
+      searchType:'',
+      relationId: ''
     }
   },
         created(){
-          const { isEdit, data , filter} = this.$route.params;
+          const { isEdit, data , filter,relationId} = this.$route.params;
           const typeL = filter.type.toString().split('101');
           this.conceptType = typeL[0];
           this.searchType = typeL[1];
+          this.relationId = relationId;
           if(isEdit) {
             this.titleText = '修改';
             this.isEdit = isEdit;
@@ -144,6 +146,7 @@ export default {
             this.form.conceptId =data.conceptId;
             this.form.conceptName =data.conceptName;
             this.form.conceptNameType =data.conceptNameType;
+            
           }
           let typeList = JSON.parse(localStorage.getItem("knowledgeEnumsData"));
           // this.typeList = typeList.lexiconTypeEnum;
@@ -172,7 +175,7 @@ export default {
           searchDiag() {
             const param = {
               "name": this.searchDiagVal,
-              "relationId": 17,
+              "relationId":  this.relationId,
               "relationPosition": 1,
               "typeId":this.conceptType,
               "relationTypeId":this.searchType //9-19新增
@@ -198,7 +201,7 @@ export default {
           //2019-8-15 需求修改:搜索结果与类型关联bug2045
           let param = {
               "name": this.searchTagVal.trim(),
-              "relationId": 17,
+              "relationId":  this.relationId,
               "relationPosition": 2,
               // "typeId": this.type, //选中类型的id
               "typeId": this.searchType, //选中类型的id
@@ -324,13 +327,13 @@ export default {
         for (let i = 0; i < rightTagsList.length; i++) {
           let item = {};
           item.conceptId = rightTagsList[i].conceptId;
-          item.relationId = 17;
+          item.relationId = this.relationId;
           this.nodeList.push(item);
         }
         const param ={
           "conceptId": this.form.conceptId,
           "nodeList": this.nodeList,
-          "sonRelationId": 17,
+          "sonRelationId": this.relationId,
           "sonTypeId":this.searchType //9-20新增
         }
         this.showConfirmDialog('是否建立该关联?', () => {

+ 16 - 6
src/components/icss/ConceptRelation.vue

@@ -108,7 +108,8 @@ export default {
           pageSizeArr:config.pageSizeArr,
           pageLayout:config.pageLayout,
           total: 0,
-          typeList:[]
+          typeList:[],
+          relationId: 17
         }
     },
     created() {
@@ -134,6 +135,7 @@ export default {
       //const pm = to.param;
       Object.assign(vm, to.params);
       vm.inCurrentPage=to.params.currentPage;
+      vm.relationId=to.params.relationId;
     })
   },
     methods: {
@@ -147,6 +149,11 @@ export default {
           this.filter.conceptName = '';
           this.filter.type = item.key;
           this.currentPage = 1;
+          if(item.key === 181011) {
+            this.relationId = 4
+          } else {
+             this.relationId = 17
+          }
           this.getDataList();
         },
         getDataList(isTurnPage) {
@@ -178,19 +185,22 @@ export default {
           const pam = this.searched ? {
             currentPage: this.currentPage,
             pageSize:this.pageSize,
-            filter: this.filter
+            filter: this.filter,
+            relationId: this.relationId
           } : {currentPage: this.currentPage,
-            pageSize:this.pageSize,filter:Object.assign(this.filter,{conceptName:''})};
+            pageSize:this.pageSize,relationId: this.relationId,filter:Object.assign(this.filter,{conceptName:''})};
           this.$router.push({name:'AddConceptRelation',params:pam})
         },
         modifyRelation(row) {
           const typeL = this.filter.type.toString().split('101');
           const typeId = [];
+          const relationIds = []
+          relationIds.push(this.relationId)
           typeId[0] = +typeL[1];
             const param = {
               "conceptId": row.conceptId,
               // "relationId":17
-              "relationIds":[17],//9-20新增
+              "relationIds":relationIds,//9-20新增
               "typeIds":typeId
             }
           const pam = this.searched ? {
@@ -202,7 +212,7 @@ export default {
             api.getConceptRelationDet(param).then((res) => {
               if(res.data.code=='0'){
                 const { data } = res.data;
-                this.$router.push({name:'AddConceptRelation',params:Object.assign(pam, {isEdit: true, data: data})});
+                this.$router.push({name:'AddConceptRelation',params:Object.assign(pam, {isEdit: true, relationId: this.relationId,data: data})});
               } else {
                 this.warning(res.data.msg);
               }
@@ -224,7 +234,7 @@ export default {
                 current: this.inCurrentPage||this.currentPage,
                 size: this.pageSize,
                 name:this.filter.conceptName.trim(),
-                relationId:17,
+                relationId:this.relationId,
                 relationModelTypeCode:this.filter.type
             };
             return param;