Explorar o código

Merge branch 'dev' of http://192.168.2.236:10080/zhouna/platformFront into dev

liucf %!s(int64=5) %!d(string=hai) anos
pai
achega
0b7dc53d74

+ 1 - 1
src/api/config.js

@@ -1,6 +1,6 @@
 export default {
   host:'http://192.168.2.241:5050',
-  imgHost:'http://192.168.2.121:82',      //富文本编辑器图片回传地址
+  imgHost:'http://192.168.2.241:82',      //富文本编辑器图片回传地址
   urls: {
     /* 登录注册相关接口 */
     'getImgVerification': '/api/user/userver/getImgVerification',

+ 8 - 6
src/api/utils.js

@@ -138,14 +138,16 @@ export default {
         mapping.formPosition = 0;
         mapping.exclusionType = 0;
         mapping.symptomType = dataArr[i].symptomType
-        if(dataArr[i].type === 'input') {
-          if(dataArr[i].text) { //过滤掉输入框未输入内容项
-            mapping.text = dataArr[i].text
+        if(dataArr[i].type){
+          if(dataArr[i].type === 'input') {
+            if(dataArr[i].text) { //过滤掉输入框未输入内容项
+              mapping.text = dataArr[i].text
+              tmpArr.push(mapping)
+            }
+          } else {
+            mapping.sonQuestion = dataArr[i].id
             tmpArr.push(mapping)
           }
-        } else {
-          mapping.sonQuestion = dataArr[i].id
-          tmpArr.push(mapping)
         }
       } else if(type == 11) {    //推送症状类型(添加症状)
         mapping.formPosition = 0;

+ 232 - 24
src/components/diagBase/AddDiagBase.vue

@@ -22,12 +22,13 @@
                     </li>
                 </ul>
             </el-form-item>
-             <el-form-item class="isRequired" label="已选添加疾病名称:">
+             <el-form-item class="isRequired" label="已选添加疾病名称:" :class="{colorRed: !disNameExist}">
                 {{disName}}
             </el-form-item>
         </el-form>
         <div class="symptomList">
             <p class="moduleTitle">疾病特征:</p>
+            <p class="inpTips">序号输入规则“序号+.”后可输入的范围0~99;标准词只能有一个词;化验类型关联只能出现一个词,其他类型可以输入多个词;化验类型可输入结果列,其他类型不可输入</p>
             <table class="diagTable">
                 <tr class="tableTitle">
                     <td class="FeatureSort">排序</td> 
@@ -105,7 +106,7 @@
                 </tr>
             </table>
             <p class="moduleTitle">诊断公式:</p>
-            <p class="inpTips">可输入数字(0~9)规定汉字:任、一、二、三、四、五、六、七、八、九、十,其余汉字不可输入;可输入的符号:“.”、“/”、“()”</p>
+            <p class="inpTips">可输入数字(0~9);可输入规定汉字:任、一、二、三、四、五、六、七、八、九、十,其余汉字不可输入;可输入的符号:“.”、“/”、“()”  “+”;确诊还可输入“拟、诊”二字;鉴别诊断的序号不可输入公式中,数据放入后该条件无效;</p>
             <table class="diagTable">
                 <tr class="tableTitle"> 
                     <td class="FormulaSort">排序</td> 
@@ -124,11 +125,12 @@
                         <el-tooltip :disabled="!item.verifyFormula"  class="item" effect="dark" :content="item.verifyFormula" placement="top">
                             <el-input class="groupTextarea"
                                 type="textarea"  
+                                :readonly="!item.type"
                                 :autosize="{ minRows: 1}"
-                                :class="{borderRed:item.verifyFormula}" 
+                                :class="{borderRed:item.verifyFormula,inpDisabled:!item.type}"
                                 :title="item.formula" 
                                 v-model.trim="item.formula" 
-                                @input="handleInp(index,$event,'FormulaNumber')"  
+                                @input="handleInp(index,$event,'FormulaNumber',item.type)"  
                                 @focus="clickItem(index,'FormulaNumber')">
                             </el-input>
                         </el-tooltip> 
@@ -145,8 +147,12 @@
             </table>
              <div class="btn clearfix">
                      <div class="btnBox">
+                        <!-- <el-button size="mini" @click="uploadClick">导入</el-button>
+                        <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
+                          -->
                          <el-button
                                 type="primary"
+                                :disabled = "isReady"
                                 @click="submitForm('save')"
                                 >校验并保存数据</el-button>
                             <el-button
@@ -211,6 +217,8 @@
             isEdit: false,
             saveDisable: false ,
             hasQuestion: 1, //是否有问题词
+            disNameExist: true, //诊断名称是否存在
+            isReady:false,
             showDiagList: false
         }
     },
@@ -225,6 +233,7 @@
                 this.titleText = '修改';
                 this.disName = data.disName
                 this.id = data.id
+                this.disNameExist = data.disNameExist
                 if(data.disFeature.length) {
                     this.disFeatureList = data.disFeature
                 }   
@@ -314,6 +323,94 @@
                 this.disFormulaList.splice(index, 1)
             }
         },
+        //导入
+        // uploadClick() {
+        //     let inp = document.getElementById("upFile");
+        //     inp.click();
+        // },
+        // uploadFile(e){
+        //     let fileInfo = e.target.files[0];
+        //     e.preventDefault();
+        //     let formData = new FormData();
+        //     formData.append('uploadfile', fileInfo);
+        //     const header = {
+        //         headers:{
+        //         'Content-Type': 'multipart/form-data'
+        //         }
+        //     }
+        //     api.importDiagnosticBasis(formData,header).then((res)=>{
+        //         console.log('ress', res)
+        //         if(res.data.code==0){
+        //             const data = res.data.data
+        //             this.warning('上传成功','success')
+        //             let feature = data.feature
+        //             let equation = data.equation
+        //             const featureList = []
+        //             const formulaList = []
+
+        //             if(feature&&feature.length > 0) {
+        //                for(let i = 1; i <feature.length; i++) {
+        //                    const item = {}
+        //                    item.type = '';
+        //                    for (let j = 0; j < this.featureTypeList.length; j++) {
+        //                        if(feature[i].type.indexOf(this.featureTypeList[j].name) > -1) {
+        //                            item.type = this.featureTypeList[j].key
+        //                            break;
+        //                        }
+        //                    }
+                           
+        //                    item.code = feature[i].code
+        //                    item.standard = feature[i].standard
+        //                    item.relation = feature[i].associated
+        //                    if(item.type === 4) {
+        //                        item.result = ''
+        //                    } else {
+        //                         item.result = feature[i].result
+        //                    }
+        //                    featureList.push(item)
+        //                }
+        //             }
+        //             if(equation&&equation.length > 0) {
+        //                for(let i = 1; i <equation.length; i++) {
+        //                    const item = {}
+        //                    item.type = '';
+        //                    for (let j = 0; j < this.formulaTypeList.length; j++) {
+        //                        if(equation[i].type.indexOf(this.formulaTypeList[j].name) > -1) {
+        //                            item.type = this.formulaTypeList[j].key
+        //                            break;
+        //                        }
+        //                    }
+        //                    item.formula = equation[i].associated
+                           
+        //                    formulaList.push(item)
+        //                }
+        //             }
+        //             this.disFeatureList = featureList
+        //             this.disFormulaList = formulaList
+        //             console.log(' this.disFormulaListResult',  this.disFormulaListResult)
+        //         }else{
+        //         /*this.$message({
+        //             dangerouslyUseHTMLString: true,
+        //             message:res.data.msg,
+        //             type:'warning'
+        //         });*/
+        //         this.$alert(res.data.msg,'错误信息',{
+        //             dangerouslyUseHTMLString: true,
+        //             confirmButtonText: '确定',
+        //             callback: action => {
+        //             /*this.$message({
+        //                 type: 'info',
+        //                 message: `action: ${ action }`
+        //             });*/
+        //             }
+        //         });
+        //         }
+        //     })
+            
+        //     //解决上传相同文件不触发change
+        //     let inp = document.getElementById("upFile");
+        //     inp.value = "";   
+        // },
         updateNeo() {
             this.submitForm('updateNeo').then(() => {
                 if(this.hasQuestion == 0) {
@@ -345,7 +442,7 @@
                         diagnoseId: this.id
                     }
                     api.exportDiagnosticAll(param).then((res) => {
-                        utils.downloadExportedData(res.data,'诊断依据');
+                        utils.downloadExportedData(res.data,'诊断依据.xls');
                     })
                 }else {
                     this.warning('导出失败');
@@ -403,18 +500,81 @@
                     const errStr = "第" + (i+ 1) +"行必填项未填写"
                     errStrList.push(errStr)
                 }
+                let regex =new RegExp(`^${disFeatureList[i].type}\\.(0|[1-9]\\d?)$`,) 
+                if(disFeatureList[i].code &&!regex.test(disFeatureList[i].code)) {  //序号和类型不匹配
+                    codeErrorNum++
+                    disFeatureList[i].codeError = "序号和类型不匹配"
+                    const errStr = "疾病特征第" + (i+ 1) +"行序号和类型不匹配"
+                    errStrList.push(errStr)
+                } else { //序号和类型匹配但序号重复
+                    let codeArr =  disFeatureList.filter(item => item.code ===disFeatureList[i].code) 
+                    if(codeArr.length > 1) {
+                        codeErrorNum++
+                        disFeatureList[i].codeError = "序号重复"
+                        const errStr = "疾病特征第" + (i+ 1) +"行序号重复"
+                        errStrList.push(errStr)
+
+                    }
+                }
                 if(disFeatureList[i].type == '3' && disFeatureList[i].result && !disFeatureList[i].relation) {
                      disFeatureList[i].relationNull = "未填写关联词"
                      const errStr = "第" + (i+ 1) +"行化验项数据填写不完整"
                     errStrList.push(errStr)
                 }
-                let regex =new RegExp(`${disFeatureList[i].type}\\.[1-9]\\d?`) 
-                if(disFeatureList[i].code &&!regex.test(disFeatureList[i].code)) {
-                    codeErrorNum++
-                    disFeatureList[i].codeError = "序号和类型不匹配"
-                    const errStr = "疾病特征第" + (i+ 1) +"行序号和类型不匹配"
+               
+                //导入后判断
+                // let regexPause = new RegExp(`、`)      //判断标准词是否有顿号
+                //  if(disFeatureList[i].standard &&regexPause.test(disFeatureList[i].standard)) {
+                //     disFeatureList[i].verifyStandard ='数据异常'
+                //     const errStr = "疾病特征第" + (i+ 1) +"行标准词数据异常"
+                //     errStrList.push(errStr)
+                // }
+
+                // if(disFeatureList[i].type == '3'&&regexPause.test(disFeatureList[i].relation)) {
+                //     disFeatureList[i].verifyRelation ='数据异常'
+                //     const errStr = "疾病特征第" + (i+ 1) +"行化验关联词数据异常"
+                //     errStrList.push(errStr)
+                // }
+                //导入后判断
+
+
+                if(disFeatureList[i].type == '3' && !disFeatureList[i].result ) { //化验项下面诊断公式如果有用到,判断是否填写结果项
+                    const regex2 = new RegExp(`(?<=\\D|\\s?)${disFeatureList[i].code}(?=\\D|\\s?)`)
+                    //  const regex2 = new RegExp(`、\\s*、{1,}`) 
+                    //  const regex2 = new RegExp(`([^0-9]|\\s{0,1})${disFeatureList[i].code}([^0-9]|\\s{0,1})`)
+                    let hasError = disFormulaList.find(item => {return regex2.test(item.formula)})
+                    if(hasError) {
+                        if(!disFeatureList[i].relation) {
+                            disFeatureList[i].verifyRelation = "数据异常"
+                        }
+                        disFeatureList[i].verifyResult = "数据异常"
+                        const errStr = "第" + (i+ 1) +"行化验项数据异常"
+                        errStrList.push(errStr)
+                    }
+                }
+                 if(disFeatureList[i].type == '4' && !disFeatureList[i].relation ) { //辅检项下面诊断公式如果有用到,判断是否填写结果项(辅检结果是填在关联词列)
+                    const regex2 = new RegExp(`(?<=\\D|\\s?)${disFeatureList[i].code}(?=\\D|\\s?)`)
+                    let hasError = disFormulaList.find(item => {return regex2.test(item.formula)})
+                  
+                    if(hasError) {
+                        disFeatureList[i].verifyRelation = "数据异常"
+                        const errStr = "第" + (i+ 1) +"行辅捡项数据异常"
+                        errStrList.push(errStr)
+                    }
+                }
+                let regex1 =new RegExp(`、\\s*、{1,}|^、|、$`) 
+                if(disFeatureList[i].relation &&regex1.test(disFeatureList[i].relation)) { //不能输入连续的、,前后也不能是、
+                    disFeatureList[i].verifyRelation ='数据异常'
+                    const errStr = "疾病特征第" + (i+ 1) +"行数据异常"
                     errStrList.push(errStr)
-                } 
+                }
+                if(disFeatureList[i].result &&regex1.test(disFeatureList[i].result)) {
+                    disFeatureList[i].verifyResult ='数据异常'
+                    const errStr = "疾病特征第" + (i+ 1) +"行数据异常"
+                    errStrList.push(errStr)
+                }
+                
+                
                 
             }
             this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
@@ -426,11 +586,43 @@
                        const errStr = "诊断公式第" + (i+ 1) +"行诊断公式不能为空"
                        errStrList.push(errStr)
                    } else if(disFormulaList[i].formula&&!disFormulaList[i].type) {
-                       disFormulaList[i].verifyType = "诊断类型不能为空"
+                        disFormulaList[i].verifyType = "诊断类型不能为空"
                         const errStr = "诊断公式第" + (i+ 1) +"行诊断类型不能为空"
-                       errStrList.push(errStr)
-                       formulaListErrNum++;
+                        errStrList.push(errStr)
+                        formulaListErrNum++;
                    }
+                    
+                    //导入后判断
+                    // if(disFormulaList[i].type == 91) { //确诊中有没有包含其他不可输入内容
+                    //     let regexDisFormula = /[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u5341\u62df\u8bca0-9\/\.+\(\)\(\)]/g
+                    //     if(regexDisFormula.test(disFormulaList[i].formula)) {
+                    //          disFormulaList[i].verifyFormula = "公式格式错误"
+                    //          const errStr = "诊断公式第" + (i+ 1) +"行公式格式错误,"
+                    //         errStrList.push(errStr)
+                    //         formulaListErrNum++;
+                    //     }
+                    // } else {   //其他诊断中有没有包含其他不可输入内容
+                    // //计算公式只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十、0-9、/、.、(、)、(、)
+                    //     let regexDisFormula = /[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g
+                    //     if(regexDisFormula.test(disFormulaList[i].formula)) {
+                    //          disFormulaList[i].verifyFormula = "公式格式错误"
+                    //          const errStr = "诊断公式第" + (i+ 1) +"行公式格式错误。"
+                    //         errStrList.push(errStr)
+                    //         formulaListErrNum++;
+                    //     }
+                    // }
+                    //导入后判断
+
+                   if(disFormulaList[i].type == 91 && disFormulaList[i].formula.indexOf("拟诊") > -1) { //确诊项如果有拟诊这两个字,判断公式列表中有没有拟诊这项
+                       const noError = disFormulaList.filter(item => item.type == 92).length > 0
+                       if(!noError) {
+                           disFormulaList[i].verifyFormula = "公式格式错误"
+                            const errStr = "诊断公式第" + (i+ 1) +"行公式格式错误"
+                            errStrList.push(errStr)
+                            formulaListErrNum++;
+                       } 
+                   }
+
             }
             if(disFormulaList.length) {
                 this.disFormulaList = JSON.parse(JSON.stringify(disFormulaList))
@@ -466,17 +658,22 @@
                 id: this.id,
                 modifier: this.modifier
             }
+            if(type == 'save'){
+                this.isReady = true
+            }
             return api.diagBaseVerifyData(param).then((res) => {
                 const data = res.data.data
+                this.isReady=false
                 if(type =='save') {
                     if(data.hasQuestion) {
-                        this.warning('校验完成请先调整问题词,该数据已保存')
+                        this.warning('校验完成请先调整错误数据,该数据已保存')
                     } else {
                         this.warning('校验成功', 'success')
                     }
                 }
                 
                 this.id = data.id
+                this.disNameExist = data.disNameExist
                 this.disFeatureList = data.disFeature
                 if(data.disformula.length) {
                     this.disFormulaList = data.disformula
@@ -494,7 +691,7 @@
                 }  
                 this.hasQuestion = data.hasQuestion
                 
-            })
+            }).catch(()=>{this.isReady=false})
         },
         
         showConfirmDialog(msg, resolve) {
@@ -525,10 +722,18 @@
                 })
                 // this.disFeatureList[index].standard = value.replace(/、/g,'')
             } else if ( type === 'FormulaNumber') {
+                //计算公式确诊只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十、拟、诊、0-9、/、.、(、)、(、)
+                if(itemType == 91) {
+                    this.$nextTick(() => {
+                       
+                        this.disFormulaList[index].formula =  value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u5341\u62df\u8bca0-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
+                    })
+                } else {    //计算公式其他只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十、0-9、/、.、(、)、(、)
                 //计算公式只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十、0-9、/、.、(、)、(、)
-                 this.$nextTick(() => {
-                    this.disFormulaList[index].formula =  value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
-                })
+                    this.$nextTick(() => {
+                        this.disFormulaList[index].formula =  value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
+                    })
+                }
                 
             
             } else if ( type === 'FeatureRelate') {
@@ -572,6 +777,7 @@
                     return this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
                 case 'FormulaType':
                      this.disFormulaList[index].verifyType =''
+                     this.disFormulaList[index].formula =''
                     return this.disFormulaList = JSON.parse(JSON.stringify(this.disFormulaList))
                 case 'FormulaNumber':
                     this.disFormulaList[index].verifyFormula =''
@@ -588,7 +794,6 @@
     }
   }
 </script>
-
 <style lang="less">
     @import '../../less/common.less';
     .AddDiagBaseWrapper {
@@ -730,7 +935,7 @@
             color: red;
         }
         .borderRed {
-            border: 1px solid red !important;
+            border: 3px solid red ;
             box-sizing: border-box;
         }
         .colorRed {
@@ -790,10 +995,10 @@
                 }
         .selectType {
             input {
-                border: 1px solid red;
+                border: 3px solid red;
             }
             input:hover {
-                border: 1px solid red;
+                border: 3px solid red;
             }
         }
         .moduleTitle {
@@ -810,10 +1015,13 @@
             
         }
         .inpTips {
-            font-size: 13px;
+            font-size: 14px;
             color: red;
             margin-bottom: 10px;
         }
+        #upFile{
+            display: none
+        }
     }
     
 </style>

+ 7 - 1
src/components/diagBase/DiagBase.vue

@@ -123,6 +123,7 @@ export default {
         }
     },
     created() {
+      
         this.$nextTick(()=>{
           this.getDropList()
           this.getDataList()
@@ -155,7 +156,9 @@ export default {
         },
         getDataList(isTurnPage) {
             const param = this.getFilterItems(isTurnPage);
-            this.searched = true;
+            setTimeout(()=>{
+              this.searched = true;
+            },0)
             api.diagBasePage(param).then((res) => {
                 this.list = res.data.data.records
                 this.total = res.data.data.total;
@@ -301,6 +304,9 @@ export default {
 
 <style lang="less">
     @import "../../less/admin.less";
+    .el-form--inline .el-form-item__content {
+      vertical-align: text-bottom;
+    }
     .delete{
        color: red;
     }

+ 38 - 22
src/components/icss/AddChemicalAndCommonMapping.vue

@@ -20,7 +20,11 @@
                     <label  class="itemLabelName">选择公表项:</label>
                     <input class="searchInput"  @focus="focuInput" type="text" v-model = "uniqueText"> 
                     <span class="searchName" @click="searchMealItem(3)">搜索</span>
-                    <ul class="itemList uniqueNameList" ref="uniqueNameList">
+                    <ul 
+                        v-if="showUniqueNameList&&uniqueNameList.length >0"
+                        class="itemList uniqueNameList" 
+                        ref="uniqueNameList"
+                    >
                       <li 
                         v-for="item in uniqueNameList" 
                         class="mealNameItem ellipsis"
@@ -47,7 +51,11 @@
                     <label class="itemLabelName">选择化验大项:</label> 
                     <input class="searchInput" @focus="focuInput" type="text" v-model = "mealText"> 
                     <span class="searchName" @click="searchMealItem(1)">搜索</span>
-                    <ul class="itemList mealNameList" ref="mealNameList">
+                    <ul 
+                        v-if="showMealNameList&&mealNameList.length >0"
+                        class="itemList mealNameList" 
+                        ref="mealNameList"
+                    >
                       <li 
                         v-for="item in mealNameList" 
                         class="mealNameItem ellipsis"
@@ -67,7 +75,11 @@
                     <label  class="itemLabelName">选择化验小项:</label>
                     <input class="searchInput"  @focus="focuInput" type="text" v-model = "itemText"> 
                     <span class="searchName" @click="searchMealItem(2)">搜索</span>
-                    <ul class="itemList itemNameList" ref="itemNameList">
+                    <ul 
+                        v-if="showItemNameList&&itemNameList.length >0"
+                        class="itemList itemNameList" 
+                        ref="itemNameList"
+                    >
                       <li 
                         v-for="item in itemNameList" 
                         class="mealNameItem ellipsis"
@@ -109,6 +121,9 @@ export default {
             mealNameList:[],
             itemNameList: [],
             uniqueNameList:[],
+            showMealNameList: false,
+            showItemNameList: false,
+            showUniqueNameList: false,
             form: {
                 mealName: '', //大项名称
                 itemName: '',   //小项名称
@@ -133,9 +148,7 @@ export default {
             this.mealNameList = [];
             this.itemNameList =[];
             this.uniqueNameList = [];
-            this.$refs['mealNameList'].style.display='none';
-            this.$refs['itemNameList'].style.display='none';
-            this.$refs['uniqueNameList'].style.display='none';
+            this.showSearchList()
         },
         searchMealItem(type) {
             if( type == '1' || type == '2') {
@@ -160,15 +173,11 @@ export default {
                 if (res.data.code === '0') {
                      if (type == 1) {
                         this.mealNameList = res.data.data
-                        if(this.mealNameList.length > 0){ this.$refs['mealNameList'].style.display='block' }
-                        if(this.itemNameList.length > 0) { this.$refs['itemNameList'].style.display='none' }
-                        if(this.uniqueNameList.length > 0){this.$refs['uniqueNameList'].style.display='none'}
+                        this.showSearchList('showMealNameList')
                     } else if (type == 2) {
                        
                         this.itemNameList = res.data.data
-                        if(this.itemNameList.length > 0) { this.$refs['itemNameList'].style.display='block' }
-                        if(this.uniqueNameList.length > 0){this.$refs['uniqueNameList'].style.display='none'}
-                        if(this.mealNameList.length > 0){ this.$refs['mealNameList'].style.display='none' }
+                        this.showSearchList('showItemNameList')
                     }
                 }
             })
@@ -181,26 +190,34 @@ export default {
             api.getAllLisConcept(param).then((res) => {
                 if(res.data.code === '0') {
                     this.uniqueNameList = res.data.data
-                    if(this.uniqueNameList.length > 0){this.$refs['uniqueNameList'].style.display='block'}
-                    if(this.itemNameList.length > 0) { this.$refs['itemNameList'].style.display='none' }
-                    if(this.mealNameList.length > 0){ this.$refs['mealNameList'].style.display='none' }
+                    this.showSearchList('showUniqueNameList')
                 }
             })
         },
         focuInput() {
-            this.$refs['mealNameList'].style.display='none'
-            this.$refs['itemNameList'].style.display='none'
-            this.$refs['uniqueNameList'].style.display='none'
+            this.showSearchList()
+        },
+        showSearchList(type) {
+            this.showMealNameList = false
+            this.showItemNameList = false
+            this.showUniqueNameList = false
+            if(type === 'showMealNameList') {
+                this.showMealNameList = true
+            } else if (type === 'showItemNameList') {
+                this.showItemNameList = true
+            } else if (type === 'showUniqueNameList'){
+                this.showUniqueNameList = true
+            }
         },
         selectMealName(item) {
             this.form.mealName = item.name
-            this.$refs['mealNameList'].style.display='none'
+            // this.$refs['mealNameList'].style.display='none'
             this.mealText = ''
             this.mealNameList = []
         },
         selectItemName(item) {
              this.form.itemName = item.name
-            this.$refs['itemNameList'].style.display='none'
+            // this.$refs['itemNameList'].style.display='none'
             this.itemText = ''
             this.itemNameList = []
         },
@@ -209,7 +226,7 @@ export default {
             let nameArr = item.conceptName.split('--');
             this.form.mealName = nameArr[0]
             this.form.itemName = nameArr[1]
-            this.$refs['uniqueNameList'].style.display='none'
+            // this.$refs['uniqueNameList'].style.display='none'
             this.uniqueText = ''
             this.uniqueNameList = []
         },
@@ -381,7 +398,6 @@ export default {
     }
     .itemList {
         position: absolute;
-        display: none;
         background: #fff;
         width: 162px;
         max-height: 150px;

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

@@ -190,10 +190,10 @@ import api from '@api/icss.js';
         for(let i = 0; i <nodeList.length; i++) {
           let newChild;
           if(type == '0') { //添加的时候保存所有的id列表
-            newChild = {conceptId: nodeList[i].conceptId, relationId: 17,nodeList:[]}
+            newChild = {conceptId: nodeList[i].conceptId, relationId: 17,nodeList:[],sonRelationId: 17}
           } else if(type == '1') {  //修改的时候添加层级
             const item = JSON.parse(JSON.stringify(nodeList[i]))
-            newChild = Object.assign(item, {level:  level, nodeList: []})
+            newChild = Object.assign(item, {level:  level, nodeList: [],sonRelationId: 17})
           } else if(type == '2') { //移除节点的时候同时移除节点(搜索时排除的id列表)
             newChild = nodeList[i].conceptId
           }
@@ -242,7 +242,7 @@ import api from '@api/icss.js';
           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});
+          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', []);

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

@@ -7,7 +7,7 @@
                 </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-button size="mini" type="warning" style="margin:0 10px"  @click="addMedicalMultR">添加</el-button> -->
                 </el-form-item>
             </el-form>
         </crumbs>
@@ -53,8 +53,8 @@
                         label="操作" width="160">
                     <template slot-scope="scope">
                         <el-button type="text" size="small" :disabled="scope.row.isDeleted != 'N'" @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>
+                        <!-- <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>
@@ -129,7 +129,8 @@
       toEditProduct(row){
         const param = {
           conceptId: row.conceptId,
-          relationId: 17
+          relationIds: [17],
+          typeIds: [3,1]
         };
         const pam = this.searched ? {
           currentPage: this.currentPage,

+ 1 - 1
src/less/common.less

@@ -121,7 +121,7 @@
 
 .el-form--inline .el-form-item__label {
   font-size: 12px;
-  /*vertical-align: text-bottom;*/      /*chrome错位bug*/
+  vertical-align: text-bottom;      /*chrome错位bug*/
   padding: 0;
 }
 

+ 2 - 2
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';