Browse Source

merge from 'luolei'

zhangxc 6 năm trước cách đây
mục cha
commit
aad93151bf

+ 18 - 1
src/api/config.js

@@ -105,5 +105,22 @@ export default {
 		'LT-DDXT': 'el-icon-setting',
 		'LT-CPXGL': 'el-icon-upload',
 		'LT-GRZX': 'el-icon-news'
-  }
+  },
+  labelTypesMaps: {       //// 归属和填写单类型限制
+    '1':['2','3','4','11'],
+    '3':['4','6'],
+    '4':[,'2','3'],
+    '5':['7'],
+    '6':['9'],
+    '7':['9'],
+    '8':['9']
+  },
+  groupParams:[
+    {controlType:[1,2],tagType:[1],notTagType:[8]},     //多列多选(杂音/初为)     notTagType为文字标签剔除
+    {controlType:[1,2,6,7],tagType:[1,2],notTagType:[8]},  //多项统一横铺标签(血压)
+    {controlType:[1,2,6,7],tagType:[1,2],notTagType:[8]},  //症状详细(症状尾巴)
+    {controlType:[1,2],tagType:[1,2,3,4,10],notTagType:[8]}, //组合项标签(既往史)
+    {controlType:[1,6],tagType:[],notTagType:[8]},    //化验组合
+    {controlType:[1,2],tagType:[],notTagType:[8]},   //症状推送类型(添加症状)
+  ]
 }

+ 18 - 0
src/api/icss.js

@@ -2,6 +2,7 @@ import axios from 'axios';
 import config from '@api/config.js';
 
 const urls = config.urls;
+const groupParams = config.groupParams;
 export default {
     getDropList() {
         return axios.post(urls.getDropList)
@@ -42,4 +43,21 @@ export default {
     deleteTagGroup(param) {
         return axios.post(urls.deleteTagGroup, param)
     },
+    getGroupParams(val){
+      if(val == 2){
+        return groupParams[0]
+      }else if(val == 3){
+        return groupParams[1]
+      }else if(val == 4){
+        return groupParams[2]        
+      }else if(val == 6){
+        return groupParams[3]        
+      }else if(val == 7){
+        return groupParams[4]        
+      }else if(val == 11){
+        return groupParams[5]        
+      }else {
+        return null
+      }
+    }
 }

+ 4 - 5
src/components/icss/BloodPressTagGroup.vue

@@ -74,7 +74,7 @@ export default {
         options: {
             default: () => [],
             type: Array
-        }
+        },
     },
     data() {
         return {
@@ -246,15 +246,14 @@ export default {
                 }
                 
             }
-            let param = {
+            let param1 = api.getGroupParams(3);            
+            let param2 = {
                 "tagName": this.searchVal,
-                "tagType": [1, 2],
-                "controlType": [1,2,6,7],
                 "type": this.type || '',
                 "notIds": notIds,
                 "sexType": this.sexType,
-
             }
+            let param = Object.assign(param1,param2)
             api.searchTagList(param).then((res) => {
                 if (res.data.code === '0') {
                     this.leftTagsList = res.data.data

+ 7 - 5
src/components/icss/InspactTagGroup.vue

@@ -82,8 +82,12 @@ export default {
         }
     },
     mounted() {
+      this.$nextTick(()=>{
+        this.rightTagsList = this.options
         this.rightTagsList2 = this.options
+        this.$emit('changeActionData',this.options, false);
         this.searchTagList()
+      })
     },
     watch: {
         pool(newVal, preVal) {
@@ -191,17 +195,15 @@ export default {
                 if(this.rightTagsList[i].id) {
                     notIds.push(this.rightTagsList[i].id)
                 }
-                
             }
-            let param = {
+            let param1 = api.getGroupParams(7);
+            let param2 = {
                 "tagName": this.searchVal,
-                "tagType": [1, 2],
-                "controlType": [],
                 "type": this.type || '',
                 "notIds": notIds,
                 "sexType": this.sexType,
-
             }
+            let param = Object.assign(param1,param2)
             api.searchTagList(param).then((res) => {
                 if (res.data.code === '0') {
                     this.leftTagsList = res.data.data

+ 3 - 3
src/components/icss/NoiseTemplate.vue

@@ -164,21 +164,21 @@ export default {
     },
     validatePass() {      //验证成功回调,调取接口
       //仍需验证标签明细是否选择
-      console.log('.sendIds',this.sendIds)
-      if (JSON.stringify(this.sendIds) == '[[],[],[],[],[],[]]' && this.dataPub.region1 != 6 && this.dataPub.region1 != 7 && this.dataPub.region1 != 8) {
+      let type = this.dataPub.region1;
+      if (JSON.stringify(this.sendIds) == '[[],[],[],[],[],[]]' && type != 6 && type != 7 && type != 8) {
         this.$message({
           message: '请选择标签明细',
           type: 'warning'
         });
         return;
       }
-
       let detailLis = utils.dataRecombination(this.sendIds, this.dataPub.region2)
       let param = {
         "questionWrapper": {
           "controlType": 0,                            //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
           "id": this.editData.id || '',                //新增id空
           "type": this.dataPub.region1,                //标签归属
+          // "itemType":0,                                //0:是症状,1:不是症状
           "tagType": this.dataPub.region2,             //标签类型
           "tagName": this.dataPub.region3,             //系统名称
           "name": this.dataPub.region4,                //界面名称

+ 48 - 14
src/components/icss/PubTagPartDetail.vue

@@ -146,12 +146,39 @@ export default {
       notIds:[],               //去重IDs
       multipleItem:[],         //右侧选中的单条标签
       currentTipLis:[],         //右侧选中的标签提示
+      tmpNum:0,
     }
   },
   mounted(){
-    this.poolDetailList = this.options
-    console.log(this.options)
-    this.searchTagList()
+    this.$nextTick(()=>{
+      let tagList = this.options;
+      if(tagList.length > 0){
+        let tmpArr = [[],[],[],[],[],[]];
+        this.tmpNum = 1
+        if(tagList[0].formPosition == 1){
+          tagList.map((val,idx)=>{
+            if(this.sign == 2) {     //杂音修改
+                tmpArr[idx].push(val)
+            }else{       //既往史修改
+              tmpArr[idx] = val.questionMapping
+            }
+          })
+        }else{
+          tagList.map((val,idx)=>{
+            if(this.sign == 2) {     //杂音修改
+                tmpArr[idx+1].push(val)
+            }else{       //既往史修改
+              tmpArr[idx+1] = val.questionMapping
+            }
+          })
+        }
+        
+        this.poolDetailList = tmpArr
+        this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList);     //二维转一维
+        this.searchTagList()
+        this.getPoolDetailListTips();
+      }
+    })
   },
   watch: {
     pool(newVal, preVal) {
@@ -163,18 +190,20 @@ export default {
       }
     },
     sexType(newVal, preVal) {
-      if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
-        this.clearData()
+      if (newVal != preVal) {
+        if (JSON.stringify(newVal) != JSON.stringify(preVal) && this.tmpNum != 1) {
+          this.clearData()
+        }
       }
     },
     sign(newVal, preVal) {
-      if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
+      if (JSON.stringify(newVal) != JSON.stringify(preVal) && this.tmpNum != 1) {
         this.clearData()
       }
     },
     type(newVal, preVal) {
-      if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
-        this.clearData()
+      if (JSON.stringify(newVal) != JSON.stringify(preVal) && this.tmpNum != 1) {
+        // this.clearData()
       }
     },
     searchVal(newVal, preVal){
@@ -202,11 +231,14 @@ export default {
     },
     selectTagOne(e,id,n){
       e.stopPropagation()
+      if(this.activePartSon != n){
+        this.multipleItem = []
+      }
       this.activePartSon = n
       this.activePart = -1
       this.selectArr = [false, false, false, false, false, false]
       this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList);     //二维转一维
-      if(utils.filterArr(this.multipleItem,id,2)){
+      if(utils.filterArr(this.multipleItem,id,2)){     //选中的有没有单列的小项,有去掉
         let tmpArr = utils.filterArr(this.multipleItem,id,1);
         this.multipleItem = tmpArr;
       }else{
@@ -301,14 +333,16 @@ export default {
         ids.push(value.id)
       })
       this.notIds = ids;
-      let param = {
+      
+      let param1 = !!this.sign ? api.getGroupParams(this.sign): {};
+      let param2 = {
         "tagName": this.searchVal || '',
         "type": this.type,
         "notIds": this.notIds,
-        "tagType": this.sign == 2?[1]:(this.sign == 6?[1,2,3,4,10]:[]),
-        "controlType":this.sign == 2?[1,2]:[],
         "sexType": this.sexType,
       }
+      let param = Object.assign(param1,param2)
+
       api.searchTagList(param).then((res) => {
         if (res.data.code === '0') {
           this.currentPool = res.data.data
@@ -394,7 +428,7 @@ export default {
             tmpArr.push(res.data.data[idStr]);
             this.selectArr.map((flg,idx)=>{         //判断右侧有没有选中
               if(flg){    //有选中
-                if(idx == 0 && res.data.data[idStr].questionDetailList && res.data.data[idStr].questionDetailList.length > 1){
+                if(idx == 0 && res.data.data[idStr].questionDetailList && res.data.data[idStr].questionDetailList.length != 1){
                   this.$message({
                     showClose: true,
                     message: '添加的数据有误',
@@ -424,7 +458,7 @@ export default {
               }
               this.currentLis = [];       //左侧选中数据清空
             })
-            console.log('单选的数据',this.poolDetailList)
+            // console.log('单选的数据',this.poolDetailList)
           }else{           //判断是多选
             let num = 0,tmpArr = [];
             this.currentLis.map((id)=>{

+ 4 - 4
src/components/icss/SymptomTagGroup.vue

@@ -258,15 +258,15 @@ export default {
                 }
                 
             }
-            let param = {
+            
+            let param1 = api.getGroupParams(4);            
+            let param2 = {
                 "tagName": this.searchVal,
-                "tagType": [1, 2],
-                "controlType": [1,2,6,7],
                 "type": this.type || '',
                 "notIds": notIds,
                 "sexType": this.sexType,
-
             }
+            let param = Object.assign(param1,param2)
             api.searchTagList(param).then((res) => {
                 if (res.data.code === '0') {
                     this.leftTagsList = res.data.data