Browse Source

Merge remote-tracking branch 'origin/dev5.3.4' into test

zhouna 5 years ago
parent
commit
c8e9188af7

+ 1 - 0
src/api/utils.js

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

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

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

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

@@ -35,7 +35,7 @@
                 <el-select
                         v-model="form.region2"
                         placeholder="请选择类型"
-                        :disabled="!!editData.id  || !form.region1"
+                        :disabled="(!!editData.id&&editData.controlType!='1'&&editData.controlType!='2')  || !form.region1"
                         @change="readyChangeSelect(2)"
                 >
                     <el-option
@@ -100,18 +100,12 @@
                         @change="sendData"
                 ></el-input>
             </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
                     v-if="qaType==2"
@@ -298,6 +292,7 @@
           region13:'',          //上传图片
           specFlag:'0',         //拼接到主诉
           required: '0',        //必填
+          flag:'',          //控件类型:时间类型1、诱因类型2、伴随类型3
         },
         //isNeedSearch: false, //是否需要查询(系统名称)
         imgList:[],
@@ -418,7 +413,15 @@
           if (res.data.code === '0') {
             this.Adscriptions = res.data.data[1];
             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{
         display: none;
     }
-    .flagBox {
-      margin-left: 20px;
+    .PubTagGroupWrapper .groups .flag-box {
+     .el-form-item__content{
+         width:100%;
+     }
+        label:not(:first-child){
+            margin-left: 20px;
+        }
     }
 </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-col>
                 <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 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">
                     <div class="inps">
                         <el-input v-model="rows[i].name"
@@ -52,6 +56,10 @@
                     <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
                 </el-col>
                 <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>
         </el-form>
     </div>
@@ -60,6 +68,11 @@
     @import "../../less/common.less";
     .main-area{
         position: relative;
+        .bottomPartMid{
+            position: absolute;
+            top:29px;
+            right: 0px;
+        }
     }
     .main-area .static-tip{
         border:1px solid #dcdfe6;
@@ -109,7 +122,15 @@
     .main-area{
         width: 80%;
         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{
         display: inline-block;
         width: calc(100% - 60px);
@@ -184,15 +205,12 @@
       }
     },
     watch: {
-      /*ascription(newVal, preVal) {        //永远检测不到,因为归属修改时类型被清空,本组件被销毁
-        this.rows = [...utils.getInitRow(initRow,4)];
-      },*/
       focusOn(newVal){
         this.checkedExc = this.rows[newVal].exclusion===1;
       },
-      type() {
+      /*type() {
         this.initData();
-      },
+      },*/
       sexType() {
         this.initData();
       },
@@ -214,6 +232,16 @@
         }
         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数字输入框
         const i = this.focusOn;
         clearTimeout(this.msgTimer);

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

@@ -295,7 +295,7 @@ export default {
               '6':['4']             //混合组合只能添加独立组合填写单
             };
             let param = {
-                "tagName": this.searchVal,
+                "tagName": this.searchVal.trim(),
                 "type": this.ascription,
                 "notIds": notIds,
                 "notControlType":this.qaType==2||this.ascription!='51'?['4']:[],             //组合填写单或非诊疗情况模版不能添加图片上传