Browse Source

Merge branch 'test' into byll

luolei 5 years ago
parent
commit
b58c61f8c6

+ 1 - 1
build/webpack.dev.conf.js

@@ -34,7 +34,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
     compress: true,
     // host: HOST || config.dev.host,
     // host: '192.168.3.6',
-    host: '192.168.1.103',
+    host: '192.168.1.106',
     port: PORT || config.dev.port,
     open: config.dev.autoOpenBrowser,
     overlay: config.dev.errorOverlay

+ 1 - 1
src/common/CheckBox.vue

@@ -78,7 +78,7 @@ import OptionInp from '../common/OptionInp.vue';
           }
         }
         let temp = concatVal(data);
-        const newData = Object.assign({},this.datas,{questionDetailList:data},{value:temp.value?temp.value.substring(0,temp.value.length-1):''},{valueP:temp.valueP?temp.valueP.substring(0,temp.valueP.length-1):''});
+        const newData = Object.assign({},this.datas,{questionDetailList:data},{value:temp.value?temp.value:''},{valueP:temp.valueP?temp.valueP:''});
         this.$emit("updata",newData);
       },
       inpVal(val,index){//输入框失焦处理

+ 2 - 0
src/common/OptionInp.vue

@@ -73,6 +73,8 @@ import { getExpStr,scrollToV,isIos} from '@utils/tools';
     .inp{
       display: inline-block;
       vertical-align: top;
+      position: relative;
+      top:3px;
       input{
         color: #4F50FF;
         font-size: .3rem;

+ 2 - 1
src/common/Submit.vue

@@ -42,7 +42,8 @@ export default {
   methods: {
     goStart() {
       // this.$store.commit('initAllData') //已在患者页进行初始化
-      this.$router.push("/")
+      // this.$router.push("/")
+      this.$router.replace({path:'/'}) //阻止ios底部的前进后退按钮
     }
   }
 }

+ 8 - 4
src/components/Detail.vue

@@ -70,8 +70,8 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
         for(let i in origMapping){
           if(data.controlType==3){//多列类型多一层
             if(mapping[i].id == item.id){
-              mapping[i].value = '';
-              mapping[i].valueP = '';
+              let tempVal = '';
+              let tempValP = '';
               let detList = mapping[i].questionDetailList;
               for(let k in detList){//替换
                 if(detList[k].id==data.id){
@@ -80,8 +80,11 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
               } 
               for(let n in detList){//给父级赋值
                 if(detList[n].value){
-                  mapping[i].value += detList[n].name.replace(patt,detList[n].value)+',';
-                  mapping[i].valueP += (detList[n].description||detList[n].name).replace(patt,detList[n].value)+',';
+                  tempVal += detList[n].name.replace(patt,detList[n].value)+',';
+                  tempValP += (detList[n].description||detList[n].name).replace(patt,detList[n].value)+',';
+                  // 去掉最后一个逗号
+                  mapping[i].value = tempVal.substring(0,tempVal.length-1);
+                  mapping[i].valueP = tempValP.substring(0,tempValP.length-1);
                 }
               }
             }
@@ -90,6 +93,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
               mapping.splice(i,1,data)
             }
           }
+          
         }
         // 实时更新清空样式
         if(data.value){

+ 2 - 0
src/components/DetailBox.vue

@@ -48,6 +48,7 @@
       const box = this.$refs.detailBox;
       const height = document.documentElement.clientHeight;
       box.style.height = height - 45 + 'px'; 
+      $('body').css({'height':height+'px','overflow-y':'hidden'})
       // 校验是否有已填项,有--弹窗;无--return
       let hasCheck = this.$refs.detail.check();
       if(hasCheck){
@@ -58,6 +59,7 @@
     beforeDestroy(){//给Window解绑事件
       $(window).off("resize");
       $(window).off("click");
+      $('body').css({'height':'100%','overflow-y':'auto'})
     },
     methods:{
       close(){

+ 2 - 1
src/components/PathInfo.vue

@@ -175,7 +175,8 @@
       },
       getStart(){
         if(this.isReady){
-          this.$router.push({path:'/tab'})
+          // this.$router.push({path:'/tab'})
+          this.$router.replace({path:'/tab'})
         }else{
           this.defaultWaring('请先维护症状模块')
         }

+ 2 - 1
src/components/Symptom.vue

@@ -238,7 +238,8 @@ export default {
         this.getPush(sympText);//删除后重新调推理-入参:拼好的内容
       } else {
         // 全部删除完 重新走问诊流程
-        this.$router.push("/")
+        // this.$router.push("/")
+        this.$router.replace({path:'/'})
         // this.getSympList();
       }
       this.cancelDel();

+ 2 - 1
src/components/TabPage.vue

@@ -97,7 +97,8 @@ export default {
   },
   created() {
     if (this.config.length == 0) {
-      this.$router.go(-1)
+      // this.$router.go(-1)
+      this.$router.replace({path:'/'})
     }
   },
   methods: {

+ 7 - 2
src/less/index.less

@@ -14,6 +14,10 @@ input, textarea{
   border: 0 none;
   -webkit-tap-highlight-color:transparent;  //ios去掉选择阴影
 }
+input::-webkit-input-placeholder{
+  // color:#f9f9f7;
+  font-size: .30rem;
+}
 button {
     border: 0 none;
 }
@@ -58,8 +62,9 @@ a {
 
 html,body{
   width: 100%;
-  height: auto !important;
-  overflow-x: auto;
+  // height: auto !important;
+  height: auto;
+  overflow-y: auto;
 }
 html{
   margin: 0;

+ 2 - 1
src/utils/tools.js

@@ -249,7 +249,8 @@ function concatVal(data){
       }
     }
   }
-  return {value,valueP};
+  // 去掉最后一个逗号
+  return {value:value?value.substring(0,value.length-1):'',valueP:valueP?valueP.substring(0,valueP.length-1):''};
 }
 
 module.exports =  {