浏览代码

merge from 'dev5.3.1'

zhangxc 5 年之前
父节点
当前提交
1b5332b910

+ 4 - 2
src/api/config.js

@@ -149,7 +149,7 @@ export default {
     'getVersionDetlInfo': 'api/knowledgeman/versionDetail/getDetailById', //版本信息-版本说明列表获取
     'promptServer':'/api/knowledgeman/file/uploadImage',    //静态知识富文本图片上传
     /**************医学术语维护****************/
-    'getKnowledgeEnums':'api/knowledgeman/getKlmEnumsData', //术语库枚举
+    'getKnowledgeEnums':'/api/knowledgeman/getKlmEnumsData', //术语库枚举
 	  'saveConceptInfo':'/api/knowledgeman/conceptDetail/insertOrUpdate',   //保存术语静态知识
     'delConceptInfo':'/api/knowledgeman/conceptDetail/delete',   //删除术语静态知识
     'knowledgeName': 'api/knowledgeman/concept/getAllInformation', //医学术语-命名维护
@@ -245,7 +245,9 @@ export default {
      'diagBaseUpdateNeo': '/api/knowledgeman/diagnose/updateNeo', //诊断依据--更新图谱
      'diagBaseVerifyAllData': '/api/knowledgeman/diagnose/verifyAllData', //诊断依据--校验所有数据
      'diagBaseVerifyData': '/api/knowledgeman/diagnose/verifyData', //诊断依据--校验数据
-
+     'tempSaveOrUpate':'/api/knowledgeman/diagnose/tempSaveOrUpate', //诊断依据-临时保存
+     'diagBaseSearch':'/api/knowledgeman/diagnose/search', //诊断依据-搜索标准词或者关联词
+     'getUniqueNameWithList': '/api/knowledgeman/lisMapping/getUniqueNameWithList', //医学数据-查找化验公表名
   },
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 9 - 0
src/api/diagBase.js

@@ -53,5 +53,14 @@ export default {
     },
     diagBaseVerifyData(param){ //诊断依据--校验数据
         return axios.post(urls.diagBaseVerifyData, param)
+    },
+    getUniqueNameWithList(param) { //诊断依据--获取公表项
+        return axios.post(urls.getUniqueNameWithList, param)
+    },
+    tempSaveOrUpate(param) { //诊断依据-临时保存
+        return axios.post(urls.tempSaveOrUpate, param)
+    },
+    diagBaseSearch(param) { //诊断依据-临时保存
+        return axios.post(urls.diagBaseSearch, param)
     }
 }

文件差异内容过多而无法显示
+ 692 - 156
src/components/diagBase/AddDiagBase.vue


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

@@ -48,7 +48,7 @@
                     label="校验数据">
                     <template slot-scope="scope" >
                         <span :class="scope.row.hasQuestion == '0' ? '': 'hsaQuestion'">
-                            {{scope.row.hasQuestion == '0' ? "无问题词" : "有问题词"}}
+                            {{scope.row.hasQuestion == "0" ? "无问题词" : scope.row.hasQuestion == "1"? "有问题词":scope.row.hasQuestion == "2"?"暂存数据":""}}
                         </span>
                     </template>
                 </el-table-column>
@@ -186,6 +186,7 @@ export default {
             loading.close();
             const {code,data,msg} = res.data;
             if(code === '0') {
+              this.warning('校验完成','success')
               this.currentPage = 1;
                this.pageSize = 10,
                this.filter.disName = '',

+ 429 - 0
src/components/diagBase/DisFeatureItem.vue

@@ -0,0 +1,429 @@
+<template>
+    <tr> 
+                    <td class="FeatureSort" >{{index+1}}</td>
+                    <td class="FeatureType" >
+                        <el-select size="mini" :class="{selectType: item.typeNull}" v-model.trim="item.type" placeholder="标签类型" @change="clickItem(index,'FeatureType')">
+                            <el-option v-for="item in featureTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
+                        </el-select>
+                    </td>
+                    <td class="FeatureNumber"  >
+                        <el-tooltip :disabled="!item.verifyCode&&!item.codeNull&&!item.codeError" class="item" effect="dark" :content="item.verifyCode||item.codeNull||item.codeError" placement="top">
+                            <el-input class="groupTextarea" 
+                                ref="textarea"
+                                type="textarea"  
+                                :autosize="{ minRows: 1}"
+                                :class="{borderRed:item.verifyCode||item.codeNull, colorRed: item.codeError}" 
+                                :title="item.code" 
+                                v-model.trim="item.code"
+                                 @input="handleInp(index,$event,'FeatureNumber')"  
+                                 @focus="clickItem(index,'FeatureNumber')">
+                            </el-input>
+                        </el-tooltip>
+                    </td>
+                    <td class="FeatureStand"   @click.self="clickItemBox">
+                        <el-tooltip  :disabled="!item.verifyStandard&&!item.standardNull" class="item" effect="dark" :content="item.verifyStandard||item.standardNull" placement="top">
+                            <el-input class="groupTextarea" 
+                                ref="textarea" 
+                                type="textarea"
+                                :autosize="{ minRows: 1}"
+                                :class="{borderRed:item.verifyStandard||item.standardNull}" 
+                                :title="item.standard" 
+                                v-model.trim="item.standard" 
+                                @input="handleInp(index,$event,'FeatureStand',item.type)"   
+                                @focus="clickItem(index,'FeatureStand')">
+                            </el-input>
+                        </el-tooltip>    
+                        <div  class="searchItemBox">
+                            <ul 
+                                class="searchItemList"
+                                v-if="showDiagList&&index === searchIndex && searchFiled ==='FeatureStand' && searchResultList.length > 0"
+                            >
+                                <li v-for="(item, ind) in searchResultList" 
+                                    class="diagItem ellipsis"
+                                    :key="ind"
+                                    :title="item"
+                                    @click="selectSearchItem(index,item,'FeatureStand')"
+                                > 
+                                    {{item}}
+                                </li>
+
+                            </ul>  
+                        </div> 
+                          
+                    </td>
+                    <td class="FeatureRelate" @click.self="clickItemBox">
+                        <el-tooltip :disabled="!item.verifyRelation&&!item.relationNull"  class="item" effect="dark" :content="item.verifyRelation||item.relationNull" placement="top">
+                            <el-input class="groupTextarea" 
+                                ref="textarea"
+                                type="textarea"
+                                :autosize="{ minRows: 1}"
+                                :class="{borderRed:item.verifyRelation|| item.relationNull}" 
+                                :title="item.relation" 
+                                v-model.trim="item.relation" 
+                                @input="handleInp(index,$event,'FeatureRelate',item.type)"  
+                                @focus="clickItem(index,'FeatureRelate')">
+                            </el-input>
+                           
+                        </el-tooltip> 
+                        <div class="searchItemBox">
+                             <ul 
+                                class="searchItemList"
+                                v-if="showDiagList&&index === searchIndex && searchFiled ==='FeatureRelate' && searchResultList.length > 0"
+                            >  
+                                <li v-for="(item, ind) in searchResultList" 
+                                    class="diagItem ellipsis"  
+                                    :key="ind"
+                                    :title="item"
+                                    @click="selectSearchItem(index,item,'FeatureRelate')"
+                                > 
+                                    {{item}}
+                                </li>
+
+                            </ul>
+                        </div>
+                        
+                    </td>
+                     <td class="FeatureuniqueName inpDisabled">
+                        <el-tooltip :disabled="!item.verifyUnique"  class="item" effect="dark" :content="item.verifyUnique" placement="top">
+                            <el-input class="groupTextarea inpDisabled"  
+                                ref="textarea"
+                                type="textarea"
+                                :readonly = true
+                                :autosize="{ minRows: 1}"
+                                :class="{borderRed:item.uniqueName===null ||item.verifyUnique}" 
+                                :title="item.uniqueName" 
+                                v-model.trim="item.uniqueName" 
+                                >
+                            </el-input>
+                            
+                        </el-tooltip> 
+                    </td>
+                    <td class="FeatureResult" :class="{inpDisabled:item.type!=3}" >
+                        <el-tooltip :disabled="!item.verifyResult"  class="item" effect="dark" :content="item.verifyResult" placement="top">
+                            <el-input class="groupTextarea"
+                                ref="textarea"
+                                type="textarea"  
+                                :autosize="{ minRows: 1}"
+                                :readonly="item.type!=3"  
+                                :class="{borderRed:item.verifyResult, inpDisabled:item.type!=3}"  
+                                :title="item.midResult" 
+                                v-model.trim="item.midResult" 
+                                @input="handleInp(index,$event,'FeatureResult')"
+                                @focus="clickItem(index,'FeatureResult')">
+                            </el-input>
+                        </el-tooltip> 
+                    </td>
+                    <td class="FeatureOpera">
+                        <el-button type="text" size="small" class="delete" @click="addItem(index, 1)"><div class="btnOpera">+</div></el-button>
+                        <el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 1)"><div class="btnOpera">-</div></el-button>
+                    </td>
+                </tr>
+</template>
+<script>
+export default {
+    props:['item', 'index','featureTypeList','showDiagList','searchIndex',
+            'searchFiled', 'searchResultList'],
+    data() {
+        return {
+
+        }
+    },
+    mounted(){
+        this.$nextTick(()=>{
+            if(Array.isArray(this.$refs.textarea)) {
+                for(let i=0; i <this.$refs.textarea.length; i++) {
+                    this.$refs.textarea[i].resizeTextarea()
+                } 
+            }else {
+                this.$refs.textarea&&this.$refs.textarea.resizeTextarea()
+            }
+            
+        })
+       
+   },
+    methods: {
+        handleInp(index,e,type,itemType) {
+            this.$emit('handleInp',{index,e,type,itemType})
+        },
+        clickItem(index, type) {
+             this.$emit('clickItem',{index, type})
+        },
+        addItem(index, type) {
+          this.$emit('addItem',{index, type}) 
+        },
+        delItem(index, type) {
+          this.$emit('delItem',{index, type}) 
+        },
+        selectSearchItem(index, item, searchType) {
+            this.$emit('selectSearchItem',{index, item, searchType}) 
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+    @import '../../less/common.less';
+        table,tr,td {
+            list-style: none;
+        }
+        .topBack {
+            top: 0;
+        }
+        .groupTitle {
+            background-color: #fff;
+            height: 40px;
+            line-height: 40px;
+            padding-left: 20px;
+        }
+        .searchInput, .searchName {
+            display: inline-block;
+            height: 32px;
+            line-height: 32px;
+            border: 1px solid #a9a9a9;
+            margin: 0px 0 0 0;
+            padding: 0 5px;
+            float: left;
+            margin-top: 4px;
+        }
+        .isRequired .el-form-item__label::before {
+            content: '*';
+            color: red;
+        }
+        .searchName {
+            border-left: none;
+            cursor: pointer;
+            font-size: 16px;
+            padding: 0 14px;
+        }
+        .itemList {
+            position: absolute;
+            background: #fff;
+            width: 162px;
+            max-height: 150px;
+            border: 1px solid #a9a9a9;
+            left: 138px;
+            top: 37px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .diagItem {
+            padding: 0 5px;
+            height: 30px;
+            line-height: 30px;
+            font-size: 14px;
+            cursor: pointer;
+        }
+        .diagItem:hover {
+            background: #f5f7fa;
+        }
+        .addDepartForm {
+            position: relative;
+            background-color: #fff;
+            padding: 20px;
+            margin: 70px 20px 0px 20px;
+        }
+        .addDiagName {
+            position: relative;
+        }
+        .symptomList {
+            position: relative;
+            background-color: #fff;
+             padding: 0px 20px 100px 20px;
+             margin: 0px 20px 40px 20px;
+             min-height: 400px;
+        }
+        
+        .diagTable {
+            width: 100%;
+            border-collapse: collapse;
+            margin-bottom: 20px;
+            tr {
+                td {
+                    /deep/textarea::-webkit-scrollbar{
+                        display: none;
+                    }
+                    position: relative;
+                    border: 1px solid #a9a9a9;
+                    text-align: center;
+                }
+                .FormulaOpera, .FeatureOpera{
+                    background: #fff;
+                    border: none;
+                    text-align: left;
+                    padding-left: 30px;
+                }
+                /deep/.el-textarea__inner {
+                    width: 100%;
+                    line-height: 20px;
+                    resize:none;
+                    border: none;
+                    border-radius: 0;
+                    text-align: center;
+                }
+            }
+            .selectedContent {
+                width: 25%;
+            }
+            .selectedContentGroup {
+                width: 55%;
+            }
+            .selectedContentOpera {
+                width: 20%;
+            }
+        }
+        .groupInput {
+            text-align: center;
+            color: #606266;
+            width: 80%;
+        }
+        .groupTextarea {
+             text-align: center;
+            color: #606266;
+            width: 100%;
+        }
+        .btn {
+            position: absolute;
+            background-color: #fff;
+            width: 100%;
+            margin: 20px 0;
+            height: 40px;
+            bottom: 0px;
+            right: 0px;
+            .btnBox {
+                position: absolute;
+                right: 0px;
+                
+            }
+            .el-button {
+                margin-right: 20px;
+               
+            }
+        }
+        .tableTitle{
+            background: rgba(239,243,249,1);
+            height: 40px;
+        }
+        .require::after{
+            content:"*";
+            color: red;
+        }
+        .borderRed {
+            border: 3px solid red ;
+            box-sizing: border-box;
+        }
+        .colorRed {
+            color: red;
+        }
+        .FeatureSort {
+            width: 5%;
+        }
+        .FeatureType {
+            width: 7%;
+            padding: 0 5px;
+        }
+        .FeatureNumber {
+            width: 8%;
+        }
+        .FeatureStand {
+            width: 20%;
+        }
+        .FeatureRelate {
+            width: 30%;
+        }
+        .FeatureuniqueName {
+            width: 10%;
+        }
+        .FeatureResult {
+            width: 10%;
+        } 
+        .FeatureOpera{
+            width: 10%;
+        } 
+        .FormulaSort{
+            width: 5%;
+        } 
+        .FormulaType{
+            width: 7%;
+            padding: 0 5px;
+        } 
+        .FormulaNumber{
+            width: 78%;
+        } 
+        .FormulaOpera{
+            width: 10%;
+        }
+        .btnOpera {
+            width:16px;
+            height:16px;
+            background:rgba(176,190,197,1);
+            border-radius: 50%;
+            color: #fff;
+            line-height: 16px;
+            text-align: center;
+        }
+        /deep/.el-input--mini .el-input__inner {
+            width: 80px;
+        }
+        /deep/ .is-disabled {
+                    background: #ECECEC;
+                    color: #AAAAAA;
+                    border: none;
+                }
+        .selectType {
+            input {
+                border: 3px solid red;
+            }
+            input:hover {
+                border: 3px solid red;
+            }
+        }
+        .moduleTitle {
+            margin: 0 0 10px 0;
+            font-weight: 600;
+        }
+        .inpDisabled{
+            background: #ECECEC;
+            cursor: not-allowed;
+            textarea {
+                background: #ECECEC;
+                color: #AAAAAA;
+                border: none;
+                cursor: not-allowed;
+                height: 100%;
+            }
+            
+        }
+        .inpTips {
+            font-size: 14px;
+            color: red;
+            margin-bottom: 10px;
+        }
+        #upFile{
+            display: none
+        }
+        .disableDiv {
+            background: rgb(236, 236, 236);
+            box-sizing: border-box;
+            cursor: not-allowed;
+            font-size: 14px;
+            line-height: 20px;
+            padding: 5px 0;
+            min-height: 30px;
+        }
+        .searchItemBox{
+            position: relative;
+            bottom: 0px;
+        }
+        .searchItemList {
+            position: absolute;
+            border: 1px solid #a9a9a9;
+            box-sizing: border-box;
+            top: 4px;
+            z-index: 2;
+            width: 100%;
+            max-height: 150px;
+            overflow: auto; 
+            background: #fff;
+            margin: 0 0 20px 0;
+        }   
+    
+</style>

+ 334 - 0
src/components/diagBase/DisFormulaItem.vue

@@ -0,0 +1,334 @@
+<template>
+    <tr> 
+                    <td class="FormulaSort">{{index +1}}</td>
+                    <td class="FormulaType">
+                        <el-select size="mini" :class="{selectType: item.verifyType}" v-model.trim="item.type" placeholder="标签类型"  @change="clickItem(index,'FormulaType')">
+                            <el-option v-for="item in formulaTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
+                        </el-select>
+                    </td>
+                    <td class="FormulaNumber">
+                        <el-tooltip :disabled="!item.verifyFormula"  class="item" effect="dark" :content="item.verifyFormula" placement="top">
+                            <el-input class="groupTextarea"
+                                ref="textarea"
+                                type="textarea"  
+                                :readonly="!item.type"
+                                :autosize="{ minRows: 1}"
+                                :class="{borderRed:item.verifyFormula,inpDisabled:!item.type}"
+                                :title="item.formula" 
+                                v-model.trim="item.formula" 
+                                @input="handleInp(index,$event,'FormulaNumber',item.type)"
+                                @focus="clickItem(index,'FormulaNumber')">
+                            </el-input>
+                        </el-tooltip> 
+                    </td>
+                   <td class="FeatureOpera">
+                        <el-button type="text" size="small" class="delete" @click="addItem(index, 2)"><div class="btnOpera">+</div></el-button>
+                        <el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 2)"><div class="btnOpera">-</div></el-button>
+                    </td>
+                </tr>
+</template>
+<script>
+export default {
+    props:['item', 'index','formulaTypeList'],
+    data() {
+        return {
+
+        }
+    },
+    mounted(){
+        this.$nextTick(()=>{
+            if(Array.isArray(this.$refs.textarea)) {
+                for(let i=0; i <this.$refs.textarea.length; i++) {
+                    this.$refs.textarea[i].resizeTextarea()
+                } 
+            }else {
+                this.$refs.textarea&&this.$refs.textarea.resizeTextarea()
+            }
+            
+        })
+       
+   },
+    methods: {
+        handleInp(index,e,type,itemType) {
+            this.$emit('handleInp',{index,e,type,itemType})
+        },
+        clickItem(index, type) {
+             this.$emit('clickItem',{index, type})
+        },
+        addItem(index, type) {
+          this.$emit('addItem',{index, type}) 
+        },
+        delItem(index, type) {
+          this.$emit('delItem',{index, type}) 
+        }
+        
+    }
+}
+</script>
+<style lang="less" scoped>
+    @import '../../less/common.less';
+        table,tr,td {
+            list-style: none;
+        }
+        .topBack {
+            top: 0;
+        }
+        .groupTitle {
+            background-color: #fff;
+            height: 40px;
+            line-height: 40px;
+            padding-left: 20px;
+        }
+        .searchInput, .searchName {
+            display: inline-block;
+            height: 32px;
+            line-height: 32px;
+            border: 1px solid #a9a9a9;
+            margin: 0px 0 0 0;
+            padding: 0 5px;
+            float: left;
+            margin-top: 4px;
+        }
+        .isRequired .el-form-item__label::before {
+            content: '*';
+            color: red;
+        }
+        .searchName {
+            border-left: none;
+            cursor: pointer;
+            font-size: 16px;
+            padding: 0 14px;
+        }
+        .itemList {
+            position: absolute;
+            background: #fff;
+            width: 162px;
+            max-height: 150px;
+            border: 1px solid #a9a9a9;
+            left: 138px;
+            top: 37px;
+            z-index: 2;
+            overflow-y: auto;
+        }
+        .diagItem {
+            padding: 0 5px;
+            height: 30px;
+            line-height: 30px;
+            font-size: 14px;
+            cursor: pointer;
+        }
+        .diagItem:hover {
+            background: #f5f7fa;
+        }
+        .addDepartForm {
+            position: relative;
+            background-color: #fff;
+            padding: 20px;
+            margin: 70px 20px 0px 20px;
+        }
+        .addDiagName {
+            position: relative;
+        }
+        .symptomList {
+            position: relative;
+            background-color: #fff;
+             padding: 0px 20px 100px 20px;
+             margin: 0px 20px 40px 20px;
+             min-height: 400px;
+        }
+        
+        .diagTable {
+            width: 100%;
+            border-collapse: collapse;
+            margin-bottom: 20px;
+            tr {
+                td {
+                    /deep/textarea::-webkit-scrollbar{
+                        display: none;
+                    }
+                    position: relative;
+                    border: 1px solid #a9a9a9;
+                    text-align: center;
+                }
+                .FormulaOpera, .FeatureOpera{
+                    background: #fff;
+                    border: none;
+                    text-align: left;
+                    padding-left: 30px;
+                }
+                /deep/.el-textarea__inner {
+                    width: 100%;
+                    line-height: 20px;
+                    resize:none;
+                    border: none;
+                    border-radius: 0;
+                    text-align: center;
+                }
+            }
+            .selectedContent {
+                width: 25%;
+            }
+            .selectedContentGroup {
+                width: 55%;
+            }
+            .selectedContentOpera {
+                width: 20%;
+            }
+        }
+        .groupInput {
+            text-align: center;
+            color: #606266;
+            width: 80%;
+        }
+        .groupTextarea {
+             text-align: center;
+            color: #606266;
+            width: 100%;
+        }
+        .btn {
+            position: absolute;
+            background-color: #fff;
+            width: 100%;
+            margin: 20px 0;
+            height: 40px;
+            bottom: 0px;
+            right: 0px;
+            .btnBox {
+                position: absolute;
+                right: 0px;
+                
+            }
+            .el-button {
+                margin-right: 20px;
+               
+            }
+        }
+        .tableTitle{
+            background: rgba(239,243,249,1);
+            height: 40px;
+        }
+        .require::after{
+            content:"*";
+            color: red;
+        }
+        .borderRed {
+            border: 3px solid red ;
+            box-sizing: border-box;
+        }
+        .colorRed {
+            color: red;
+        }
+        .FeatureSort {
+            width: 5%;
+        }
+        .FeatureType {
+            width: 7%;
+            padding: 0 5px;
+        }
+        .FeatureNumber {
+            width: 8%;
+        }
+        .FeatureStand {
+            width: 20%;
+        }
+        .FeatureRelate {
+            width: 30%;
+        }
+        .FeatureuniqueName {
+            width: 10%;
+        }
+        .FeatureResult {
+            width: 10%;
+        } 
+        .FeatureOpera{
+            width: 10%;
+        } 
+        .FormulaSort{
+            width: 5%;
+        } 
+        .FormulaType{
+            width: 7%;
+            padding: 0 5px;
+        } 
+        .FormulaNumber{
+            width: 78%;
+        } 
+        .FormulaOpera{
+            width: 10%;
+        }
+        .btnOpera {
+            width:16px;
+            height:16px;
+            background:rgba(176,190,197,1);
+            border-radius: 50%;
+            color: #fff;
+            line-height: 16px;
+            text-align: center;
+        }
+        /deep/.el-input--mini .el-input__inner {
+            width: 80px;
+        }
+        /deep/ .is-disabled {
+                    background: #ECECEC;
+                    color: #AAAAAA;
+                    border: none;
+                }
+        .selectType {
+            input {
+                border: 3px solid red;
+            }
+            input:hover {
+                border: 3px solid red;
+            }
+        }
+        .moduleTitle {
+            margin: 0 0 10px 0;
+            font-weight: 600;
+        }
+        .inpDisabled{
+            background: #ECECEC;
+            cursor: not-allowed;
+            textarea {
+                background: #ECECEC;
+                color: #AAAAAA;
+                border: none;
+                cursor: not-allowed;
+                height: 100%;
+            }
+            
+        }
+        .inpTips {
+            font-size: 14px;
+            color: red;
+            margin-bottom: 10px;
+        }
+        #upFile{
+            display: none
+        }
+        .disableDiv {
+            background: rgb(236, 236, 236);
+            box-sizing: border-box;
+            cursor: not-allowed;
+            font-size: 14px;
+            line-height: 20px;
+            padding: 5px 0;
+            min-height: 30px;
+        }
+        .searchItemBox{
+            position: relative;
+            bottom: 0px;
+        }
+        .searchItemList {
+            position: absolute;
+            border: 1px solid #a9a9a9;
+            box-sizing: border-box;
+            top: 4px;
+            z-index: 2;
+            width: 100%;
+            max-height: 150px;
+            overflow: auto; 
+            background: #fff;
+            margin: 0 0 20px 0;
+        }   
+    
+</style>

+ 52 - 0
src/components/diagBase/Textarea.vue

@@ -0,0 +1,52 @@
+<template>
+    <div 
+        :contenteditable="readonly"
+        :title="value"
+        class="textarea"
+        :class="{borderRed: borderRed, disableDiv:!readonly}"
+        @input="handInput"
+        @blur="handleBlur"
+    >   
+        {{value}}
+    </div>
+</template>
+<script>
+export default {
+    name: 'Textarea',
+    props: ['readonly','value','borderRed'],
+    data() {
+        return {
+
+        }
+    },
+    methods: {
+        handInput(e) {
+           this.$emit("handleInp",e.target.innerText.replace(/\s+/g,""))
+        },
+        handleFocus() {
+
+        },
+        handleBlur() {
+            console.log('blur')
+        }
+    }
+}
+</script>
+<style scoped lang='less'>
+    .textarea{
+        outline: none;
+    }
+    .borderRed {
+        border: 3px solid red ;
+        box-sizing: border-box;
+    }
+    .disableDiv {
+        background: rgb(236, 236, 236);
+        box-sizing: border-box;
+        cursor: not-allowed;
+        font-size: 14px;
+        line-height: 20px;
+        padding: 5px 0;
+        min-height: 30px;
+    }
+</style>

+ 13 - 0
src/components/icss/AddMedicalMultRelation.vue

@@ -31,6 +31,9 @@
             :props="defaultProps"
             node-key="conceptId"
             default-expand-all
+            draggable
+            :allow-drag="allowDrag"
+            :allow-drop="allowDrop"
             :expand-on-click-node="false">
             <span class="custom-tree-node" slot-scope="{ node, data }">
                 <span class="custom-tree-node-name ellipsis" :class="{colorGray: data.isDeletedConcept == 'Y'}" :title="node.label">{{ node.label }}</span>
@@ -153,6 +156,16 @@ import api from '@api/icss.js';
       }
     },
     methods:{
+       allowDrop(draggingNode, dropNode, type) {
+        if(draggingNode.data.parentConceptName !== dropNode.data.parentConceptName){
+          return false
+        }else{
+          return type !== 'inner'
+        }
+      },
+      allowDrag(draggingNode) {
+        return draggingNode.data.level != 0;//一级不可拖动
+      },
       addConcept(e) {
         this.addLevel = 0;
         this.openSearch(e);