Luolei 5 роки тому
батько
коміт
55594b6e10

+ 11 - 5
src/common/MultiLineInput.vue

@@ -3,7 +3,11 @@
     <span class="prefix" v-if="content.prefix">{{content.prefix}}</span>
     <div class="sticP" :style="{paddingRight:content.suffix?'1rem':'0'}">
         <div class="iptWrap">
-          <input class="contentVal" :type="content.type" :placeholder="content.placeholder" pattern="\d*" v-model.number="txt" @input="changeVal" @blur="blur" @click="handleClick">
+          <!-- <input class="contentVal" type="number" :placeholder="content.placeholder" pattern="\d*" v-model="txt" @input="changeVal" @blur="blur" @click="handleClick"> -->
+          <!-- <input ref="ipt" class="contentVal" :placeholder="content.placeholder" pattern="[0-9]*" v-model="txt" @input="changeVal" @blur="blur" @click="handleClick"> -->
+          <input ref="ipt" type="tel" class="contentVal" :placeholder="content.placeholder" v-model="txt" @input="changeVal" @blur="blur" @click="handleClick">
+          <!-- <input v-for="(item,index) in content.iptList" type="tel" class="contentVal" :placeholder="content.placeholder" v-model="txt" @input="changeVal" @blur="blur" @click="handleClick"> -->
+
         </div>
     </div>
     <span class="suffix" v-if="content.suffix">{{content.suffix}}</span>
@@ -51,7 +55,7 @@ export default {
     blur(){
       // 如果该项未选中,则不存值
       const select = this.part.select;
-      if(!select){return}
+      // if(!select){return}
       const newData = Object.assign({},this.part,{value:this.txt,controlType:3});
       this.$emit("updata",newData);
       this.$emit('handleInp',this.txt);
@@ -74,7 +78,7 @@ export default {
 <style lang="less" scoped>
   .multipIpt {
     width: 100%;
-    height: .74rem /* 74/100 */;
+    // height: .74rem /* 74/100 */;
     line-height: .74rem /* 74/100 */;
     // border: 1px solid #DFE0E4;
     // border-radius: .08rem /* 8/100 */;
@@ -117,11 +121,12 @@ export default {
   }
   .suffix {
     position: absolute;
-    right: .12rem;
-    top: 0;
+    right: .1rem;
+    top: .1rem;
     width: 1rem;
     text-align: right;
     text-align: left;
+    line-height: .36rem;
   }
   .sticP {
     width: 100%;
@@ -132,6 +137,7 @@ export default {
       // width: 100%;
       position: relative;
       overflow: hidden;
+      min-width: 1rem;
     }
   }
   .check{

+ 8 - 8
src/components/DiagTreat.vue

@@ -8,8 +8,8 @@
         <Label v-if="it.controlType==0" 
               :item="it" 
               :indx="i" 
-              :ppId="it.id" 
-              :moduleType="datas.type" 
+              :ppId="it.id"
+              :moduleType="datas.type"
               @setDetail="setDetail"/>
         <!-- 上传图片 -->
         <UploadImg v-if="it.controlType==4" 
@@ -42,12 +42,12 @@
       <span class="next" @click="toNext">{{'进入'+ nextName}}</span>
     </div>
     <div class="detail" v-if="show">
-      <DetailBox @close="closeDetal" 
-              :data="labelDetail" 
-              :moduleType="datas.type"
-              :ppId="ppId"
-              v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
-              @pComplete="complete"/>
+    <DetailBox @close="closeDetal" 
+            :data="labelDetail" 
+            :moduleType="datas.type"
+            :ppId="ppId"
+            v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
+            @pComplete="complete"/>
     </div>
   </div>
 </template>

+ 1 - 0
src/components/PathInfo.vue

@@ -199,6 +199,7 @@
       white-space: nowrap;
       overflow-x: auto;
       padding:0 .15rem .15rem 0;
+      -webkit-overflow-scrolling: touch;  
     }
     .emery,.child{
       display: inline-block;

+ 6 - 7
src/components/TabPage.vue

@@ -5,8 +5,7 @@
       <p v-for="(it,index) in modlues"
         :style="{'width':1/modlues.length*100+'%'}"
         :key="it.id">
-        <span :class="{current:index==number,comp:finish[it.type]}"
-          v-if="type[it.type]==1">
+        <span :class="{current:index==number,comp:finish[it.type]}" v-if="type[it.type]==1">
           <!-- <i>{{it.type}}</i> -->
           <i>{{index+1}}</i>
           {{it.name}}
@@ -23,7 +22,7 @@
         />
       
         <DiagTreat
-          v-if="flag==2&&item.type==2&&moduleShow"
+          v-if="flag==51&&item.type==51&&moduleShow"
           :datas="item"
           :preName="modlues[0]&&modlues[0].name"
           :modluesLen="modluesLen"
@@ -31,6 +30,7 @@
           @next="toNext"
           @back="beBack"
         />
+
         <Others
           v-if="flag==3&&item.type==3&&moduleShow"
           :modluesLen="modluesLen"
@@ -41,7 +41,7 @@
           @back="beBack"
         />
         <AddContent
-          v-show="flag == 4&&item.type==4&&moduleShow"
+          v-show="flag == 52&&item.type==52&&moduleShow"
           :modluesLen="modluesLen"
           :allMoudles="item"
           :preName="modlues[idx-1]&&modlues[idx-1].name"
@@ -76,9 +76,9 @@ export default {
       modluesLen: allMoudles.len,
       type: {
         "1": sysConfig.length > 0 && sysConfig.filter(item => item.code == "symptoms_show")[0].value,
-        "2": sysConfig.length > 0 && sysConfig.filter(item => item.code == "diagnosis_show")[0].value,
+        "51": sysConfig.length > 0 && sysConfig.filter(item => item.code == "diagnosis_show")[0].value,
         "3": sysConfig.length > 0 && sysConfig.filter(item => item.code == "omhistory_show")[0].value,
-        "4": sysConfig.length > 0 && sysConfig.filter(item => item.code == "replenish_show")[0].value,
+        "52": sysConfig.length > 0 && sysConfig.filter(item => item.code == "replenish_show")[0].value,
       },
       flag: allMoudles.order,
       moduleShow:true,
@@ -131,7 +131,6 @@ export default {
         return
       }
       let flag = parseInt(this.flag),num=this.number;
-      // this.finish[flag] = true;
       this.number = ++num;
       
       for(let j in this.finish){

+ 15 - 15
src/store.js

@@ -74,7 +74,7 @@ const store = new Vuex.Store({
     saveAll(state,param){
       state.allMoudles = param;
       for(let k in param){
-        if(param[k].type == 2){
+        if(param[k].type == 51){
           state.diagnose.origin = JSON.parse(JSON.stringify(param[k].moduleDetailDTOList))
           state.diagnose.datas = JSON.parse(JSON.stringify(param[k].moduleDetailDTOList))
         }else if(param[k].type == 3){
@@ -90,7 +90,7 @@ const store = new Vuex.Store({
         case 1: //症状情况
           state.symptom.origin = Object.assign({},state.symptom.origin,{[data.id]:data});
           break;
-        case 2: //诊疗情况
+        case 51: //诊疗情况
           let diagData = state.diagnose.origin;
           for(let i in diagData){
             if(diagData[i].id == param.pId){
@@ -132,7 +132,7 @@ const store = new Vuex.Store({
         case 1:
           state.symptom.datas = Object.assign({},state.symptom.datas,{[param.pId]:data});
           break;
-        case 2: //诊疗情况
+        case 51: //诊疗情况
           let diagData = state.diagnose.datas;
           for(let i in diagData){
             if(diagData[i].id == ppId){
@@ -189,7 +189,7 @@ const store = new Vuex.Store({
             text.push(param);
           }
           break;
-        case 2: //诊疗情况
+        case 51: //诊疗情况
           let diaText = state.diagnose.text;
           if(diaText.length > 0){
             for(let i in diaText){
@@ -221,7 +221,7 @@ const store = new Vuex.Store({
             otherText.push(param);
           }
           break;
-        case 4:
+        case 52:
           let addText = state.addContent.txt
           state.addContent.origin = param.data
           state.addContent.txt = getAllStr(param)
@@ -241,7 +241,7 @@ const store = new Vuex.Store({
             }
           }
           break;
-        case 2: //诊疗情况
+        case 51: //诊疗情况
           let diaText = state.diagnose.text;
           for(let i in diaText){
             if(diaText[i].pId==param.pId){
@@ -257,7 +257,7 @@ const store = new Vuex.Store({
             }
           }
           break;
-        case 4:
+        case 52:
 
           break;
         default:
@@ -273,13 +273,13 @@ const store = new Vuex.Store({
         case 1:
 
           break;
-        case 2: //诊疗情况
+        case 51: //诊疗情况
           state.diagnose.imgFile.push(param);
           break;
         case 3:
 
           break;
-        case 4:
+        case 52:
 
           break;
         default:
@@ -295,13 +295,13 @@ const store = new Vuex.Store({
         case 1:
 
           break;
-        case 2:
+        case 51:
           state.diagnose.imgSrc = Object.assign({},state.diagnose.imgSrc,{[key]:src});
           break;
         case 3:
 
           break;
-        case 4:
+        case 52:
 
           break;
         default:
@@ -316,7 +316,7 @@ const store = new Vuex.Store({
         case 1:
 
           break;
-        case 2:
+        case 51:
           let data = state.diagnose.imgFile;
           for(let i=0; i<data.length;i++){
             if(data[i].key==key){
@@ -327,7 +327,7 @@ const store = new Vuex.Store({
         case 3:
 
           break;
-        case 4:
+        case 52:
 
           break;
         default:
@@ -342,7 +342,7 @@ const store = new Vuex.Store({
         case 1:
 
           break;
-        case 2:
+        case 51:
           let data = state.diagnose.imgFile;
           let obj = state.diagnose.imgSrc;
           delete(obj[key]);
@@ -351,7 +351,7 @@ const store = new Vuex.Store({
         case 3:
 
           break;
-        case 4:
+        case 52:
 
           break;
         default:

+ 15 - 4
src/utils/tools.js

@@ -20,11 +20,22 @@ const getModelExpStr = (str) =>{
   let result = {}
   if(str.match(/\${number_(.*})/)){//数字输入框
     let matchStr = str.match(/\${number_(.*})/)[0]
+    let tmpHolder = matchStr.split('${number_')[1].split('}')[0]
+    let iptLis = [],join='',pre='',next=''
+    if(tmpHolder.indexOf('/') != -1){
+      pre = tmpHolder.split('/')[0]
+      next = tmpHolder.split('/')[1]
+      join = '/'
+      iptLis.push(pre,next)
+    }
     result = {
       type:'number',
-      placeholder:matchStr.split('${number_')[1].split('}')[0],
+      placeholder:tmpHolder,
+      pre:pre||'',
+      next:next||'',
+      join:join,
       prefix:str.split(matchStr)[0]||'',
-      suffix:str.split(matchStr)[1]||''
+      suffix:str.split(matchStr)[1]||'',
     }
   }else if(str.match(/\${input_(.*})/)){
     let matchStr = str.match(/\${input_(.*})/)[0]
@@ -67,11 +78,11 @@ const moduleConfig = (config,modules) => {
       let tmpType = modules[j].type
       if(tmpCode=="symptoms_show"&&tmpType==1){
         activeModule.push(modules[j])
-      }else if(tmpCode=="diagnosis_show"&&tmpType==2){
+      }else if(tmpCode=="diagnosis_show"&&tmpType==51){
         activeModule.push(modules[j])
       }else if(tmpCode=="omhistory_show"&&tmpType==3){
         activeModule.push(modules[j])
-      }else if(tmpCode=="replenish_show"&&tmpType==4){
+      }else if(tmpCode=="replenish_show"&&tmpType==52){
         activeModule.push(modules[j])
       }
     }