소스 검색

术语关联维护

liucf 5 년 전
부모
커밋
2f156fbb2d
2개의 변경된 파일61개의 추가작업 그리고 9개의 파일을 삭제
  1. 14 6
      src/components/icss/AddConceptRelation.vue
  2. 47 3
      src/components/icss/ConceptRelation.vue

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

@@ -31,7 +31,7 @@
     <div class="bottomPartLeft fl">
       <p class="assayTitle">关联标准术语</p>
       <p class="symptomPoolTitle">术语搜索</p>
-      <el-form>
+      <!-- <el-form>
         <el-form-item label="类型:">
           <el-select v-model="type" placeholder="请选择" size="small">
           <el-option 
@@ -42,7 +42,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-    </el-form>
+          </el-form> -->
 
     <div class="symptomPool">
       <el-input
@@ -127,11 +127,16 @@ export default {
       type:null,
       typeList:[],
       nodeList:[],
-      saveDisable: false  //保存按钮禁止点击
+      saveDisable: false,  //保存按钮禁止点击
+      conceptType:'',
+      searchType:''
     }
   },
         created(){
-          const { isEdit, data } = this.$route.params;
+          const { isEdit, data , filter} = this.$route.params;
+          const typeL = filter.type.toString().split('101');
+          this.conceptType = typeL[0];
+          this.searchType = typeL[1];
           if(isEdit) {
             this.titleText = '修改';
             this.isEdit = isEdit;
@@ -143,6 +148,7 @@ export default {
           let typeList = JSON.parse(localStorage.getItem("knowledgeEnumsData"));
           // this.typeList = typeList.lexiconTypeEnum;
           this.typeList = typeList.concatLexiconTypeEnum; //7-8 RGB
+          this.getTagList();//获取标签池内容
         },
         watch: {
           searchTagVal(newVal, preVal) {
@@ -167,7 +173,8 @@ export default {
           const param = {
             "name": this.searchDiagVal,
             "relationId": 17,
-            "relationPosition": 1
+            "relationPosition": 1,
+            "typeId":this.conceptType
           }
           api.getConceptInfoAssay(param).then((res)=>{
            if(res.data.code === '0') {
@@ -192,7 +199,8 @@ export default {
               "name": this.searchTagVal,
               "relationId": 17,
               "relationPosition": 2,
-              "typeId": this.type, //选中类型的id
+              // "typeId": this.type, //选中类型的id
+              "typeId": this.searchType, //选中类型的id
               "relationConceptId":this.form.conceptId,
               "excludedConceptIds":notIds
             }

+ 47 - 3
src/components/icss/ConceptRelation.vue

@@ -11,6 +11,14 @@
                 </el-form-item>
             </el-form>
         </crumbs>
+        <div class="tab">
+          <span v-for="it in typeList" 
+                :key="it.key" 
+                :class="{'curr':it.key==filter.type}"
+                @click="toggTab(it)">
+            {{it.name}}
+          </span>
+        </div>
         <div class="contents">
             <el-table
                 :data="list"
@@ -90,14 +98,18 @@ export default {
           searched: false,
           filter:{
             conceptName:'',
-            type:'471011' //默认展示科室
+            type:'' 
           },
           currentPage: 1,
           pageSize: 10,
           total: 0,
+          typeList:[]
         }
     },
     created() {
+      let typeList = JSON.parse(localStorage.getItem("knowledgeEnumsData"));
+      this.typeList = typeList.relationModelTypeEnum;
+      this.filter.type = this.typeList[0].key;//默认展示科室,请置于第一位
       const that = this;
       //返回时避免参数未赋值就获取列表
       setTimeout(function(){
@@ -119,6 +131,10 @@ export default {
     })
   },
     methods: {
+        toggTab(item){
+          this.filter.type = item.key;
+          this.getDataList();
+        },
         getDataList(isTurnPage) {
             const param = this.getFilterItems(isTurnPage);
             this.searched = true;
@@ -137,7 +153,7 @@ export default {
           const pam = this.searched ? {
             currentPage: this.currentPage,
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,filter:Object.assign(this.filter,{conceptName:''})};
           this.$router.push({name:'AddConceptRelation',params:pam})
         },
         modifyRelation(row) {
@@ -148,7 +164,7 @@ export default {
           const pam = this.searched ? {
             currentPage: this.currentPage,
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,filter:Object.assign(this.filter,{conceptName:''})};
             api.getConceptRelationDet(param).then((res) => {
               if(res.data.code=='0'){
                 const { data } = res.data;
@@ -238,6 +254,34 @@ export default {
 
 <style lang="less">
     @import "../../less/admin.less";
+    .tab{
+      background:#fff;
+      padding: 5px 0;
+      position: relative;
+      top:40px;
+      span{
+        display: inline-block;
+        // width:145px;
+        padding: 0 20px;
+        height: 45px;
+        line-height: 45px;
+        text-align: center;
+        // border: 1px solid #ccc;
+        margin-right: 5px;
+        cursor: pointer;
+      }
+      .curr{
+        color: #48C5D7;
+        &:after{
+          content: '';
+          width:50px;
+          height: 2px;
+          background:#48C5D7;
+          display: block;
+          margin: 0 auto;
+        }
+      }
+    }
     .delete{
        color: red;
     }