소스 검색

Merge branch 'new' into new1.1

luolei 5 년 전
부모
커밋
c1afd4924e

+ 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.162.1',
+    host: '192.168.1.103',
     port: PORT || config.dev.port,
     open: config.dev.autoOpenBrowser,
     overlay: config.dev.errorOverlay

+ 84 - 18
src/common/CheckBox.vue

@@ -1,14 +1,17 @@
 <template>
-  <div class="check-wrap" v-if="item">
-    <!-- <p v-for="(it,index) in datas.questionDetailList" :key="it.id" class="list" @click="handleClick(it,index,'',true)"> -->
-      <p v-for="(it,index) in datas.questionDetailList" :key="it.id" :class="['list',{'block':((it.description||it.name).indexOf('${'))!=-1}]" @click="handleClick(it,index,'',true)">
-      <img :src="it.select==1?check:defaultPic">
-      <span v-if="((it.description||it.name).indexOf('${'))==-1" :class="[{'check':it.select==1},{'exclu':exclusion !==999 && it.exclusion !== exclusion}]">{{it.description||it.name}}</span>
+  <div class="check-wrap" v-if="item" :style="getStyle(detail,slide)">
+      <p v-for="(it,index) in datas.questionDetailList" 
+          :key="it.id" 
+          :class="['list',{'block':((it.description||it.name).indexOf('${'))!=-1}]" >
+      <span v-if="((it.description||it.name).indexOf('${'))==-1" 
+          :class="['radioCheck',{'check':it.select==1},{'exclu':exclusion !==999 && it.exclusion !== exclusion}]"
+          @click="handleClick(it,index,'',true,false)"
+          >{{it.description||it.name}}</span>
       <OptionInp v-else 
           :item="it" 
           ref="inp"
           @handleInp="inpVal($event,index)" 
-          @handleSelec="handleClick(it,index,true)"
+          @handleSelec="handleClick(it,index,true,false,true)"
           :exclu="exclusion !==999 && it.exclusion !== exclusion" 
           />
     </p>
@@ -22,6 +25,19 @@ import MultiLineInput from '../common/MultiLineInput.vue';
 import OptionInp from '../common/OptionInp.vue';
   export default{
     name:'CheckBox',
+    props:{
+      item:{
+        default:''
+      },
+      slide:{
+        default:false,
+        type:Boolean
+      },
+      detail:{
+        default:2,
+        type:Number||String
+      }
+    },
     data(){
       return{
         imgUrl:imageUrlPrefix,
@@ -31,14 +47,24 @@ import OptionInp from '../common/OptionInp.vue';
         exclusion:999 //互斥
       }
     },
-    props:['item'],
     created(){
       // this.datas = JSON.parse(JSON.stringify(this.item));
       this.datas = this.item;
       this.resetExc();
     },
     methods:{
-      handleClick(it,index,flag,flg){
+      getStyle(detail,slide){
+        if(detail == 1){
+          if(slide){
+            return {'display':'block','background-color': '#F9F9F9'}
+          }else{
+            return {'display':'none'}
+          }
+        }else{
+          return {'display':'block'}
+        }
+      },
+      handleClick(it,index,flag,flg,sign){
         if(flg){
           document.activeElement.blur();      
           document.activeElement.scrollIntoViewIfNeeded(true);
@@ -62,17 +88,40 @@ import OptionInp from '../common/OptionInp.vue';
           this.exclusion = it.exclusion;  
         }
         // 处理选中状态
-        if(flag){//输入框反选
-          data[index].select = 1;
-          this.exclusion = it.exclusion;
+        if(sign){
+          for(let i=0;i<data.length; i++){
+            if(i==index){
+              if(data[i].value){
+                data[index].select = 1;
+                this.exclusion = it.exclusion;
+              }else{
+                data[i].select = 0
+              }
+            }
+          }
         }else{
-          if(data[index].select){
-            data[index].select = 0;
-          }else{
-            data[index].select = 1;
-            this.exclusion = it.exclusion;
+          for(let i=0;i<data.length; i++){
+            if(i==index){
+              if(data[i].select == 1){
+                data[i].select = 0
+              }else{
+                data[index].select = 1;
+                this.exclusion = it.exclusion;
+              }
+            }
           }
         }
+        // if(flag){//输入框反选
+        //   data[index].select = 1;
+        //   this.exclusion = it.exclusion;
+        // }else{
+        //   if(data[index].select){
+        //     data[index].select = 0;
+        //   }else{
+        //     data[index].select = 1;
+        //     this.exclusion = it.exclusion;
+        //   }
+        // }
         
         // 处理取消-互斥
         const filArr1 = data.filter(it=>it.select==1);
@@ -127,6 +176,7 @@ import OptionInp from '../common/OptionInp.vue';
 <style lang="less" scoped>
 @import '../less/base.less';
   .check-wrap{
+    .bgques;
     img{
       width:100%;
     }
@@ -135,8 +185,8 @@ import OptionInp from '../common/OptionInp.vue';
     }
     .list{
       color: #colors[text];
-      margin:0 .1rem .1rem 0;
-      padding: .12rem .1rem;
+      margin:0 .1rem .07rem 0;
+      padding: .06rem .1rem .06rem 0;
       display: inline-block;
       white-space: nowrap;
       overflow-x: hidden;
@@ -149,11 +199,27 @@ import OptionInp from '../common/OptionInp.vue';
         vertical-align: middle;
       }
     }
+    .radioCheck {
+      display: inline-block;
+      line-height: .35rem;
+      // min-width: 2rem;
+      // text-align: center;
+      padding:.1rem .1rem;
+      box-sizing: border-box;
+      border-radius: .38rem;
+      border: 1px solid #DFE0E4;
+    }
+    
     .check{
       color: #colors[theme];
+      border: 1px solid #colors[theme];
     }
     .exclu{
       color:#colors[exclu];
     }
+    
+    .iptCheck {
+      color: #colors[theme];
+    }
   }
 </style>

+ 23 - 2
src/common/ComTextArea.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="comArea">
+  <div class="comArea" :style="getStyle(detail,slide)">
     <textarea @input="changeVal" 
             :style="{width:width,height:height}" 
             v-model="txt" 
@@ -26,6 +26,14 @@ export default {
     item:{
       type:Object,
       require: true
+    },
+    slide:{
+      default:false,
+      type:Boolean
+    },
+    detail:{
+      default:2,
+      type:Number||String
     }
   },
   data() {
@@ -35,6 +43,17 @@ export default {
     }
   },
   methods:{
+    getStyle(detail,slide){
+      if(detail == 1){
+        if(slide){
+          return {'display':'block','background-color': '#F9F9F9'}
+        }else{
+          return {'display':'none'}
+        }
+      }else{
+        return {'display':'block'}
+      }
+    },
     changeVal(){
           // $(".btscroll").css({'position':'fixed'})
       this.$emit('changeAreaVal',this.txt)
@@ -42,6 +61,7 @@ export default {
       this.$emit("updata",newData);
     },
     blur(){
+      document.activeElement.scrollIntoView({behavior: "smooth"})
       document.activeElement.scrollIntoViewIfNeeded(true);
       $(".foot").css({'display':'block'})
       setTimeout(()=>{
@@ -66,7 +86,9 @@ export default {
 }
 </script>
 <style lang="less" scoped>
+@import '../less/base.less';
   .comArea {
+    .bgques;
     textarea {
       color: #4F50FF;
       resize: none;
@@ -77,7 +99,6 @@ export default {
       border-radius: .08rem /* 8/100 */;
       -webkit-appearance: none;
       padding: .16rem /* 16/100 */ .3rem /* 30/100 */;
-      margin-bottom: .3rem;
       background-color: transparent;
     }
   }

+ 28 - 2
src/common/Input.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="inp-wrap">
+  <div class="inp-wrap" :style="getStyle(detail,slide)">
     <input :type="item.controlType==6?'text':'number'" 
           :maxlength="item.controlType==6?'':10"
           :class="{'change':borColor}" 
@@ -14,6 +14,19 @@
   import $ from 'jquery';
   export default {
     name:'Input',
+    props:{
+      item:{
+        default:''
+      },
+      slide:{
+        default:false,
+        type:Boolean
+      },
+      detail:{
+        default:2,
+        type:Number||String
+      }
+    },
     data(){
       return{
         msg:"输入框",
@@ -21,8 +34,18 @@
         borColor:false
       }
     },
-    props:['item'],
     methods:{
+      getStyle(detail,slide){
+        if(detail == 1){
+          if(slide){
+            return {'display':'block','background-color': '#F9F9F9'}
+          }else{
+            return {'display':'none'}
+          }
+        }else{
+          return {'display':'block'}
+        }
+      },
       changeVal(e){
         this.borColor = true;
         if(this.item.controlType==7){//数字键盘
@@ -36,6 +59,7 @@
       blur(){
         // $(".btscroll").css({'position':'fixed'})
         $(".foot").css({'display':'block'})
+        document.activeElement.scrollIntoView({behavior: "smooth"})
         document.activeElement.scrollIntoViewIfNeeded(true);
         setTimeout(()=>{
           document.activeElement.scrollIntoViewIfNeeded(true);
@@ -64,6 +88,8 @@
 <style lang="less" scoped>
 @import '../less/base.less';
   .inp-wrap{
+    .bgques;    
+    padding-bottom: 0;
     input{
       width: 100%;
       color: #colors[theme];

+ 1 - 0
src/common/Label.vue

@@ -145,6 +145,7 @@
       display: inline-block;
       min-width:1.9rem;
       height: .72rem;
+      border-radius: .36rem;
       span{
         display: inline-block;
         vertical-align: top;

+ 9 - 4
src/common/MultiLineInput.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :class="['multipIpt',{'border':border,'inline':inline,'check':select}]">
+  <div :style="{'margin-bottom':isLast?'0':'.3rem'}" :class="['multipIpt',{'border':border,'inline':inline,'check':select}]">
     <span class="prefix" v-if="content.prefix">{{content.prefix}}</span>
     <div class="sticP" :style="{paddingRight:content.suffix?'1rem':'0'}">
         <div class="iptWrap">
@@ -57,7 +57,11 @@ export default {
     select:{ //是否选中
       default:false,
       type:Boolean
-    }
+    },
+    isLast:{ //是否为最后一个
+      default:false,
+      type:Boolean
+    },
   },
   data(){
     return {
@@ -91,6 +95,7 @@ export default {
       // 如果该项未选中,则不存值
       // $(".btscroll").css({'position':'fixed'})
       $(".foot").css({'display':'block'})
+      document.activeElement.scrollIntoView({behavior: "smooth"})
       document.activeElement.scrollIntoViewIfNeeded(true);
       setTimeout(()=>{
         document.activeElement.scrollIntoViewIfNeeded(true);
@@ -130,7 +135,7 @@ export default {
     padding: 0 .12rem 0 .26rem;
     box-sizing: border-box;
     position: relative;
-    margin: .3rem 0;
+    margin-bottom: .3rem;
     .contentVal {
       font-size: .3rem /* 30/100 */;
       color: #colors[theme];
@@ -150,7 +155,7 @@ export default {
   }
   .border{
     border: 1px solid #DFE0E4;
-    border-radius: .08rem
+    border-radius: 2rem
   }
   .inline{
     display: inline-block;

+ 14 - 4
src/common/OptionInp.vue

@@ -1,6 +1,7 @@
 <!-- 带输入框选项 -->
 <template>
-  <div :class="['inpbox',{'check':item.select},{'exclu':exclu}]">
+  <div :class="['inpbox',{'iptCheck':item.select},{'exclu':exclu}]">
+    <img class="iptimg" :src="item.select?url[0]:url[1]" alt="">
     <span class="prefix" v-if="msg.prefix">{{msg.prefix}}</span>
     <!-- <div class="inp" @click="preClick"> -->
       <input :type="msg.type=='number'?'number':'text'" 
@@ -27,7 +28,8 @@ import $ from 'jquery';
       return{
         msg:{},
         txt:this.item.value || '',
-        select:0
+        select:0,
+        url:[require('../images/iptselect.png'),require('../images/iptdis.png')]
       }
     },
     props:['item','exclu'],
@@ -41,14 +43,15 @@ import $ from 'jquery';
         if(this.msg.type=='number'){//数字键盘
           this.txt = e.target.value=e.target.value.replace(/^\.$/,'')
         }
-        
         const newData = Object.assign({},this.part,{value:this.txt});
         this.$emit("updata",newData);
         this.$emit('handleInp',this.txt);
+        this.$emit('handleSelec');
       },
       handleBlur(){
           // $(".btscroll").css({'position':'fixed'})
         $(".foot").css({'display':'block'})
+        document.activeElement.scrollIntoView({behavior: "smooth"})
         document.activeElement.scrollIntoViewIfNeeded(true);
         setTimeout(()=>{
           document.activeElement.scrollIntoViewIfNeeded(true);
@@ -72,7 +75,7 @@ import $ from 'jquery';
       handleCli(e){
         e.stopPropagation();
         // const select = this.item.select;
-        if(!this.select){//聚焦时自动选中该项
+        if(!this.select&&this.txt){//聚焦时自动选中该项
           this.$emit('handleSelec');
         } 
       }
@@ -101,6 +104,13 @@ import $ from 'jquery';
     .prefix,.suffix{
       display: inline-block;
       vertical-align: middle;
+    }
+    .iptimg {
+      width: .34rem;
+      height: .34rem;
+      margin-right: .1rem;
+      position: relative;
+      top: .06rem;
     }
      input{
       height: .42rem;

+ 33 - 8
src/common/PickTime.vue

@@ -1,16 +1,31 @@
 <!-- 时间类型控件 -->
 <template>
-  <div class="toast-wrap">
-    <p v-show="val" :class="['ptab',{'check':val != '请选择'}]" @click="showPicker">{{val}}</p>
-    <p v-show="val != '请选择'" class="tip">点击可修改</p>
-    <Picker ref="picker" :show="showTime" @comfirn="getTimeVal" @cancel="close" :picIndex="picIndex"/>
-  </div> 
+  <!-- <transition name="fade"> -->
+    <div :style="getStyle(detail,slide)" class="toast-wrap">
+      <p v-show="val" :class="['ptab',{'check':val != '请选择'}]" @click="showPicker">{{val}}</p>
+      <p v-show="val != '请选择'" class="tip">点击可修改</p>
+      <Picker ref="picker" :show="showTime" @comfirn="getTimeVal" @cancel="close" :picIndex="picIndex"/>
+    </div> 
+  <!-- </transition> -->
 </template>
 <script type="text/javascript">
   import $ from 'jquery';
   import Picker from './Picker.vue';
   export default {
     name:'PickTime',
+    props:{
+      item:{
+        default:''
+      },
+      slide:{
+        default:false,
+        type:Boolean
+      },
+      detail:{
+        default:2,
+        type:Number||String
+      }
+    },
     data() {
       return {
         val:this.item.value || '请选择',
@@ -18,8 +33,18 @@
         picIndex:this.item.pickIndex||[]
       }
     },
-    props:['item'],
     methods: {
+      getStyle(detail,slide){
+        if(detail == 1){
+          if(slide){
+            return {'display':'block','background-color': '#F9F9F9'}
+          }else{
+            return {'display':'none'}
+          }
+        }else{
+          return {'display':'block'}
+        }
+      },
       showPicker(){
         this.showTime = true;
         $(".btscroll").css({'position':'fixed'})
@@ -61,16 +86,16 @@
 <style lang="less" scoped>
   @import '../less/base.less';
   .toast-wrap{
-    margin-bottom: .2rem;
     position: relative;
     z-index: 116;
+    .bgques;
     .ptab{
       width:100%;
       height: .8rem;
       line-height: .8rem;
       text-align: center;
       border:1px solid #E6E6E6;
-      border-radius: .1rem;
+      border-radius: .4rem;
       color:#7C828E;
     }
     .check{

+ 3 - 1
src/common/Picker.vue

@@ -7,6 +7,7 @@
             :columns="columns"
             :visible-item-count='3'
             @change="handlechange"
+            :swipe-duration="time"
           />
           <div class="confBtn">
             <p class="tip" v-show="showTip">请选择正确的时间</p>
@@ -43,7 +44,8 @@
           },
         ],
         showTip:false,
-        columIndx:[]
+        columIndx:[],
+        time:100
       }
     },
     props:['show','picIndex'],

+ 63 - 14
src/common/Radio.vue

@@ -1,10 +1,10 @@
 <template>
-  <div class="radio-wrap" v-if="item">
+  <div v-if="item" class="radio-wrap bgques" :style="getStyle(detail,slide)">
     <!-- <p v-for="(it,index) in datas.questionDetailList" :key="it.id" class="list" @click="handleClick(it,index,true)"> -->
-    <p v-for="(it,index) in datas.questionDetailList" :key="it.id" :class="['list',{'block':((it.description||it.name).indexOf('${'))!=-1}]" @click="handleClick(it,index,true)">
-      <img :src="it.select==1?check:defaultPic">
-      <span v-if="((it.description||it.name).indexOf('${'))==-1" :class="{'check':it.select==1}">{{it.description||it.name}}</span>
-      <OptionInp v-else :item="it" @handleInp="inpVal($event,index)" @handleSelec="handleClick(it,index)"/>
+    <p v-for="(it,index) in datas.questionDetailList" :key="it.id" :class="['list',{'block':((it.description||it.name).indexOf('${'))!=-1}]">
+      <!-- <img :src="it.select==1?check:defaultPic"> -->
+      <span v-if="((it.description||it.name).indexOf('${'))==-1" :class="['radioCheck',{'check':it.select==1}]" @click="handleClick(it,index,true)">{{it.description||it.name}}</span>
+      <OptionInp v-else :item="it" @handleInp="inpVal($event,index)" @handleSelec="handleClick(it,index,false,true)"/>
     </p>
   </div>
 </template>
@@ -16,6 +16,19 @@ import MultiLineInput from '../common/MultiLineInput.vue';
 import OptionInp from '../common/OptionInp.vue';
   export default{
     name:'Radio',
+    props:{
+      item:{
+        default:''
+      },
+      slide:{
+        default:false,
+        type:Boolean
+      },
+      detail:{
+        default:2,
+        type:Number||String
+      }
+    },
     data(){
       return{
         defaultPic:icon,
@@ -24,13 +37,23 @@ import OptionInp from '../common/OptionInp.vue';
         imgUrl:imageUrlPrefix,
       }
     },
-    props:['item'],
     created(){
       // this.datas = JSON.parse(JSON.stringify(this.item));
       this.datas = this.item;
     },
     methods:{
-      handleClick(it,index,flg){
+      getStyle(detail,slide){
+        if(detail == 1){
+          if(slide){
+            return {'display':'block','background-color': '#F9F9F9'}
+          }else{
+            return {'display':'none'}
+          }
+        }else{
+          return {'display':'block'}
+        }
+      },
+      handleClick(it,index,flg,ipt){
         if(flg){
           document.activeElement.blur();      
           document.activeElement.scrollIntoViewIfNeeded(true);
@@ -39,11 +62,22 @@ import OptionInp from '../common/OptionInp.vue';
           },300)
         }
         const list = this.datas;
-        let data = list.questionDetailList&&list.questionDetailList.slice(0); //数组深拷贝?
-        for(let i=0;i<data.length; i++){
-          data[i].select = 0
-          if(i==index){
-            data[i].select = 1;
+        let data = list.questionDetailList&&list.questionDetailList.slice(0); //数组深拷贝
+        if(ipt){//输入框单选,输入了内容才算选中,删除内容算取消
+          for(let i=0;i<data.length; i++){
+            if(i==index){
+              data[i].select=data[i].value?1:0;
+            }else{
+              data[i].select = 0
+            }
+          }
+        }else{
+          for(let i=0;i<data.length; i++){
+            if(i==index){
+              data[i].select = data[i].select==1?0:1;
+            }else{
+              data[i].select = 0
+            }
           }
         }
         let temp = concatVal(data);
@@ -79,6 +113,7 @@ import OptionInp from '../common/OptionInp.vue';
 <style lang="less" scoped>
 @import '../less/base.less';
   .radio-wrap{
+    .bgques;
     img{
       width:100%;
     }
@@ -87,8 +122,8 @@ import OptionInp from '../common/OptionInp.vue';
     }
     .list{
       color: #colors[text];
-      margin:0 .1rem .1rem 0;
-      padding: .12rem .1rem;
+      margin:0 .1rem .07rem 0;
+      padding: .06rem .1rem .06rem 0;
       display: inline-block;
       white-space: nowrap;
       overflow-x: hidden;
@@ -102,8 +137,22 @@ import OptionInp from '../common/OptionInp.vue';
         white-space: normal;
         vertical-align: middle;
       }
+      .radioCheck {
+        display: inline-block;
+        line-height: .35rem;
+        // min-width: 2rem;
+        // text-align: center;
+        padding:.1rem .1rem;
+        box-sizing: border-box;
+        border-radius: .38rem;
+        border: 1px solid #DFE0E4;
+      }
       .check{
         color: #colors[theme];
+        border: 1px solid #colors[theme];
+      }
+      .iptCheck {
+        color: #colors[theme];
       }
     }
   }

+ 70 - 16
src/common/RadioSelect.vue

@@ -1,11 +1,12 @@
 <template>
-  <div class="radio-wrap radioSelect" v-if="item">
-    <p class="please">请尽量选择其他不适症状</p>
+  <div class="radio-wrap radioSelect" v-if="item" :style="getStyle(detail,slide)">
+    <p class="please">为确保诊断准确性,请充分选择您存在的不适症状</p>
     <div class="list" @click="handleClickShow(1)" :class="[{'setColor':!!hasStr}]">
-      <span>有:<i>{{hasStr?hasStr:'点击选择症状'}}</i></span>
+      <p><span>有:</span><i :style="{'color':hasStr?'#6678FF':null}">{{hasStr?hasStr:'点击选择症状'}}</i></p>
     </div>
+    <p class="please pleaseS">为确保诊断准确性,请充分选择您存在的不适症状</p>
     <div class="list" @click="handleClickShow(2)" :class="[{'setColor':!!noStr}]">
-      <span>无:<i>{{noStr?noStr:'点击选择症状'}}</i></span>
+      <p><span>无:</span><i :style="{'color':noStr?'#6678FF':null}">{{noStr?noStr:'点击选择症状'}}</i></p>
     </div>
     <SymptomLis 
       v-if="show"
@@ -15,6 +16,7 @@
       @close="close"
       @makeSure="makeSure"
     ></SymptomLis>
+    <Submit v-if="submit" :showType="showType" :fail="failMsg" @showSubmit="showSubmit"></Submit>
     <!-- <p v-for="(it,index) in datas.questionDetailList" :key="it.id" class="check">
       <span>{{it.description||it.name}}</span>
     </p> -->
@@ -30,8 +32,22 @@ import icon from '../images/radio-default.png'
 import checkIcon from '../images/radio-check.png'
 import {patt,imageUrlPrefix,concatVal} from '@utils/tools.js'
 import SymptomLis from '../common/SymptomLis.vue';
+import Submit from "../common/Submit";
   export default{
     name:'RadioSelect',
+    props:{
+      item:{
+        default:''
+      },
+      slide:{
+        default:false,
+        type:Boolean
+      },
+      detail:{
+        default:2,
+        type:Number||String
+      }
+    },
     data(){
       return{
         defaultPic:icon,
@@ -42,10 +58,12 @@ import SymptomLis from '../common/SymptomLis.vue';
         SymptomLis:[],
         flg:'', //是有还是无
         noStr:'',
-        hasStr:''
+        hasStr:'',
+        showType:'fail',
+        failMsg:'',
+        submit: false,
       }
     },
-    props:['item'],
     created(){
       // this.datas = JSON.parse(JSON.stringify(this.item));
       this.datas = this.item;
@@ -55,6 +73,17 @@ import SymptomLis from '../common/SymptomLis.vue';
       this.setStr(this.datas&&this.datas.questionDetailList)
     },
     methods:{
+      getStyle(detail,slide){
+        if(detail == 1){
+          if(slide){
+            return {'display':'block','background-color': '#F9F9F9'}
+          }else{
+            return {'display':'none'}
+          }
+        }else{
+          return {'display':'block'}
+        }
+      },
       setStr(lis){
         let noTmp = '',hasTmp = '';
         for(let i = 0;i < lis.length;i++){
@@ -68,7 +97,6 @@ import SymptomLis from '../common/SymptomLis.vue';
         hasTmp = hasTmp.slice(0,hasTmp.length-1)
         this.noStr = noTmp
         this.hasStr = hasTmp
-
       },
       makeSure(lis){
         this.show = false;
@@ -95,8 +123,27 @@ import SymptomLis from '../common/SymptomLis.vue';
       },
       handleClickShow(idx){
         this.flg = idx
-        this.show = true
         this.SymptomLis = this.datas&&this.datas.questionDetailList
+        let lis = this.SymptomLis;
+        let tmpArr = lis.filter((item)=>item.flg!=idx&&item.flg!=undefined)
+        if(tmpArr.length == lis.length){
+          this.defaultWaring("已无症状选择");
+          return
+        }else {
+          this.show = true
+        }
+      },
+      showSubmit(flg) {
+        this.submit = flg;
+      },
+      defaultWaring(msg) {
+        this.showType = "fail";
+        this.failMsg = msg;
+        this.submit = true;
+        let timer = setTimeout(() => {
+          this.submit = false;
+          clearTimeout(timer);
+        }, 2000);
       },
       close(){
         this.show = false
@@ -148,13 +195,15 @@ import SymptomLis from '../common/SymptomLis.vue';
       }
     },
     components:{
-      SymptomLis
+      SymptomLis,
+      Submit
     }
   }
 </script>
 <style lang="less" scoped>
 @import '../less/base.less';
   .radio-wrap{
+    .bgques;    
     .setColor {
       color: #4F50FF!important;
     }
@@ -163,15 +212,17 @@ import SymptomLis from '../common/SymptomLis.vue';
     }
     .list{
       color: #colors[text];
-      margin:0 .1rem .2rem 0;
-      padding: .12rem .1rem;
+      margin-bottom: .1rem;
+      padding: .2rem .1rem;
       background-color: #f5f5f5;
-      white-space: nowrap;
-      -webkit-white-space: nowrap;
-      height: .44rem;
-      border-radius: 5px;
+      border-radius: .5rem;
+      border: 1px solid #E6E6E6;
+      p {
+        padding-left:.2rem;
+      }
       span {
-          margin-left:.2rem;
+          font-weight: 800;
+          color: #333;
       }
       img{
         width: .38rem;
@@ -186,5 +237,8 @@ import SymptomLis from '../common/SymptomLis.vue';
       font-size: 12px;
       color: #777777;
     }
+    .pleaseS {
+      padding-top: .2rem;
+    }
   }
 </style>

+ 6 - 1
src/common/SymptomLis.vue

@@ -6,6 +6,7 @@
                 <div v-for="(it,index) in selectLis" :key="it.id" :class="['text', {'select':it.select==1}]" v-if="it.flg==undefined||it.flg==flg" @click="select(index)">
                   {{it.description||it.name}}
                 </div>
+                <p class="noData" v-if="false">暂无数据</p>
               </div>
               <div class="makeSure" @click="makeSure">确定</div>
             </div>
@@ -58,10 +59,11 @@ import {setScroll} from '@utils/tools.js';
           if(i == idx){
             if(tmpArr[i].select==1){
               tmpArr[i].select = 0
+              tmpArr[i].flg = undefined
             }else{
               tmpArr[i].select = 1
+              tmpArr[i].flg = this.flg
             }
-            tmpArr[i].flg = this.flg
           }
         }
         this.selectLis = tmpArr
@@ -138,5 +140,8 @@ import {setScroll} from '@utils/tools.js';
       .mask;
       z-index: 999;
     }
+    .noData {
+      font-size: .28rem;
+    }
   }
 </style>

+ 22 - 17
src/common/Toast.vue

@@ -2,6 +2,7 @@
     <portal to="notification-outlet">
       <div class="toast-wrap" v-if="show">
             <div class="content">
+              <div class="title">温馨提示</div>
               <div class="text" v-html="message||msg">
                 <!-- {{message||msg}} -->
               </div>
@@ -41,47 +42,51 @@ import $ from 'jquery';
   .toast-wrap{
     .content{
       width: 6.3rem;
-      height: 3.52rem;
       background: #fff;
       z-index: 999;
-      // position: absolute;
       position: fixed;
       top:50%;
       left: 50%;
       transform: translate(-50%,-50%);
-      padding: .5rem;
+      padding: 0.6rem 0.5rem 1.5rem .5rem;
       box-sizing: border-box;
       border-radius: .2rem;
       z-index: 1000;
+      overflow: hidden;
+      .title {
+        font-size: .32rem;
+        text-align: center;
+        font-weight: 800;
+      }
       .text{
         color:#colors[quest];
         text-align: center;
-        height: 1.25rem;
-        // overflow-y: auto;
-        padding-top: .2rem;
+        padding-top: .4rem;
         font-size: .3rem;
       }
       .btn{
-        margin-top: .30rem;
-        padding: 0 .7rem;
         display: flex;
         justify-content: space-between;
+        position: absolute;
+        bottom: 0;
+        left: 0;
+        width: 6.3rem;
+        height: .9rem;
+        line-height: .9rem;
+        border-top: 1px solid #colors[line];
         span{
           display: inline-block;
-          width: 1.6rem;
-          height: .70rem;
-          line-height: .70rem;
+          width: 50%;
           text-align: center;
-          font-size: .30rem;
-          border-radius: .35rem;
+          font-size: .32rem;
         }
         .comf{
-          color:#F64B44;
-          border:2px solid rgba(246,75,68,1);
+          border-right: 1px solid #colors[line];
+          box-sizing: border-box;
+          color: #FF6167;
         }
         .canc{
-          color: #colors[theme];
-          border:2px solid rgba(79,80,255,1);
+          color: #colors[btn];
         }
       }
     }

+ 32 - 20
src/common/UploadImg.vue

@@ -3,21 +3,7 @@
     <div class="box">
       
       <ul class="upload-imgs">
-        <li
-          v-show="imgLen<6"
-          class="uploadBox"
-        >
-          <input
-            type="file"
-            class="upload"
-            @change="addImg"
-            accept="image/*"
-            ref="inp"
-          />
-          <img src="../images/upload.png">
-          <p>点击上传</p>
-        </li>
-        <li v-for='(value, key) in imgs'>
+        <li v-for='(value, key) in imgs' class="imgLis">
           <p class="imgbox">
             <img
               :src="value"
@@ -31,6 +17,20 @@
             @click="delImg(key)"
           ></a>
         </li>
+        <li
+          v-show="imgLen<6"
+          class="uploadBox"
+        >
+          <input
+            type="file"
+            class="upload"
+            @change="addImg"
+            accept="image/*"
+            ref="inp"
+          />
+          <!-- <img src="../images/addimg.png"> -->
+          <p>点击上传</p>
+        </li>
       </ul>
     </div>
   </div>
@@ -193,7 +193,7 @@ export default {
   .upload-imgs {
     margin-bottom: 0.2rem;
     .upload{
-      width: 1.86rem;
+      width: 1.9rem;
       height: 100%;
       position: absolute;
       left: 0;
@@ -201,18 +201,27 @@ export default {
       opacity: 0;
     }
     .uploadBox {
-      border: 1px solid #dfe0e4;
+      // border: 1px solid #dfe0e4;
       box-sizing: border-box;
       text-align: center;
+      background: url('../images/addimg.png') no-repeat;
+      background-size: cover;
+      position: relative;
       img {
         width: 0.6rem;
         margin: 0.45rem 0 0.23rem 0;
       }
+      p {
+        position: absolute;
+        bottom: .16rem;
+        left: 0;
+        width: 100%;
+        color: #AAAAAA;
+      }
     }
     li {
-      width: 1.86rem;
+      width: 1.9rem;
       height: 1.9rem;
-      border: 1px solid #dfe0e4;
       display: inline-block;
       position: relative;
       vertical-align: top;
@@ -221,7 +230,7 @@ export default {
       .close {
         width: 0.54rem;
         height: 0.54rem;
-        background: url(../images/del-pic.png) no-repeat;
+        background: url(../images/closeimg.png) no-repeat;
         background-size: cover;
         position: absolute;
         top: -0.27rem;
@@ -229,6 +238,9 @@ export default {
         z-index: 3;
       }
     }
+    .imgLis {
+      border: 1px solid #dfe0e4;
+    }
     li:nth-child(3n + 1) {
       margin-left: 0;
     }

+ 2 - 1
src/components/AddContent.vue

@@ -54,7 +54,8 @@
       </div>
     </div>
     <div class="foot">
-      <span class="back" @click="back">{{'返回'+ preName}}</span>
+      <!-- <span class="back" @click="back">{{'返回'+ preName}}</span> -->
+      <span class="back" @click="back">上一步</span>
       <span class="next" @click="next">预览并提交病历</span>
     </div>
   </div>

+ 3 - 1
src/components/Department.vue

@@ -71,6 +71,8 @@
     }
 </script>
 <style lang="less" scoped>
+@import '../less/base.less';
+
     .department {
         font-size: .3rem;
         padding: .3rem 0 1rem 0;
@@ -86,7 +88,7 @@
             }
             .list {
                 background:rgba(255,255,255,1);
-                box-shadow:0px 3px 15px 0px rgba(217,217,217,0.5);
+                box-shadow:0px 3px 20px 0px rgba(192,187,224,0.23);
                 border-radius:.1rem;
                 overflow: hidden;
                 margin-bottom: .3rem;

+ 120 - 18
src/components/Detail.vue

@@ -1,43 +1,62 @@
 <template>
   <div class="detail-wrap">
     <!-- <div v-for="(item,index) in datas"> -->
-    <div v-for="(item,index) in checkDatas.questionMapping">
-      <p class="quest"><span v-show="item.required==1" style="color: red;">*</span>{{index + 1 +'.' + (item.description || item.name)}}</p>
-      <img class="questionImg" :src="item.url.replace('{imageUrlPrefix}',imgUrl)" v-if="item.url">
+    <div class="preQuestion" v-for="(item,index) in checkDatas.questionMapping">
+      <div class="quest" @click="slideToggle(index)">
+        <span class="sign">{{item.required==1?'*':''}}</span>
+        <p class="title clearfix">{{index + 1 +'.'+(item.description || item.name)}}{{item.controlType==1?'(单选)':item.controlType==2?'(多选)':''}}</p>
+        <p class="result" v-if="item.valueP&&item.slide!=1">{{item.valueP}}</p>
+        <i :class="[{'slideT':item.slide}]"></i>
+      </div>
+      <img class="questionImg" :src="item.url.replace('{imageUrlPrefix}',imgUrl)" v-if="item.url&&!!item.slide">
       <Radio v-if="item.controlType==1" 
             :item="item"
             :key="item.id"
+            :slide="!!item.slide"
+            :detail="1"
             @updata="updataData"/>
       <RadioSelect v-if="item.controlType==8" 
             :item="item"
+            :slide="!!item.slide"
+            :detail="1"
             :key="item.id"
             @updata="updataData"/>
-      <CheckBox v-if="item.controlType==2" 
+      <CheckBox v-if="item.controlType==2"
             :item="item"
             :key="item.id"
+            :slide="!!item.slide"
+            :detail="1"
             @updata="updataData"/>
       <!-- 文本域 -->
       <ComTextArea v-if="item.controlType == 5"
             :item="item"
+            :slide="!!item.slide"
+            :detail="1"
             @updata="updataData"/>
       <!-- 输入框 -->
       <Input v-if="item.controlType==6 || item.controlType==7"
             :item="item"
             :key="item.id"
+            :slide="!!item.slide"
+            :detail="1"
             @updata="updataData"/>
-      <template
-        v-if="item.controlType == 3"
-        v-for="(part,index) in item.questionDetailList"
-      >
-        <MultiLineInput
-          v-if="item.controlType == 3"
-          :msg="part.description||part.name"
-          :part="part"
-          @updata="updataData($event,item)"
-        ></MultiLineInput>
-      </template>
+      <div class="multiWrap" :style="{'display':!!item.slide?'block':'none'}" v-if="item.controlType == 3">
+        <template
+          v-for="(part,index) in item.questionDetailList"
+        >
+          <MultiLineInput
+            v-if="item.controlType == 3"
+            :msg="part.description||part.name"
+            :part="part"
+            :isLast="item.questionDetailList.length-1 == index"
+            @updata="updataData($event,item)"
+          ></MultiLineInput>
+        </template>
+      </div>
       <PickTime v-if="item.controlType == 9" 
               @updata="updataData"
+              :slide="!!item.slide"
+              :detail="1"
               :item="item"/>
     </div>
   </div>
@@ -57,7 +76,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
     data(){
       return{
         checkDatas:{},
-        imgUrl:imageUrlPrefix,
+        imgUrl:imageUrlPrefix
       }
     },
     props:['datas','data'],
@@ -74,6 +93,47 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
       PickTime
     },
     methods:{
+      slideAll(){
+        let mapping = this.checkDatas.questionMapping;
+        let num = 0;
+        for(let i in mapping){
+          if(mapping[i].slide != 1){
+            ++num
+          }
+        }
+        if(num == mapping.length){//没有任何展开项
+          for(let i in mapping){
+            mapping[i].slide = 1
+          }
+          this.$emit('setBtnTxt','折叠全部')
+        }else{//有已经展开的了,就折叠已展开的
+          for(let i in mapping){
+            mapping[i].slide = 0
+          }
+          this.$emit('setBtnTxt','展开全部')
+        }
+        this.checkDatas = Object.assign({},this.checkDatas);
+      },
+      slideToggle(idx){
+        let mapping = this.checkDatas.questionMapping;
+        let num = 0;
+        for(let i in mapping){
+          if(i == idx){
+            mapping[i].slide = mapping[i].slide==1?0:1
+          }
+        }
+        for(let i in mapping){
+          if(mapping[i].slide != 1){
+            ++num
+          }
+        }
+        if(num == mapping.length){//没有任何展开项
+          this.$emit('setBtnTxt','展开全部')
+        }else{//有已经展开的了,就折叠已展开的
+          this.$emit('setBtnTxt','折叠全部')
+        }
+        this.checkDatas = Object.assign({},this.checkDatas);
+      },
       updataData(data,item){
         const origMapping = this.datas.questionMapping;
         let mapping = this.checkDatas.questionMapping;
@@ -256,14 +316,56 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
 @import '../less/base.less';
   .detail-wrap{
     // padding: .3rem .5rem 1.2rem .6rem;
-    padding: .3rem .4rem 1rem ;
+    padding: 0 0 1.5rem;
     font-size: .3rem;
     .quest{
       color:#colors[quest];
-      margin-bottom: .2rem;
+      position: relative;
+      // margin-bottom: .2rem;
+      .pubques;
+      .sign {
+        display: inline-block;
+        position: absolute;
+        left: 0.16rem;
+        top: 0.5rem;
+        width: 0.1rem;
+        color: red;
+      }
+      .order {
+        // float: left;
+      }
+      .result {
+        font-size: .3rem;
+        color: #colors[theme];
+        padding:.1rem .3rem;
+      }
+      .title {
+        color: #000;
+        padding-left: .06rem;
+        display: inline-block;
+      }
+      i{
+        position: absolute;
+        right: .2rem;
+        top: 50%;
+        margin-top: -.16rem;
+        width: .32rem;
+        height: .32rem;
+        background: url("../images/slideT.png") no-repeat;
+        background-size: cover;
+        transition: all 0.03s;
+      }
+      .slideT {
+        transform: rotateZ(-180deg);
+        transform-origin: center center;
+      }
     }
     .questionImg {
       width: 100%;
     }
+    .multiWrap {
+      .bgques;
+      background-color: #colors[bgques];
+    }
   }
 </style>

+ 34 - 12
src/components/DetailBox.vue

@@ -9,6 +9,7 @@
                   ref="detail"
                   :data="data"
                   @check="changeCheck($event)"
+                  @setBtnTxt="setBtnTxt($event)"
                   @checkReq="changeFins($event)"/>
         </div>
         <!-- <div class="foot" @click="complete">完成</div> -->
@@ -23,7 +24,10 @@
       </div>
     </div>
     <!-- <div :class="['foot',{'noCheck':!checkF}]" @click="complete">完成</div> -->
-    <div style="position:absolute" :class="['foot',{'noCheck':!checkF || !reqFinish}]" @click="complete">完成</div>
+    <div style="position:absolute" class="foot">
+      <div class="slide" @click="slideAll()">{{btnTxt}}</div>
+      <div class="nextBtn compete" :class="{'noCheck':!checkF || !reqFinish}" @click="complete">完成</div>
+    </div>
     <Toast :message="clearTxt" 
           :show="showToast"
           @comfirn="comfirnDel" 
@@ -48,11 +52,12 @@
         compFlag:false,
         clearTxt:"是否清空当前已选内容?",
         showToast:false,
-        tips:"请完成病情预问诊可让医生提前了解病情",
+        tips:"温馨提示:请完成病情预问诊可让医生提前了解病情",
         checkF:false, //详情页有无已选项标识
         show:detailShow,
         reqFinish:false,
-        showPic:false
+        showPic:false,
+        btnTxt:'展开全部'
       }
     },
     mounted(){
@@ -74,6 +79,12 @@
       })
     },
     methods:{
+      setBtnTxt(txt){
+        this.btnTxt = txt
+      },
+      slideAll(){
+        this.$refs.detail.slideAll();
+      },
       onScroll(data) {
         this.$store.commit('setScroll', data)
         document.activeElement.scrollIntoViewIfNeeded(true);        
@@ -170,14 +181,12 @@
     z-index: 110;
   }
   .tmpDom {
-    height: 1rem;
+    height: 1.5rem;
   }
   .detailBox-wrap{
     width: 100%;
-    // overflow-y: auto;
     position: absolute;
-    // bottom: 0; //iPhone6plus键盘收起会跳转
-    top:45px;
+    top:1rem;
     bottom: 0;
     left: 0;
     z-index: 666;
@@ -187,8 +196,9 @@
     animation: wave .4s linear;
     height: 100%;
     overflow: hidden;
+    border-radius:.2rem .2rem 0px 0px;
     .head{
-      height: 1rem; //增加了提示
+      height: 1.6rem; //增加了提示
       line-height: .88rem;
       display: flex; //有清空时
       justify-content: space-between;
@@ -201,16 +211,19 @@
       background-color: #fff;
       top: 45px;
       box-sizing: border-box;
+      border-radius:.2rem .2rem 0px 0px;
       i{
         position: absolute;
-        top:0.64rem;
+        bottom:0;
         left:0;
         font-size: .22rem;
         width:100%;
-        height: .33rem;
-        line-height: .33rem;
+        height: .6rem;
+        line-height: .6rem;
         display: inline-block;
-        text-align: center;
+        background-color: #EAF1F9;
+        color: #colors[btn];
+        text-indent: .4rem;
       }
       .icon{
         display: inline-block;
@@ -234,6 +247,15 @@
   }
   .foot{
     .footer;
+    .slide {
+      color: #7C828E;
+      width: 49%;
+      display: inline-block;
+    }
+    .compete {
+      width: 49%;
+      display: inline-block;
+    }
     animation-delay:.6s;
     animation: foo .4s linear;
     /* width:100%;

+ 7 - 4
src/components/DiagTreat.vue

@@ -58,12 +58,15 @@
     </div>
 
     <div class="foot" v-if="modluesLen==2">
-      <span class="back" @click="beBack">{{'返回'+ preName}}</span>
-      <span class="next" @click="toNext">{{'预览并提交病历'}}</span>
+      <!-- <span class="back" @click="beBack">{{'返回'+ preName}}</span> -->
+      <span class="back" @click="beBack">上一步</span>
+      <span class="next" @click="toNext">预览并提交病历</span>
     </div>
     <div class="foot" v-else>
-      <span class="back" @click="beBack">{{'返回'+ preName}}</span>
-      <span class="next" @click="toNext">{{'进入'+ nextName}}</span>
+      <!-- <span class="back" @click="beBack">{{'返回'+ preName}}</span> -->
+      <!-- <span class="next" @click="toNext">{{'进入'+ nextName}}</span> -->
+      <span class="back" @click="beBack">上一步</span>
+      <span class="next" @click="toNext">下一步</span>
     </div>
   </div>
 </template>

+ 13 - 8
src/components/Login.vue

@@ -44,7 +44,7 @@
           placeholder="请输入姓名"
         />
       </div>
-      <div :class="['btn',value&&patName?'btnClick':'btnDis']" @click="handleDepart">进入预问诊</div>
+      <div :class="['btn',value&&patName&&allow?'btnClick':'btnDis']" @click="handleDepart">进入预问诊</div>
     </div>
     <div class="tip">注:建议您可先输入病情情况,方便医生提前了解情况</div>
     <Submit v-if="submit" :showType="showType" :fail="failMsg" @showSubmit="showSubmit"></Submit>
@@ -59,6 +59,7 @@ import { phoneTest, identify, jgpattern,name } from "@utils/tools.js";
 import Submit from "../common/Submit";
 import Tiptoast from "../common/Tiptoast";
 import api from "@utils/api.js";
+import $ from "jquery";
 export default {
   name: "Login",
   data() {
@@ -76,7 +77,8 @@ export default {
         title: "",
         text: ""
       },
-      code:''
+      code:'',
+      allow:true
     };
   },
   created(){
@@ -101,6 +103,7 @@ export default {
       this.show = !show;
     },
     blur() {
+      document.activeElement.scrollIntoView({behavior: "smooth"})
       if(MobileDevice.getModels().join(' or ').indexOf('6') == -1){
         document.activeElement.scrollIntoViewIfNeeded(true);      
         setTimeout(() => {
@@ -136,8 +139,9 @@ export default {
       this.submit = flg;
     },
     handleDepart() {
-      const { type, value,patName } = this;
-      if (value&&patName) {
+      const { type, value,patName,allow } = this;
+      if (value&&patName&&allow) {
+        this.allow = false
         let timer = setTimeout(() => {
           if (type == 103) {
             if (!phoneTest.test(value)) {
@@ -192,7 +196,7 @@ export default {
                   recordId: msg.recordId,
                   time:(new Date((msg.recordTime).replace(/\-/g, "/"))).getTime()
                 };
-                localStorage.setItem('loginParam',JSON.stringify(params))//保存登陆信息,扫码进入删除该参数
+                localStorage.setItem('loginParam',JSON.stringify(params))//保存登陆信息,扫码进入删除该参数
                 this.$router.push({
                   path: "/home",
                   query: params
@@ -215,10 +219,11 @@ export default {
             }
           })
           .catch(() => {
+            this.allow = true
             clearTimeout(timer)
             this.defaultWaring("网络异常请稍后重试");
           });
-        }, 300);
+        }, 200);
       }
     }
   },
@@ -306,8 +311,8 @@ export default {
         font-size: 0.28rem;
         li {
           border-bottom: 1px solid #f5f5f5;
-          height: 0.6rem;
-          line-height: 0.6rem;
+          height: .88rem;
+          line-height: .88rem;
           box-sizing: border-box;
         }
       }

+ 9 - 5
src/components/Others.vue

@@ -52,12 +52,15 @@
       </div>
     </div>
     <div class="foot" v-if="modluesLen==3&&!nextName||modluesLen==2">
-      <span class="back" @click="beBack">{{'返回'+ preName}}</span>
-      <span class="next" @click="toNext">{{'预览并提交病历'}}</span>
+      <!-- <span class="back" @click="beBack">{{'返回'+ preName}}</span> -->
+      <span class="back" @click="beBack">上一步</span>
+      <span class="next" @click="toNext">预览并提交病历</span>
     </div>
     <div class="foot" v-else>
-      <span class="back" @click="beBack">{{'返回'+ preName}}</span>
-      <span class="next" @click="toNext">{{'进入'+ nextName}}</span>
+      <!-- <span class="back" @click="beBack">{{'返回'+ preName}}</span>
+      <span class="next" @click="toNext">{{'进入'+ nextName}}</span> -->
+      <span class="back" @click="beBack">上一步</span>
+      <span class="next" @click="toNext">下一步</span>
     </div>
   </div>
 </template>
@@ -195,11 +198,12 @@
     // .btscroll;
     .quest{
       color: #colors[quest];
-      margin-bottom: .36rem;
+      // margin-bottom: .36rem;
       font-weight: 700;
     }
     .label{
       .label;
+      padding-bottom: 0;
     }
     .result{
       .result;

+ 135 - 142
src/components/PathInfo.vue

@@ -1,56 +1,51 @@
 <template>
   <div class="path-wrap">
     <div class="content">
-      <p class="info">挂号用户信息查询如下:</p>
-      <div class="con">
-        <p class="name">
-          <span>{{pathInfo.patientName}}</span>|
-          <span>{{pathInfo.patientSex}}</span>|
-          <span>{{pathInfo.patientAge}}岁</span>
+      <div class="topContent">
+        <p class="hospitalName">{{pathInfo.hospitalName}}</p>
+        <h2>智能预问诊</h2>
+        <p class="explain">该系统通过智能引导式问诊,帮助医生规范、全面的采集患者的症状、体征、病史等信息,从而实现诊疗流程的优化和配置。</p>
+      </div>
+      <div class="minContent">
+        <p class="msg"><i class="person"></i>挂号信息</p>
+        <p class="perMsg perLine">
+          <span class="msgTitle">患者信息:</span>
+          <span class="perDetail">{{pathInfo.patientName}}</span>
+          <span class="perDetail">{{pathInfo.patientSex}}</span>
+          <span class="perDetail">{{pathInfo.patientAge}}岁</span>
         </p>
-        <p>
-          <span>挂号科室:</span>
-          <span>{{pathInfo.hospitalDeptName}}</span>
+        <p class="perLine">
+          <span class="msgTitle">挂号科室:</span>
+          <span>{{pathInfo.hospitalDeptName}}</span>  
         </p>
-        <p>
-          <span>门诊号:</span>
-          <span>{{pathInfo.recordId}}</span>
-          <span style="margin-left:.20rem">预约医生:</span>
+        <p class="perLine">
+          <span class="msgTitle">预约医生:</span>
           <span>{{pathInfo.doctorName}}</span>
         </p>
-        <p>
-          <span>预约时间:</span>
+        <p class="perLine">
+          <span class="msgTitle">门诊号:</span>
+          <span>{{pathInfo.recordId}}</span>
+        </p>
+        <p class="perLine">
+          <span class="msgTitle">预约时间:</span>
           <span>{{time}}</span>
         </p>
-        <p class="already" v-if="type !== 1">{{text[type]}}</p>
       </div>
-      <div class="out-box">
-        <div class="emery">
-          <div class="baner">
-            <p>{{pathInfo.hospitalName}}</p>
-            <p class="big">智能预问诊</p>
-          </div>
-          <div class="inner">
-            <p>该系统通过智能引导式问诊,帮助医生规范、全面的采集患者的症状、体征、病史等信息,从而实现诊疗流程的优化和配置。</p>
-            <button @click="getStart">开始</button>
-          </div>
-          <!-- <p v-if="type==3">您已完成过一次预问诊,是否再次录入</p> -->
-        </div>
-        <div class="child" v-if="child.length>0&&child[0].value==1 && !hideChild">
-          <div class="baner">
-            <p>{{pathInfo.hospitalName}}</p>
-            <p class="big">儿童体质检测</p>
-          </div>
-          <div class="inner">
-            <p>该标准将为0-12岁儿童在为体质辨识及与中医体质相关疾病的预防、养生保健、健康管理提供依据,使体质分类科学化、规范化。</p>
-            <button>开始</button>
-          </div>
-        </div>
+      <div class="btmContent" @click="getStart">开始</div>
+      <div class="con">
+        <p class="already" v-if="type !== 1">{{text[type]}}</p>
       </div>
     </div>
+    
+    <Toast
+      :message="message"
+      :show="showToast"
+      @comfirn="comfirnDel"
+      @cancel="cancelDel"
+    />
     <Submit
       v-if="submit"
-      :fail="message"
+      :fail="tipMsg"
       showType="fail"
     ></Submit>
   </div>
@@ -58,6 +53,7 @@
 <script type="text/javascript">
   import api from '@utils/api.js'
   import Submit from '../common/Submit';
+  import Toast from '../common/Toast.vue';
   import {getUrlArgObject,setScroll,dateParser} from '@utils/tools.js'
   import BScroll from 'better-scroll';
   export default {
@@ -77,9 +73,11 @@
         hideChild:true,  //隐藏儿童
         submit:false,
         scroll:null,
-        message:'',
+        tipMsg:'',
         time:'',
-        params:{}
+        params:{},
+        showToast:false,
+        message:'您已完成一次预问诊,是否重新录入?'
       }
     },
     created(){
@@ -94,6 +92,12 @@
       })
     },
     methods:{
+      comfirnDel() {
+        this.goNext()
+      },
+      cancelDel() {
+        this.showToast = false
+      },
       getPathInfo(){
         let query = this.$route.query
         let hasQuery = JSON.stringify(query) == '{}'
@@ -121,7 +125,6 @@
           if(result.code==0){
             this.pathInfo = result.data;
             this.$store.commit('savePathInfo',result.data);
-            this.recordCheck(); //校验是否填过
             this.getAll(); //获取模板
           }
         })
@@ -152,10 +155,23 @@
         api.recordCheck(param).then((res)=>{
           const result = res.data;
           if(result.code==0){
-            this.type = result.data.type;
+            let type = result.data.type;
+              this.goNext()
+            if(type == 3||type == 6){
+              this.showToast = true
+            }else{
+              this.goNext()
+            }
           }
         })
       },
+      goNext(){
+        if(this.isReady){
+          this.$router.replace({path:'/tab'})
+        }else{
+          this.defaultWaring('请先维护症状模块')
+        }
+      },
       getAll(){
         const param = {
           'age':this.pathInfo.patientAge,
@@ -181,16 +197,11 @@
           this.defaultWaring('网络异常请稍后重试');
           return
         }
-        if(this.isReady){
-          // this.$router.push({path:'/tab'})
-          this.$router.replace({path:'/tab'})
-        }else{
-          this.defaultWaring('请先维护症状模块')
-        }
+        this.recordCheck(); //校验是否填过
       },
       defaultWaring(msg){
         this.submit = true
-        this.message = msg
+        this.tipMsg = msg
         let timer = setTimeout(() => {
           this.submit = false
           clearTimeout(timer)
@@ -198,7 +209,8 @@
       }, 
     },
     components:{
-      Submit
+      Submit,
+      Toast
     }
   }
 </script>
@@ -210,109 +222,90 @@
     width: 100%;
     height: 100%;
     .content {
-      padding-top: .5rem;
-      padding-bottom: .2rem;
+      padding-bottom: .16rem;
       box-sizing: border-box;
+      position: absolute;
+      width: 100%;
+      height: 100%;
     }
-    .info{
-      font-size: .32rem;
-      font-weight: 700;
-      color: #040428;
-      margin-left: .6rem;
-      font-weight: bold;
-    }
-    .con{
-      margin-left: .6rem;
-      position: relative;
-      >p{
-        color: #colors[text];
-        margin-top: .27rem;
+    .topContent {
+      // background-color: #6678FF;
+      height: 4.78rem;
+      padding: .72rem .6rem;
+      box-sizing: border-box;
+      background:url(../images/topContent.png) no-repeat;
+      background-size: cover;
+      .hospitalName {
+        color: #FFFFFF;
+        font-size: .32rem;
       }
-      .name{
-        color: #colors[text];
-        margin-top: .27rem;
-        span{
-          margin-right: .08rem;
-        }
+      h2 {
+        font-size: .56rem;
+        padding: .36rem 0 .18rem 0;
+        color: #fff;
       }
-      .dept{
-        p{
-          display: inline-block;
-          margin-top: .27rem;
-          span{
-            color: #colors[text];
-          }
-        }
-        p:first-child{
-          margin-right: .25rem;
-        }
+      .explain {
+        font-size: .24rem;
+        color: #fff;
+        line-height: .4rem;
       }
-      .already{
-        position: absolute;
-        left: 0;
-        bottom:-.6rem;
-        color: #colors[text];
-      }
-    }
-    .out-box{
-      white-space: nowrap;
-      overflow-x: auto;
-      padding:0 .15rem .15rem 0;
-      -webkit-overflow-scrolling: touch;  
-      text-align: center;//隐藏儿童
     }
-    .emery,.child{
-      display: inline-block;
-      vertical-align: top;
-      width:5.1rem;
-      margin-top: .91rem;
+    .minContent {
+      padding: .3rem .6rem .6rem .6rem;
       box-sizing: border-box;
-      .baner{
-        box-sizing: border-box;
-        width:100%;
-        height: 2.3rem;
-        padding-top: .5rem;
-        p{
-          color:#fff;
-        }
-        .big{
-          font-size: .56rem;
-          margin-top: .12rem;
+      border-radius: 5px;
+      width: 90%;
+      box-shadow:0px 12px 24px 0px rgba(198,187,224,0.15);
+      position: relative;
+      top: -0.7rem;
+      background-color: #fff;
+      margin: 0 auto;
+      .msg {
+        font-size: .32rem;
+        padding-bottom: .28rem;
+        border-bottom: 1px solid #E6E6E6;
+        margin-bottom: .6rem;
+        .person {
+          display: inline-block;
+          width: .38rem;
+          height: .4rem;
+          background: url(../images/person.png) no-repeat;
+          background-size: cover;
+          margin-right: .3rem;
+          position: relative;
+          top: .06rem;
         }
       }
-      .inner{
-        height: 4.5rem;
-        box-shadow:-.05rem .05rem .10rem -.04rem #989da3,.05rem .05rem .10rem -.04rem #989da3;
-        border-radius: 0 0 .20rem .20rem;
-        padding: .45rem .6rem .6rem;
-        box-sizing: border-box;
-        position: relative;
-        p{
-          font-size: .24rem;
-          line-height: .5rem;
-          white-space: normal;
-          min-height: 100px;
-        }
-        button{
-          width: 4rem;
-          height: .88rem;
-          color: #fff;
-          font-size: .32rem;
-          margin: .40rem 0 0 -.05rem;
-          background: -webkit-gradient(linear, right top, left top, from(#4F8BFF), to(#4F4FFF));
-          background: -webkit-linear-gradient(right, #4F8BFF, #4F4FFF);
-          box-shadow: 0 .12rem .24rem 0 rgba(79,129,255,0.40);
-          border-radius: .44rem;
+      .perLine {
+        font-size: .3rem;
+        padding-bottom: .2rem;
+      }
+      .msgTitle {
+        display: inline-block;
+        width: 1.5rem;
+        color: #777777;
+      }
+      .perMsg {
+        .perDetail {
+          margin-right: .24rem;
         }
       }
+      
     }
-    .emery .baner{
-      background: url('../images/banerbg@1.5x.png') no-repeat;
-      background-size: cover;
-    }
-    .child .baner{
-      background: url('../images/childbg@1.5x.png') no-repeat;
-      background-size: cover;
+    .btmContent {
+      width: 94%;
+      height: .88rem;
+      line-height: .88rem;
+      text-align: center;
+      background-color: #colors[btn];
+      font-size: .32rem;
+      color: #fff;
+      margin: 0 auto;
+      border-radius: 5px;
+      position: absolute;
+      bottom: .88rem;
+      transform: translateX(-50%);
+      left: 50%;
     }
   }
 </style>

+ 23 - 12
src/components/Preview.vue

@@ -7,14 +7,16 @@
           <p class="baseMsg">{{pathInfo.patientName}}&nbsp;&nbsp;&nbsp;&nbsp;{{pathInfo.patientSex}}&nbsp;&nbsp;&nbsp;&nbsp;{{pathInfo.patientAge}}岁</p>
           <table>
             <tr>
-              <td colspan="2">挂号科室:{{pathInfo.selfDeptName}}</td>
+              <td><span>挂号科室:</span>{{pathInfo.selfDeptName}}</td>
             </tr>
             <tr>
-              <td>门诊号:{{pathInfo.recordId}}</td>
-              <td>预约医生:{{pathInfo.doctorName}}</td>
+              <td><span>门诊号:</span>{{pathInfo.recordId}}</td>
             </tr>
             <tr>
-              <td colspan="2">就诊时间:{{time}}</td>
+              <td><span>预约医生:</span>{{pathInfo.doctorName}}</td>
+            </tr>
+            <tr>
+              <td><span>就诊时间:</span>{{time}}</td>
             </tr>
           </table>
           <!-- <div class="line"></div>
@@ -24,7 +26,7 @@
           <ul class="previewParts">
             <!-- <li v-if="symptom.choose.length>0"> -->
             <li>
-              <h4><i :style="{'background': '#FF9A9A'}"></i> 主诉:</h4>
+              <h4><i></i> 主诉:</h4>
               <p>
                 <span v-for="(item,idx) in symptom.choose" :key="item.name+idx">
                 {{item.specialP?(item.description||item.name)+item.specialP+(idx == symptom.choose.length-1?'':','):(item.description||item.name)+(idx == symptom.choose.length-1?'':',')}}
@@ -33,7 +35,7 @@
             </li>
             <!-- <li v-if="diagnose.text.length>0||symptom.choose.length>0"> -->
             <li>
-              <h4><i :style="{'background': '#3D69D9'}"></i> 现病史:</h4>
+              <h4><i></i> 现病史:</h4>
               <p v-for="item in symptom.text">{{item.textP}}</p>
               <p>
                 <span>{{getDetailText(diagnose.text,false).view}}</span>
@@ -83,13 +85,13 @@
           <div class="personMsg personMsg2">
             <ul class="previewParts">
               <li>
-                <h4><i :style="{'background': '#FF9A9A'}"></i> 主诉:</h4>
+                <h4><i></i> 主诉:</h4>
                 <p>
                   <span v-for="(item,idx) in symptom.choose" :key="item.name+idx">{{item.special?item.name+item.special+(idx == symptom.choose.length-1?'':','):item.name+(idx == symptom.choose.length-1?'':',')}}</span>
                 </p>
               </li>
               <li>
-                <h4><i :style="{'background': '#3D69D9'}"></i> 现病史:</h4>
+                <h4><i></i> 现病史:</h4>
                 <p v-for="item in symptom.text">{{item.text}}</p>
                 <p>
                   <span>{{getDetailText(diagnose.text,false).content}}</span>
@@ -365,7 +367,7 @@ export default {
 }
 .preview {
   color: red;
-  background-color: #f2f2f5;
+  background-color: #fff;
   position: fixed;
   width: 100%;
   height: 100%;
@@ -409,6 +411,7 @@ export default {
   background-color: #fff;
   border-radius: 0.16rem;
   margin-bottom: 0.38rem;
+  box-shadow:0px 3px 20px 0px rgba(192,187,224,0.23);
   .previewParts {
     li {
       padding: .1rem .3rem;
@@ -427,7 +430,7 @@ export default {
         width: .16rem;
         height: .16rem;
         border-radius: 50%;
-        background: #767676;
+        background: #colors[theme];
         display: inline-block;
         position: absolute;
         top: .15rem;
@@ -447,11 +450,11 @@ export default {
     letter-spacing: 0;
     text-align: justify;
     font-weight: bold;
-    margin-bottom: 0.13rem;
+    margin-bottom: 0.15rem;
   }
   table {
     width: 100%;
-    font-size: 0.26rem;
+    font-size: 0.3rem;
     color: #333333;
     letter-spacing: 0;
     text-align: justify;
@@ -459,6 +462,14 @@ export default {
     tr {
       padding: .2rem 0;
       line-height: .5rem;
+      td {
+        padding-bottom: 0.1rem;
+      }
+      span {
+        color:#777;
+        width: 1.5rem;
+        display: inline-block;
+      }
     }
   }
   .line {

+ 27 - 20
src/components/Symptom.vue

@@ -35,8 +35,8 @@
           class="symp"
           v-for="(it,ind) in symp"
           :key="it.conceptId"
-          @touchstart.stop.prevent="touchstart(it)"
-          @touchend.stop.prevent="touchend(it)"
+          @touchstart.prevent="touchstart($event,it)"
+          @touchend.prevent="touchend(it)"
         >{{it.description || it.name}}</span>
         <p class="tip" v-show="chooseSymp.length==0">长按症状按钮可显示症状解释说明</p>
       </div>
@@ -45,17 +45,23 @@
         v-if="checkText.length>0"
       >
         <p class="title">{{nameStr}}</p>
-        <p v-for="(value,index) in checkText">{{value.textP}}</p>
+        <div class="bgResult">
+          <p v-for="(value,index) in checkText">{{value.textP}}</p>
+        </div>
       </div>
     </div>
     <div v-if="modluesLen>1"
-      :class="['footer',{'nofoot':chooseSymp.length==0}]"
       @click="toNext"
-    >下一步</div>
+      class="footer"
+    >
+      <div class="nextBtn" :class="{'nofoot':chooseSymp.length==0}">下一步</div>
+    </div>
     <div v-if="modluesLen==1"
-      :class="['footer',{'nofoot':chooseSymp.length==0}]"
+      class="footer"
       @click="toNext"
-    >预览并提交病历</div>
+    >
+      <div class="nextBtn" :class="{'nofoot':chooseSymp.length==0}">预览并提交病历</div>    
+    </div>
     <Toast
       :message="delText"
       :show="showToast"
@@ -133,7 +139,16 @@ export default {
     })
   },
   methods: {
-    touchstart(it){
+    touchend(item,flg) {//症状点开详情
+      clearTimeout(this.timer);
+      let endTime = +new Date();
+      if(endTime - this.startTime < 500){//点击事件
+        this.common(item,flg);
+      }
+      this.startTime = "";
+    },
+    touchstart(event,it){
+      console.log(event)
       this.startTime = +new Date();
       const that = this;
       this.timer = setTimeout(function(){
@@ -226,14 +241,6 @@ export default {
       this.isSearch=flg||false
       this.common(item,flg);
     },
-    touchend(item,flg) {//症状点开详情
-      clearTimeout(this.timer);
-      let endTime = +new Date();
-      if(endTime - this.startTime < 500){//点击事件
-        this.common(item,flg);
-      }
-      this.startTime = "";
-    },
     getSympText() {//推送使用医生端信息
       const text = this.$store.state.symptom.text;
       let msg = "";
@@ -350,7 +357,7 @@ export default {
       display: inline-block;
       min-width:1.9rem;
       height: .74rem;
-      background: linear-gradient(-270deg, #3638EE, #4E72FF);
+      background: #colors[btn];
       box-shadow: 0 .08rem .16rem 0 rgba(79,129,255,0.40);
       border-radius: .08rem;
       white-space: nowrap;
@@ -380,9 +387,9 @@ export default {
   .result{
     padding-right: .3rem;
     .title{
-      color: #4F50FF;
+      color: #colors[btn];
       padding-left: .1rem;
-      border-left: .08rem solid #4F50FF;
+      border-left: .08rem solid #colors[btn];
       margin-bottom: .19rem;
       font-weight: 700;
     }
@@ -405,6 +412,6 @@ export default {
   .footer;
 }
 .nofoot{
-  background:#CACCFF;
+  background:#CACCFF!important;
 }
 </style>

BIN
src/images/addimg.png


BIN
src/images/closeimg.png


BIN
src/images/icon_close@2x.png


BIN
src/images/iptdis.png


BIN
src/images/iptselect.png


BIN
src/images/person.png


BIN
src/images/slideT.png


BIN
src/images/topContent.png


+ 53 - 13
src/less/base.less

@@ -3,10 +3,13 @@
 // @theme-color:#4F50FF;
 // 命名空间和访问符,映射
 #colors(){
-  theme:#4F50FF; //主题色,选中色
+  theme:#6678FF; //主题色,选中色
   text:#7C828E; //患者信息及选项文字颜色
   quest:#000000; //问题颜色
   exclu:#e6e7e9; //互斥文字颜色
+  btn:#6678FF;//按钮颜色
+  line:#E6E6E6;//按钮颜色
+  bgques:#F9F9F9;//问题背景颜色
 }
 .mask{
   width:100%;
@@ -18,16 +21,23 @@
 }
 .footer{
   width:100%;
-  height: .88rem;
-  line-height: .88rem;
   text-align: center;
-  color:#fff;
-  font-size: .32rem;
-  background: linear-gradient(-270deg, #4F4FFF,#4F8BFF);
   position: fixed;
   bottom: 0;
   left: 0;
   z-index: 998;
+  padding: .22rem .3rem .18rem .3rem;
+  box-sizing: border-box;
+  box-shadow:0px -2px 10px 0px rgba(0,0,0,0.06);
+  font-size: .32rem;
+  background-color: #fff;
+  .nextBtn {
+    color:#fff;
+    height: .88rem;
+    line-height: .88rem;
+    background: #colors[btn];
+    border-radius: 5px;
+  }
 }
 .dbfooter{
   width:100%;
@@ -35,8 +45,11 @@
   position: fixed;
   bottom: 0;
   left: 0;
-  background: #e5ecfc;
+  background: #fff;
   z-index: 66;
+  padding: .22rem .3rem .18rem .3rem;
+  box-sizing: border-box;
+  box-shadow:0px -2px 10px 0px rgba(0,0,0,0.06);
   display: flex;
   justify-content: space-between;
   .back,.next{
@@ -45,15 +58,18 @@
     line-height: .88rem;
     text-align: center;
     vertical-align: top;
+    border: 1px solid #colors[theme];  
+    box-sizing: border-box;
+    border-radius: 5px;
   }
   .back{
-    width: 40%;
-    color: #0043E8;
+    width: 48%;
+    color: #colors[theme];
   }
   .next{
-    width: 58%;
+    width: 48%;
     color: #fff;
-    background: linear-gradient(-270deg, #4F4FFF,#4F8BFF);
+    background: #colors[theme];
   }
 }
 .over{
@@ -89,7 +105,7 @@
 }
 
 .result{
-  padding-right: .3rem;
+  // padding-right: .3rem;
   .title{
     // color: #4F50FF;
     // color: #colors[theme];
@@ -102,6 +118,11 @@
     color: #666;
     line-height: .44rem;
   }
+  .bgResult {
+    background-color: #F5F5F5;
+    padding: .24rem;
+    border-radius: 5px;
+  }
 }
 
 .btscroll {
@@ -114,11 +135,30 @@
   z-index: 99;
   box-sizing: border-box;
   .content {
-    padding-bottom: 2.3rem;
+    padding-bottom: 3rem;
     box-sizing: border-box;
   }
 }
 
 .toastWrapper {
   background-color: #colors[quest];
+}
+.bgques {//问题内容
+  padding: .24rem .3rem .2rem .3rem;
+  // display: none;
+}
+.pubques {//问题题目
+  font-size: .32rem;
+  // font-weight: 800;
+  padding: .4rem 0.5rem .4rem .3rem;
+  word-break: break-all;
+  background-color: #fff;
+  box-shadow:0px 2px 8px 0px rgba(0,0,0,0.07);
+}
+
+.displayBlock {
+  display: block !important;
+}
+.displayNone {
+  display: none !important;
 }

+ 1 - 1
src/less/index.less

@@ -3,7 +3,7 @@ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, input, textarea, p, t
   margin: 0;
   padding: 0;
   font-family: Arial, sans-serif, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB";
-  color: #323232;
+  color: #333333;
   // -webkit-text-size-adjust:100%;
   -webkit-text-size-adjust:auto;
   -webkit-tap-highlight-color: rgba(0,0,0,0);

+ 4 - 2
src/utils/tools.js

@@ -1,7 +1,8 @@
 
 const qs = require('qs');
 const $ = require('jquery');
-const imageUrlPrefix = 'http://192.168.2.241:82' //后台图片地址
+// const imageUrlPrefix = 'http://192.168.2.241:82' //后台图片地址
+const imageUrlPrefix = 'http://192.168.2.121:82' //后台图片地址
 // const imageUrlPrefix = 'http://192.168.2.236:82' //后台图片地址
 
 const getUrlArgObject = (parm) => {
@@ -327,7 +328,7 @@ function setScroll(scroll,flg,wrapper){
       click: true,
       tap: true,
       probeType:3,
-      // bounceTime:800,
+      bounceTime:800,
       momentumLimitTime:300,//只有在屏幕上快速滑动的时间小于 momentumLimitTime,才能开启 momentum 动画。
       momentumLimitDistance:15,//只有在屏幕上快速滑动的距离大于 momentumLimitDistance,才能开启 momentum 动画。
       swipeTime:500,//设置 momentum 动画的动画时长
@@ -378,6 +379,7 @@ const getNum = () => {
   return num;
 }
 
+
 module.exports =  {
   imageUrlPrefix,
   getUrlArgObject,