Browse Source

Merge remote-tracking branch 'origin/assistCheck' into testedMerge

zhouna 5 years ago
parent
commit
3585918a26

+ 2 - 1
src/api/config.js

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

+ 1 - 0
src/api/utils.js

@@ -377,6 +377,7 @@ export default {
       specFlag:'specFlag',
       specFlag:'specFlag',
       required: 'required',
       required: 'required',
       explains:'explains',
       explains:'explains',
+      flag:'flag'
     };
     };
     isDpt?maps.controlType = 'region2':maps.tagType = 'region2';
     isDpt?maps.controlType = 'region2':maps.tagType = 'region2';
     let obj = {};
     let obj = {};

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

@@ -117,6 +117,7 @@
                 </tr>
                 </tr>
 </template>
 </template>
 <script>
 <script>
+import config from '@api/config.js';
 export default {
 export default {
     props:['item', 'index','featureTypeList','showDiagList','searchIndex',
     props:['item', 'index','featureTypeList','showDiagList','searchIndex',
             'searchFiled', 'searchResultList'],
             'searchFiled', 'searchResultList'],
@@ -144,7 +145,7 @@ export default {
             let timer = setTimeout(()=>{
             let timer = setTimeout(()=>{
                 clearTimeout(this.timer);
                 clearTimeout(this.timer);
                 this.$emit('handleInp',{index,e,type,itemType})
                 this.$emit('handleInp',{index,e,type,itemType})
-            }, 100)
+            }, config.delayTime)
             this.timer = timer
             this.timer = timer
         },
         },
         clickItem(index, type) {
         clickItem(index, type) {

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

@@ -28,6 +28,7 @@
                 </tr>
                 </tr>
 </template>
 </template>
 <script>
 <script>
+import config from '@api/config.js';
 export default {
 export default {
     props:['item', 'index','formulaTypeList'],
     props:['item', 'index','formulaTypeList'],
     data() {
     data() {
@@ -54,7 +55,7 @@ export default {
             let timer = setTimeout(()=>{
             let timer = setTimeout(()=>{
                 clearTimeout(this.timer);
                 clearTimeout(this.timer);
                 this.$emit('handleInp',{index,e,type,itemType})
                 this.$emit('handleInp',{index,e,type,itemType})
-            }, 100)
+            }, config.delayTime)
             this.timer = timer
             this.timer = timer
         },
         },
         clickItem(index, type) {
         clickItem(index, type) {

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

@@ -161,7 +161,7 @@ import api from '@api/icss.js';
     },
     },
     methods:{
     methods:{
        allowDrop(draggingNode, dropNode, type) {
        allowDrop(draggingNode, dropNode, type) {
-        if(draggingNode.data.parentConceptName !== dropNode.data.parentConceptName){
+        if(draggingNode.parent.data.conceptName !== dropNode.parent.data.conceptName){
           return false
           return false
         }else{
         }else{
           return type !== 'inner'
           return type !== 'inner'

+ 5 - 0
src/components/icss/AddMedicalName.vue

@@ -27,6 +27,7 @@
                 :searchType='searchType'
                 :searchType='searchType'
                 :similarList = 'similarList'
                 :similarList = 'similarList'
                 isShow = "true"
                 isShow = "true"
+                @closeTable = "closeTable"
              >
              >
              </SimilarListDrag>
              </SimilarListDrag>
             </td>
             </td>
@@ -84,6 +85,7 @@
                     :searchType='searchType'
                     :searchType='searchType'
                     :similarList = 'similarList'
                     :similarList = 'similarList'
                     :isShow = "index ===searchIndex"
                     :isShow = "index ===searchIndex"
+                    @closeTable = "closeTable"
                 >
                 >
                 </SimilarListDrag>
                 </SimilarListDrag>
               </td>
               </td>
@@ -160,6 +162,7 @@
                 :searchType='searchType'
                 :searchType='searchType'
                 :similarList = 'similarList'
                 :similarList = 'similarList'
                 :isShow = "index ===searchIndex"
                 :isShow = "index ===searchIndex"
+                @closeTable = "closeTable"
               >
               >
               </SimilarListDrag>
               </SimilarListDrag>
             </td>
             </td>
@@ -311,6 +314,7 @@ import SimilarListDrag from './SimilarListDrag'
           utils.dragBox('dragModalWrap','dragModalTitle','del')
           utils.dragBox('dragModalWrap','dragModalTitle','del')
       },
       },
       closeTable(){
       closeTable(){
+        this.searchType = ''
         this.similarList = []
         this.similarList = []
       
       
       },
       },
@@ -522,6 +526,7 @@ import SimilarListDrag from './SimilarListDrag'
       },
       },
       getSimilarList(name){
       getSimilarList(name){
         if(!name){
         if(!name){
+          this.closeTable()
           return
           return
         }
         }
         const param = {
         const param = {

+ 1 - 1
src/components/icss/SimilarListDrag.vue

@@ -47,7 +47,7 @@ export default {
             utils.dragBox('dragModalWrap','dragModalTitle','del')
             utils.dragBox('dragModalWrap','dragModalTitle','del')
         },
         },
         closeTable(){
         closeTable(){
-            this.similarList = []
+            this.$emit("closeTable")
         },
         },
     }
     }
 }
 }

+ 25 - 6
src/components/medicalTerm/AddAssistCheckMultRelation.vue

@@ -75,6 +75,7 @@
 <script type="text/javascript">
 <script type="text/javascript">
 import api from '@api/icss.js';
 import api from '@api/icss.js';
 import apis from '@api/medicalTerm.js';
 import apis from '@api/medicalTerm.js';
+import config from '@api/config.js';
   export default {
   export default {
     name:'AddAssistCheckMultRelation',
     name:'AddAssistCheckMultRelation',
     data(){
     data(){
@@ -135,7 +136,8 @@ import apis from '@api/medicalTerm.js';
         level: 0, //层级(修改时只能显示三级)
         level: 0, //层级(修改时只能显示三级)
         saveDisable: false,  //保存按钮禁止点击
         saveDisable: false,  //保存按钮禁止点击
         showSearch: false,
         showSearch: false,
-        defaultExpandedArr: []
+        defaultExpandedArr: [],
+        timer: undefined
       }
       }
     },
     },
     created(){
     created(){
@@ -157,13 +159,20 @@ import apis from '@api/medicalTerm.js';
           this.conceptList = []
           this.conceptList = []
         }
         }
         if(nextVal.trim() &&nextVal != prevVal) {
         if(nextVal.trim() &&nextVal != prevVal) {
-          this.searchConcept()
+          clearTimeout(this.timer)
+          let timer = setTimeout(()=>{
+                clearTimeout(this.timer);
+                this.searchConcept()
+            }, config.delayTime)
+            this.timer = timer
+
+          
         }
         }
       }
       }
     },
     },
     methods:{
     methods:{
        allowDrop(draggingNode, dropNode, type) {
        allowDrop(draggingNode, dropNode, type) {
-        if(draggingNode.level !== dropNode.level){
+        if(draggingNode.parent.data.conceptName !== dropNode.parent.data.conceptName){
           return false
           return false
         }else{
         }else{
           return type !== 'inner'
           return type !== 'inner'
@@ -241,12 +250,14 @@ import apis from '@api/medicalTerm.js';
         return nodeListResult
         return nodeListResult
       },
       },
       searchConcept() {
       searchConcept() {
+        if(!this.conceptText.trim()) {
+          return
+        }
         let  excludedConceptIds = [];
         let  excludedConceptIds = [];
         if(this.list[0]) {
         if(this.list[0]) {
           excludedConceptIds.push(this.list[0].conceptId)
           excludedConceptIds.push(this.list[0].conceptId)
           this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
           this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
         }
         }
-        
         const param = {
         const param = {
           "name": this.conceptText,
           "name": this.conceptText,
           "excludedConceptIds": this.excludedConceptIds,
           "excludedConceptIds": this.excludedConceptIds,
@@ -256,15 +267,18 @@ import apis from '@api/medicalTerm.js';
         }
         }
         if(this.addLevel === 0) {
         if(this.addLevel === 0) {
           param.relationTypeId = 16
           param.relationTypeId = 16
-        }
+        } 
         if(this.addLevel > 0) {
         if(this.addLevel > 0) {
           param.relationPosition = 0
           param.relationPosition = 0
+          param.relationTypeIdSupplement = [16,71]
         }
         }
         
         
         api.getConceptInfoAssay(param).then((res) => {
         api.getConceptInfoAssay(param).then((res) => {
           const { data } = res
           const { data } = res
           if(data.code == '0') {
           if(data.code == '0') {
-            this.conceptList = data.data
+            if(this.conceptText.trim()) {
+              this.conceptList = data.data
+            }
           }
           }
         })
         })
       },
       },
@@ -294,6 +308,11 @@ import apis from '@api/medicalTerm.js';
         this.showSearch = false
         this.showSearch = false
       },
       },
       append(data, e) {
       append(data, e) {
+          e.stopPropagation()
+          if(!data.isExpanded) {
+            data.isExpanded = true
+            this.defaultExpandedArr.push(data.conceptId)
+          }
           this.addLevel = data.level+1;
           this.addLevel = data.level+1;
           this.relationConceptId = data.conceptId
           this.relationConceptId = data.conceptId
           this.operaList = data;
           this.operaList = data;

+ 1 - 1
src/components/medicalTerm/AddAssistCheckSon.vue

@@ -113,7 +113,7 @@
             const param = {
             const param = {
               "name": this.searchConcept,
               "name": this.searchConcept,
               "relationId": 18,
               "relationId": 18,
-              "relationPosition": 1,
+              "relationPosition": 0,
               "relationTypeId": 16,
               "relationTypeId": 16,
               "typeId": 16
               "typeId": 16
             }
             }

+ 3 - 3
src/components/medicalTerm/AssistCheckMultRelation.vue

@@ -214,12 +214,12 @@
         const param = {
         const param = {
           conceptId:item.conceptId,
           conceptId:item.conceptId,
           // isDeleted:item.isDeleted === 'N'?'Y':'N',
           // isDeleted:item.isDeleted === 'N'?'Y':'N',
-          relationIds: [17,17],
-          typeIds: [3,1]
+          relationIds: [17,17,17],
+          typeIds: [16,16,16]
         }
         }
         let waringTxt = '是否删除该关系,可能对现有系统造成影响'
         let waringTxt = '是否删除该关系,可能对现有系统造成影响'
         this.showConfirmDialog(waringTxt,()=>{
         this.showConfirmDialog(waringTxt,()=>{
-          api.removeRelationContact(param).then((res)=>{
+          api.assistCheckRemoveMultRelation(param).then((res)=>{
             if(res.data.code=='0'){
             if(res.data.code=='0'){
               if(!this.searched){
               if(!this.searched){
                 //未点确认时清空搜索条件
                 //未点确认时清空搜索条件

+ 1 - 7
src/components/preTreat/AddSimpleQuestion.vue

@@ -66,13 +66,6 @@
     methods: {
     methods: {
       changeVal(val) {   //子组件数据改变传递到父组件
       changeVal(val) {   //子组件数据改变传递到父组件
         this.dataPub = val;
         this.dataPub = val;
-        //console.log('公用组件传的值都在这', val);
-      },
-      changeSex() {       //性别改变,清空填写单明细
-        this.changeType();
-      },
-      changeType() {      //填写单类型改变,标签明细左侧更新,右侧清空
-        this.options = [];
       },
       },
       pushValues(its){
       pushValues(its){
         this.options = its;
         this.options = its;
@@ -141,6 +134,7 @@
             "itemType" :this.dataPub.region12,           //是否为主要内容
             "itemType" :this.dataPub.region12,           //是否为主要内容
             "url":this.dataPub.region13,                  //上传图片
             "url":this.dataPub.region13,                  //上传图片
             "specFlag": this.dataPub.specFlag,            //是否拼接到主诉
             "specFlag": this.dataPub.specFlag,            //是否拼接到主诉
+            "flag": this.dataPub.flag,            //是否拼接到主诉
             "required": this.dataPub.required,             //必填
             "required": this.dataPub.required,             //必填
             "questionDetails": this.options,                //明细项
             "questionDetails": this.options,                //明细项
             //"questionMappings": [],      //映射关系,
             //"questionMappings": [],      //映射关系,

+ 24 - 16
src/components/preTreat/PubIndeptQa.vue

@@ -35,7 +35,7 @@
                 <el-select
                 <el-select
                         v-model="form.region2"
                         v-model="form.region2"
                         placeholder="请选择类型"
                         placeholder="请选择类型"
-                        :disabled="!!editData.id  || !form.region1"
+                        :disabled="(!!editData.id&&editData.controlType!='1'&&editData.controlType!='2')  || !form.region1"
                         @change="readyChangeSelect(2)"
                         @change="readyChangeSelect(2)"
                 >
                 >
                     <el-option
                     <el-option
@@ -100,18 +100,12 @@
                         @change="sendData"
                         @change="sendData"
                 ></el-input>
                 ></el-input>
             </el-form-item>
             </el-form-item>
-          <el-form-item  v-if="qaType =='1'&& form.region1 == '1' && form.region2 != '4'">
-            <span
-                  v-if="qaType =='1' && form.region1 == '1'  && form.region2 != '4'"
-                >
-                   <el-checkbox v-model="form.required"  label="必填" true-label="1" false-label="0"  @change="sendData"></el-checkbox>
-                </span>
-                <span
-                 class = "flagBox"
-                  v-if="qaType =='1' &&form.region1=='1'&&form.region2=='9'"
-                >
-                   <el-checkbox v-model="form.specFlag" label="拼接到主诉" true-label="1" false-label="0"  @change="sendData"></el-checkbox>
-                </span>
+          <el-form-item class="flag-box"  v-if="qaType =='1'&& form.region1 == '1' && form.region2 != '4'">
+              <el-checkbox v-model="form.required"  label="必填" true-label="1" false-label="0"  @change="sendData"></el-checkbox>
+              <el-checkbox v-if="form.region2=='9'" v-model="form.specFlag" label="拼接到主诉" true-label="1" false-label="0"  @change="sendData"></el-checkbox>
+              <el-checkbox v-if="form.region2=='1'||form.region2=='9'" :disabled="form.flag==='2'" v-model="form.flag" label="时间类型" true-label="1" false-label=""  @change="sendData"></el-checkbox>
+              <el-checkbox v-if="form.region2=='1'||form.region2=='2'" :disabled="form.flag==='1'" v-model="form.flag" label="诱因类型" true-label="2" false-label=""  @change="sendData"></el-checkbox>
+              <el-checkbox v-if="form.region2=='8'" v-model="form.flag" label="伴随类型" true-label="3" false-label=""  @change="sendData"></el-checkbox>
           </el-form-item>
           </el-form-item>
             <el-form-item
             <el-form-item
                     v-if="qaType==2"
                     v-if="qaType==2"
@@ -298,6 +292,7 @@
           region13:'',          //上传图片
           region13:'',          //上传图片
           specFlag:'0',         //拼接到主诉
           specFlag:'0',         //拼接到主诉
           required: '0',        //必填
           required: '0',        //必填
+          flag:'',          //控件类型:时间类型1、诱因类型2、伴随类型3
         },
         },
         //isNeedSearch: false, //是否需要查询(系统名称)
         //isNeedSearch: false, //是否需要查询(系统名称)
         imgList:[],
         imgList:[],
@@ -418,7 +413,15 @@
           if (res.data.code === '0') {
           if (res.data.code === '0') {
             this.Adscriptions = res.data.data[1];
             this.Adscriptions = res.data.data[1];
             this.labelTypesList = this.qaType==1?res.data.data[2]:res.data.data[3];
             this.labelTypesList = this.qaType==1?res.data.data[2]:res.data.data[3];
-            this.labelTypes = this.labelTypesList;
+            const editData = this.$props.editData;
+            //编辑时,单选、多选可互相切换
+            if(editData.controlType=='1'||editData.controlType=='2'){
+              this.labelTypes = this.labelTypesList.filter((it)=>{
+                return it.val==='1'||it.val==='2';
+              })
+            }else{
+              this.labelTypes = this.labelTypesList;
+            }
           }
           }
         })
         })
       },
       },
@@ -604,8 +607,13 @@
     .upload-hide .el-upload--picture{
     .upload-hide .el-upload--picture{
         display: none;
         display: none;
     }
     }
-    .flagBox {
-      margin-left: 20px;
+    .PubTagGroupWrapper .groups .flag-box {
+     .el-form-item__content{
+         width:100%;
+     }
+        label:not(:first-child){
+            margin-left: 20px;
+        }
     }
     }
 </style>
 </style>
 
 

+ 35 - 7
src/components/preTreat/PubSelect.vue

@@ -38,8 +38,12 @@
                     <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
                     <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
                 </el-col>
                 </el-col>
                 <el-button @click="addRow">+</el-button>
                 <el-button @click="addRow">+</el-button>
+                <div class="bottomPartMid bottomPartMidss">
+                    <p><span class="el-icon-arrow-up" @click="orderUpDown(-1)"></span></p>
+                    <p><span class="el-icon-arrow-down" @click="orderUpDown(1)"></span></p>
+                </div>
             </div>
             </div>
-            <div class="main-area" v-if="type==3">
+            <div class="main-area sigle-row" v-if="type==3">
                 <el-col v-for="(it,i) in rows" :key="i">
                 <el-col v-for="(it,i) in rows" :key="i">
                     <div class="inps">
                     <div class="inps">
                         <el-input v-model="rows[i].name"
                         <el-input v-model="rows[i].name"
@@ -52,6 +56,10 @@
                     <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
                     <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
                 </el-col>
                 </el-col>
                 <el-button @click="addRow" class="little">+</el-button>
                 <el-button @click="addRow" class="little">+</el-button>
+                <div class="bottomPartMid bottomPartMidss">
+                    <p><span class="el-icon-arrow-up" @click="orderUpDown(-1)"></span></p>
+                    <p><span class="el-icon-arrow-down" @click="orderUpDown(1)"></span></p>
+                </div>
             </div>
             </div>
         </el-form>
         </el-form>
     </div>
     </div>
@@ -60,6 +68,11 @@
     @import "../../less/common.less";
     @import "../../less/common.less";
     .main-area{
     .main-area{
         position: relative;
         position: relative;
+        .bottomPartMid{
+            position: absolute;
+            top:29px;
+            right: 0px;
+        }
     }
     }
     .main-area .static-tip{
     .main-area .static-tip{
         border:1px solid #dcdfe6;
         border:1px solid #dcdfe6;
@@ -109,7 +122,15 @@
     .main-area{
     .main-area{
         width: 80%;
         width: 80%;
         min-width: 400px;
         min-width: 400px;
-        margin:20px 150px;
+        margin:20px 150px 20px 20px;
+        &.sigle-row{
+             width: 60%;
+             margin:20px 150px 20px 30%;
+             .bottomPartMid{
+                 top: 0;
+                 right: 40%;
+             }
+         }
     .inps{
     .inps{
         display: inline-block;
         display: inline-block;
         width: calc(100% - 60px);
         width: calc(100% - 60px);
@@ -184,15 +205,12 @@
       }
       }
     },
     },
     watch: {
     watch: {
-      /*ascription(newVal, preVal) {        //永远检测不到,因为归属修改时类型被清空,本组件被销毁
-        this.rows = [...utils.getInitRow(initRow,4)];
-      },*/
       focusOn(newVal){
       focusOn(newVal){
         this.checkedExc = this.rows[newVal].exclusion===1;
         this.checkedExc = this.rows[newVal].exclusion===1;
       },
       },
-      type() {
+      /*type() {
         this.initData();
         this.initData();
-      },
+      },*/
       sexType() {
       sexType() {
         this.initData();
         this.initData();
       },
       },
@@ -214,6 +232,16 @@
         }
         }
         this.disableBtn = false;
         this.disableBtn = false;
       },
       },
+      orderUpDown(i){
+        const item = this.rows[this.focusOn];       //要调整位置的行
+        const inx = this.focusOn;
+        if(inx===-1||(inx===0&&i===-1)||(inx===this.rows.length-1&&i===1)){
+          return ;
+        }
+        this.focusOn = inx+i;
+        this.rows.splice(inx,1);
+        this.rows.splice(inx+i,0,item);
+      },
       handlePlaceholder(type){          //占位符类型,type=0文本输入框,type=1数字输入框
       handlePlaceholder(type){          //占位符类型,type=0文本输入框,type=1数字输入框
         const i = this.focusOn;
         const i = this.focusOn;
         clearTimeout(this.msgTimer);
         clearTimeout(this.msgTimer);

+ 3 - 3
src/components/preTreat/QuestionTagGroup.vue

@@ -27,7 +27,7 @@
             >
             >
                 <p class="ellipsis" >
                 <p class="ellipsis" >
                     <span class="tagName">{{item.tagName}}</span>
                     <span class="tagName">{{item.tagName}}</span>
-                    <span>({{sex[item.sexType]}}{{item.required?'、必':''}}{{item.specFlag?'、跟主':''}})</span>
+                    <span>({{sex[item.sexType]}}{{item.required?'、必':''}}{{item.specFlag?'、跟主':''}}{{item.flag==1?'、时间':''}}{{item.flag==2?'、诱因':''}}{{item.flag==3?'、伴随':''}})</span>
                 </p>
                 </p>
             </li>
             </li>
         </ul>
         </ul>
@@ -48,7 +48,7 @@
             >
             >
                 <p class="ellipsis" :title="'[ '+item.tagName+' ]('+sex[item.sexType]+(item.required?'、必':'')+(item.specFlag?'、跟主':'')+')'">
                 <p class="ellipsis" :title="'[ '+item.tagName+' ]('+sex[item.sexType]+(item.required?'、必':'')+(item.specFlag?'、跟主':'')+')'">
                     <span class="tagName">{{item.tagName}}</span>
                     <span class="tagName">{{item.tagName}}</span>
-                    <span>({{sex[item.sexType]}}{{item.required?'、必':''}}{{item.specFlag?'、跟主':''}})</span>
+                    <span>({{sex[item.sexType]}}{{item.required?'、必':''}}{{item.specFlag?'、跟主':''}}{{item.flag==1?'、时间':''}}{{item.flag==2?'、诱因':''}}{{item.flag==3?'、伴随':''}})</span>
                 </p>
                 </p>
                 <el-tag class="exclu" v-if="item.exclusionType==1" type="info" size="mini">互斥项</el-tag>
                 <el-tag class="exclu" v-if="item.exclusionType==1" type="info" size="mini">互斥项</el-tag>
             </li>
             </li>
@@ -295,7 +295,7 @@ export default {
               '6':['4']             //混合组合只能添加独立组合填写单
               '6':['4']             //混合组合只能添加独立组合填写单
             };
             };
             let param = {
             let param = {
-                "tagName": this.searchVal,
+                "tagName": this.searchVal.trim(),
                 "type": this.ascription,
                 "type": this.ascription,
                 "notIds": notIds,
                 "notIds": notIds,
                 "notControlType":this.qaType==2||this.ascription!='51'?['4']:[],             //组合填写单或非诊疗情况模版不能添加图片上传
                 "notControlType":this.qaType==2||this.ascription!='51'?['4']:[],             //组合填写单或非诊疗情况模版不能添加图片上传