Browse Source

合并new-ll分支,并调整有无顺序
Squashed commit of the following:

commit d7f51c272fad2159daa31c4a62d2a3fb5682e415
Author: luolei <16657115156@163.com>
Date: Tue Aug 20 20:35:26 2019 +0800

登陆页面交互

commit 79d7c94366e91217d1296bc3a8e56289f0379f3b
Author: luolei <16657115156@163.com>
Date: Tue Aug 20 14:10:42 2019 +0800

搜索bug

commit 14ce22ada5450c47bf78cf72629414d7f17de07f
Author: luolei <16657115156@163.com>
Date: Tue Aug 20 13:39:07 2019 +0800

保存数据处理

commit 2e4aee967bb3fda1e3eeff68420c772f2370edaf
Author: luolei <123>
Date: Mon Aug 19 20:31:22 2019 +0800

数据拼接

commit f9b280f18843b591e6c86ab1c97c338b6e97cb91
Author: luolei <123>
Date: Mon Aug 19 20:08:45 2019 +0800

保存数据处理

commit e12cfa78bcb3d89d43f3d983e6fb7da124a10ca6
Merge: 0bbaa8b 760b29d
Author: luolei <123>
Date: Mon Aug 19 19:08:56 2019 +0800

Merge branch 'new' into new_ll

commit 0bbaa8bca94ed0ec92334ba813815090b0aa0113
Author: luolei <123>
Date: Mon Aug 19 19:08:11 2019 +0800

1

commit 8d30cdc1def7efb06843b40711bbe19b26218229
Merge: 0545b65 4f63b17
Author: luolei <123>
Date: Mon Aug 19 18:56:53 2019 +0800

Merge branch 'btscroll' into new_ll

commit 0545b6511d6895270331c0d19d2ec1dd68fa46ef
Author: luolei <123>
Date: Mon Aug 19 18:56:21 2019 +0800

1

commit bf959bf4ba7864602116dec4a2e26ef8bff2272c
Author: snafm0 <900328>
Date: Mon Aug 19 18:39:55 2019 +0800

peizhi

commit 4f63b17c3482a31e940a881298414d2b0b9d825f
Author: snafm0 <900328>
Date: Mon Aug 19 17:44:40 2019 +0800

图片保存多了一层

commit 3087c7577567f23f3be9d9514200abd7d2f57730
Author: snafm0 <900328>
Date: Mon Aug 19 15:25:14 2019 +0800

提交新建文件

commit 163434fb13c53f7f5d3b0e1b1fee8846fd866750
Author: snafm0 <900328>
Date: Mon Aug 19 11:12:08 2019 +0800

多列填写bug修改

liucf 6 years ago
parent
commit
7ea1a2fe99

+ 18 - 43
package-lock.json

@@ -281,8 +281,7 @@
     "assert-plus": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
-      "optional": true
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
     },
     "assign-symbols": {
       "version": "1.0.0",
@@ -2082,7 +2081,6 @@
       "version": "1.0.8",
       "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
       "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
-      "optional": true,
       "requires": {
         "delayed-stream": "~1.0.0"
       }
@@ -3409,8 +3407,7 @@
     "delayed-stream": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
-      "optional": true
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
     },
     "depd": {
       "version": "1.1.2",
@@ -4141,8 +4138,7 @@
     "extsprintf": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
-      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
-      "optional": true
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
     },
     "fast-deep-equal": {
       "version": "2.0.1",
@@ -4518,8 +4514,7 @@
         },
         "ansi-regex": {
           "version": "2.1.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -4537,13 +4532,11 @@
         },
         "balanced-match": {
           "version": "1.0.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -4556,18 +4549,15 @@
         },
         "code-point-at": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "concat-map": {
           "version": "0.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "console-control-strings": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -4670,8 +4660,7 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "ini": {
           "version": "1.3.5",
@@ -4681,7 +4670,6 @@
         "is-fullwidth-code-point": {
           "version": "1.0.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -4694,20 +4682,17 @@
         "minimatch": {
           "version": "3.0.4",
           "bundled": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
         },
         "minimist": {
           "version": "0.0.8",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "minipass": {
           "version": "2.3.5",
           "bundled": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.2",
             "yallist": "^3.0.0"
@@ -4724,7 +4709,6 @@
         "mkdirp": {
           "version": "0.5.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -4797,8 +4781,7 @@
         },
         "number-is-nan": {
           "version": "1.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -4808,7 +4791,6 @@
         "once": {
           "version": "1.4.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -4884,8 +4866,7 @@
         },
         "safe-buffer": {
           "version": "5.1.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -4915,7 +4896,6 @@
         "string-width": {
           "version": "1.0.2",
           "bundled": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -4933,7 +4913,6 @@
         "strip-ansi": {
           "version": "3.0.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -4972,13 +4951,11 @@
         },
         "wrappy": {
           "version": "1.0.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "yallist": {
           "version": "3.0.3",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         }
       }
     },
@@ -5868,8 +5845,7 @@
     "jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
-      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
-      "optional": true
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
     },
     "json-loader": {
       "version": "0.5.7",
@@ -7218,8 +7194,8 @@
     },
     "portal-vue": {
       "version": "2.1.6",
-      "resolved": "https://registry.npmjs.org/portal-vue/-/portal-vue-2.1.6.tgz",
-      "integrity": "sha512-lvCF85D4e8whd0nN32D8FqKwwkk7nYUI3Ku8UAEx4Z1reomu75dv5evRUTZNaj1EalxxWNXiNl0EHRq36fG8WA=="
+      "resolved": "https://registry.npm.taobao.org/portal-vue/download/portal-vue-2.1.6.tgz",
+      "integrity": "sha1-p9R5CxSnmvf9FZpg7IjDDN3Gxjk="
     },
     "portfinder": {
       "version": "1.0.20",
@@ -11026,8 +11002,7 @@
     "tweetnacl": {
       "version": "0.14.5",
       "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
-      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
-      "optional": true
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
     },
     "type": {
       "version": "1.0.1",

+ 6 - 4
src/common/MultiLineInput.vue

@@ -9,17 +9,19 @@
               :type="content.type=='number'?'tel':'text'" 
               :style="{'width':1/content.iptLis.length*100-3+'%'}" 
               :key="item.placeholder+idx" 
-              v-model="txt"
+              v-model="item.value"
               :placeholder="item.placeholder"
               @input="changeVal($event,idx,content.type)" 
               @blur="blur"
+              :maxlength="content.type=='number'?10:''"
               @click="handleClick">
             <input v-show="content.iptLis.length==1" class="contentVal" 
               :type="content.type=='number'?'tel':'text'" 
               :placeholder="content.placeholder" 
-              v-model="txt" 
+              v-model="item.value"
               @input="changeVal($event,idx,content.type)" 
               @blur="blur"
+              :maxlength="content.type=='number'?10:''"
               @click="handleClick">
             <span v-if="idx == 0&&content.iptLis.length>1">/</span>
           </template>
@@ -76,7 +78,6 @@ export default {
       this.txt = tmpTxt
       this.content = getModelExpStr(this.msg,this.txt)
       // this.$emit('changeMultipVal',e.currentTarget.value,num)
-      
       const select = this.part.select;
       // if(!select){return}
       const newData = Object.assign({},this.part,{value:this.txt,controlType:3,valueP:this.txt});
@@ -84,7 +85,7 @@ export default {
       this.$emit('handleInp',this.txt);
     },
     blur(){
-      // 如果该项未选中,则不存值           
+      // 如果该项未选中,则不存值
       document.activeElement.scrollIntoViewIfNeeded(true);
       setTimeout(()=>{
         document.activeElement.scrollIntoViewIfNeeded(true);
@@ -100,6 +101,7 @@ export default {
       part:{//清空时更新
         handler(newVal,oldVal){
           this.txt = newVal.value;
+          this.content = getModelExpStr(this.msg,this.txt)
         },
         deep:true
       }

+ 107 - 0
src/common/RadioSelect.vue

@@ -0,0 +1,107 @@
+<template>
+  <div class="radio-wrap radioSelect" v-if="item">
+    <p v-for="(it,index) in datas.questionDetailList" :key="it.id" class="list">
+      <img @click="handleClick(it,index,true,1)" :src="it.select==1?check:defaultPic"> 有&nbsp;&nbsp;&nbsp;&nbsp;
+      <img @click="handleClick(it,index,true,2)" :src="it.select==2?check:defaultPic"> 无
+      <span v-if="((it.description||it.name).indexOf('${'))==-1" :class="{'check':it.select==1||it.select==2}">{{it.description||it.name}}</span>
+    </p>
+  </div>
+</template>
+<script type="text/javascript">
+import icon from '../images/radio-default.png'
+import checkIcon from '../images/radio-check.png'
+import {patt,imageUrlPrefix,concatVal} from '@utils/tools.js'
+import MultiLineInput from '../common/MultiLineInput.vue';
+import OptionInp from '../common/OptionInp.vue';
+  export default{
+    name:'RadioSelect',
+    data(){
+      return{
+        defaultPic:icon,
+        check:checkIcon,
+        datas:{},
+        imgUrl:imageUrlPrefix,
+      }
+    },
+    props:['item'],
+    created(){
+      // this.datas = JSON.parse(JSON.stringify(this.item));
+      this.datas = this.item;
+    },
+    methods:{
+      handleClick(it,index,flg,isHas){
+        if(flg){
+          document.activeElement.blur();      
+          document.activeElement.scrollIntoViewIfNeeded(true);
+          setTimeout(()=>{
+            document.activeElement.scrollIntoViewIfNeeded(true);
+          },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 = isHas;
+            data[i].controlType = 8;
+          }
+        }
+        let temp = concatVal(data);
+        const newData = Object.assign({},this.datas,{questionDetailList:data,value:temp.value,valueP:temp.valueP})
+        this.$emit("updata",newData);
+      },
+      inpVal(val,index){//输入框失焦处理  
+        // 输入框回读
+        let detailList = this.datas.questionDetailList;
+        let currItem = detailList[index];
+        currItem.value = val; 
+        // 输入框失焦重新拼接父级的value
+        let temp = concatVal(detailList);
+        this.datas.value = temp.value;
+        this.datas.valueP = temp.valueP;
+        this.$emit("updata",this.datas);
+      },
+      /*inpSele(index){//输入框反选
+        let detailList = this.datas.questionDetailList;console.log("单选:",index,detailList[index])
+        detailList[index].select = 1;
+      }*/
+    },
+    watch:{
+      item:{
+        handler(newVal,oldVal){
+          this.datas = JSON.parse(JSON.stringify(newVal));
+        },
+        deep:true
+      }
+    },
+    components:{
+      MultiLineInput,
+      OptionInp
+    }
+  }
+</script>
+<style lang="less" scoped>
+  .radio-wrap{
+    img{
+      width:100%;
+    }
+    .list{
+      color: #7C828E;
+      margin:0 .1rem .1rem 0;
+      padding: .12rem .1rem;
+      white-space: nowrap;
+      -webkit-white-space: nowrap;
+      // -webkit-box-orient: vertical;
+      span {
+          margin-left:1.2rem;
+      }
+      img{
+        width: .38rem;
+        vertical-align: middle;
+      }
+      .check{
+        color: #4F50FF;
+      }
+    }
+  }
+</style>

+ 102 - 0
src/components/Department.vue

@@ -0,0 +1,102 @@
+<template>
+    <div class="department">
+        <div class="departmentView">
+            <div class="content">
+                <div class="list" @click="goStart">
+                    <div class="top">
+                        <p>挂号科室:急诊科 <img src="../images/right.png" alt=""></p>
+                    </div>
+                    <div class="main">
+                        <p>预约时间:2019-8-18 14:00</p>
+                        <p>病历号:1234567</p>
+                        <p>挂号信息:1234567</p>
+                    </div>
+                </div>
+                <div class="list">
+                    <div class="top">
+                        <p>挂号科室:急诊科 <img src="../images/right.png" alt=""></p>
+                    </div>
+                    <div class="main">
+                        <p>预约时间:2019-8-18 14:00</p>
+                        <p>病历号:1234567</p>
+                        <p>挂号信息:1234567</p>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+  import {setScroll} from '@utils/tools.js';
+  import BScroll from 'better-scroll';
+    export default {
+        name: "Department",
+        data(){
+            return {
+                scroll:null
+            }
+        },
+        mounted(){
+            this.$nextTick(()=>{
+                let scroll = setScroll(BScroll,true,'.departmentView')
+                this.scroll = scroll
+            })
+        },
+        methods:{
+            goStart(){
+                this.$router.replace({path:'/'})
+            }
+        }
+    }
+</script>
+<style lang="less" scoped>
+    .department {
+        font-size: .3rem;
+        padding: .3rem 0 1rem 0;
+        .departmentView {
+            position: absolute;
+            width: 100%;
+            height: 100%;
+            overflow: hidden;
+            padding: 0 .3rem 1rem .3rem;
+            box-sizing: border-box;
+            .content {
+                padding-bottom: 1rem;
+            }
+            .list {
+                height:3rem;
+                background:rgba(255,255,255,1);
+                box-shadow:0px 3px 15px 0px rgba(217,217,217,0.5);
+                border-radius:.1rem;
+                overflow: hidden;
+                margin-bottom: .3rem;
+            }
+            .top {
+                height: 1rem;
+                line-height: 1rem;
+                background: url('../images/bg-title.png') 100% 100% no-repeat;
+                padding: 0 .3rem;
+                box-sizing: border-box;
+                p {
+                    position: relative;
+                    color: #fff;
+                    img {
+                        position: absolute;
+                        right: 0;
+                        top: 50%;
+                        width: .4rem;
+                        height: .4rem;
+                        margin-top: -0.2rem;
+                    }
+                }
+            }
+            .main {
+                font-size: .28rem;
+                padding: .3rem;
+                p {
+                    line-height: .5rem;
+                }
+            }
+        }
+    }
+</style>

+ 7 - 1
src/components/Detail.vue

@@ -8,6 +8,10 @@
             :item="item"
             :key="item.id"
             @updata="updataData"/>
+      <RadioSelect v-if="item.controlType==8" 
+            :item="item"
+            :key="item.id"
+            @updata="updataData"/>
       <CheckBox v-if="item.controlType==2" 
             :item="item"
             :key="item.id"
@@ -40,6 +44,7 @@ import Radio from '../common/Radio.vue';
 import CheckBox from '../common/CheckBox.vue';
 import Input from '../common/Input.vue';
 import ComTextArea from '../common/ComTextArea.vue';
+import RadioSelect from '../common/RadioSelect.vue';
 import MultiLineInput from '../common/MultiLineInput.vue';
 import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
 // 将获取到的数据源转换成私有数据,处理选择事件。点击完成后统一存到store中,便于回读
@@ -60,7 +65,8 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
       CheckBox,
       Input,
       ComTextArea,
-      MultiLineInput
+      MultiLineInput,
+      RadioSelect
     },
     methods:{
       updataData(data,item){

+ 1 - 0
src/components/DetailBox.vue

@@ -113,6 +113,7 @@
       //必填项都填完了才可以点完成
         if(this.reqFinish){
           this.$refs.detail.saveData();
+          this.$store.commit('setSearchShow', false);
           // this.$emit("pComplete");
           // this.$store.commit('setDetail',{detail:{}})
         }

+ 1 - 1
src/components/DiagTreat.vue

@@ -129,7 +129,7 @@
             msg += textArr[k].textP + ','
           }
         }    
-        return trimDots(msg);
+        return trimDots(msg.substring(0,msg.length-1));
       },
       updataData(data,id,order,index){//输入框存值
         let list = this.dtoList;

+ 201 - 0
src/components/Login.vue

@@ -0,0 +1,201 @@
+<template>
+    <div class="login">
+        <div class="top">
+            <div class="img"><img src="../images/check.png" alt=""></div>
+            <h4>欢迎使用智能预问诊</h4>
+        </div>
+        <div class="main">
+            <div class="iptWrap choose">
+                <p @click="handleShow">{{name}} <img src="../images/down.png" /></p>
+                <div class="slideType" v-if="show">
+                    <ul>
+                        <li @click="handleType('手机号',1)">手机号</li>
+                        <li @click="handleType('身份证号',2)">身份证号</li>
+                        <li @click="handleType('病历号',3)">病历号</li>
+                        <li @click="handleType('市民卡号',4)" style="border:0 none">市民卡号</li>
+                    </ul>
+                </div>
+            </div>
+            <div class="iptWrap number">
+                <input @blur="blur" :maxlength="type==1?11:type==2?18:type==3?7:type==4?9:30" v-model="value" @input="changeVal" :type="type!=2?'tel':'text'" class="input" type="text" :placeholder="'请输入'+name" >
+            </div>
+            <div :class="['btn',value?'btnClick':'btnDis']" @click="handleDepart">进入预问诊</div>
+        </div>
+        <div class="tip">
+            注:建议您可先输入病情情况,方便医生提前了解情况
+        </div>
+    </div>
+</template>
+<script>
+    import {phoneTest,identify} from '@utils/tools.js';
+    export default {
+        name: "Login",
+        data(){
+            return {
+                show:false,
+                type:'1',
+                name:'手机号',
+                value:''
+            }
+        },
+        methods:{
+            handleType(name,type){
+                let tmpType=this.type
+                if(tmpType != type){
+                    this.name = name
+                    this.type = type
+                    this.value = ''
+                }
+                this.show = false
+            },
+            handleShow(){
+                const {show} = this
+                this.show = !show
+            },
+            blur(){        
+                document.activeElement.scrollIntoViewIfNeeded(true);
+                setTimeout(()=>{
+                    document.activeElement.scrollIntoViewIfNeeded(true);
+                },300)
+            },
+            changeVal(){
+                document.activeElement.scrollIntoViewIfNeeded(true);
+                if(this.type != 2){
+                    this.value=this.value.replace(/[^\d]/g,'')
+                }
+            },
+            handleDepart(){
+                const {type,value} = this
+                if(type == 1){
+                    console.log(phoneTest.test(value))
+                    if(!phoneTest.test(value)){//验证不通过
+
+                    }
+                }else if(type == 2){
+
+                }else if(type == 3){
+
+                }else if(type == 4){
+
+                }
+                if(value){
+                    this.$router.replace({path:'/department'})
+                }
+            }
+        }
+    }
+</script>
+<style lang="less" scoped>
+    .login {
+        height: 100%;
+        width: 100%;
+        position: fixed;
+        background:linear-gradient(180deg,rgba(79,79,255,1) 0%,rgba(79,137,255,1) 100%);
+        padding: .3rem .6rem;
+        box-sizing: border-box;
+        .top {
+            .img {
+                width: 1.6rem;
+                height: 1.6rem;
+                background-color: red;
+                margin: 1rem auto 0 auto;
+                img {
+                    width: 100%;
+                }
+            }
+            h4 {
+                font-size: .42rem;
+                text-align: center;
+                color: #fff;
+                margin-top: 0.5rem;
+                margin-bottom: .8rem;
+                font-weight: normal;
+            }
+        }
+        .main {
+            width:100%;
+            height:5.34rem;
+            background:#fff;
+            border-radius:.2rem;
+            padding: .8rem .6rem;
+            box-sizing: border-box;
+            font-size: .3rem;
+            .iptWrap {
+                width:100%;
+                height:.88rem;
+                background:rgba(242,242,245,1);
+                border-radius:.1rem;
+                padding: .23rem .3rem;
+                box-sizing: border-box;
+            }
+            .choose {
+                position: relative;
+                p {
+                    width: 100%;
+                    position: relative;
+                    img {
+                        position: absolute;
+                        right: 0;
+                        top: 0;
+                        width: .4rem;
+                        height: .4rem;
+                    }
+                }
+                .slideType {
+                    box-sizing: border-box;
+                    position: absolute;
+                    z-index: 10;
+                    width: 100%;
+                    top: 0.88rem;
+                    left: 0;
+                    box-shadow:0px 4px 20px 0px rgba(102,102,102,0.18);
+                    border-radius:.1rem;
+                    background-color: #fff;
+                    padding: .1rem .3rem 0 .3rem;
+                    box-sizing: border-box;
+                    font-size: .28rem;
+                    li {
+                        border-bottom: 1px solid #F5F5F5;
+                        height: .6rem;
+                        line-height: .6rem;
+                        box-sizing: border-box;
+                    }
+                }
+            }
+            
+            .number {
+                margin: .3rem 0 .8rem 0;
+                .input{
+                    float: left;
+                    color:rgba(51,51,51,1);
+                    height:.42rem;
+                    line-height:.42rem;
+                    width: 100%;
+                    background-color: transparent;
+                }
+            }
+            .btn {
+                width:100%;
+                height:.88rem;
+                line-height:.88rem;
+                text-align: center;
+                background:linear-gradient(270deg,rgba(79,139,255,1) 0%,rgba(79,79,255,1) 100%);
+                border-radius:.44rem;
+                color: #fff;
+                font-size: .32rem;
+                font-weight: 500;
+            }
+            .btnDis {
+                opacity: 0.3;
+            }
+            .btnClick {
+                opacity:1;
+            }
+        }
+        .tip {
+            color: #fff;
+            font-size: .24rem;
+            margin-top: .6rem;
+        }
+    }
+</style>

+ 1 - 1
src/components/Others.vue

@@ -158,7 +158,7 @@
             msg += textArr[k].textP + ','
           }
         }    
-        return trimDots(msg);
+        return trimDots(msg.substring(0,msg.length-1));
       }
     },
     components:{

+ 39 - 23
src/components/Preview.vue

@@ -183,14 +183,12 @@ export default {
           }else if(textArr[k].textP){
             msg += textArr[k].textP + ','
           }
-          
         }
       }    
       return trimDots(msg);
     },
     handleClick(flg){
       this.showDoc = flg
-      // this.scroll = setScroll(BScroll,!flg,'.previewper')
     },
     showSubmit(flg) {
       this.submit = flg
@@ -226,11 +224,12 @@ export default {
         }
         // return
         api.uploadImageThums(formData).then((res) => {//获取图片
-          let result = res.data;
-          if (result.code == 0) {//图片提交成功再保存数据
+          let data = res.data;
+          if (data.code == 0) {//图片提交成功再保存数据
             // this.showType = 'success'
             // this.submit = true
-            let reportList = []
+            let reportList = [];
+            let result = data.data;
             for(let i = 0;i < result.length;i++){
               let obg = {}
               obg.narrowImage = result[i].thumbnail.url
@@ -256,7 +255,7 @@ export default {
         return;
       } else {//没有图片直接保存数据
         this.$store.commit('handleToggleShow', true);
-        this.saveAllDate()
+        this.saveAllDate();
       }
     },
     getStr(arr,flg){
@@ -272,24 +271,41 @@ export default {
     },
     saveAllDate() {
       const {pathInfo,symptom,diagnose,others,addContent} = this
-      let detailList = []
-      if(symptom.text.length>0){
-        detailList.push(this.getStr(symptom.text,1))
-      }
-      if(diagnose.text.length>0){
-        detailList.push(this.getStr(diagnose.text,2))
-      }
-      if(others.text.length>0){
-        let obg = {}
-        detailList.push(this.getStr(others.text,3))
-      }
-      if(addContent.txt){
-        let obg = {}
-        obg.content=addContent.txtDoc
-        obg.contentValue=addContent.txt
-        obg.type=4
-        detailList.push(obg)
+      let detailList = [{type:1},{type:2},{type:3},{type:4}]
+      for(let i = 0;i < detailList.length;i++){
+        if(i == 0){
+          detailList[0]=this.getStr(symptom.text,1)
+        }else if(i == 1){
+          let tmpArr = []
+          for(let j = 0;j < symptom.text.length;j++){
+            tmpArr.push(symptom.text[j].textP)
+          }
+          detailList[1].content=JSON.stringify(tmpArr)
+          detailList[1].contentValue=tmpArr.join()
+        }else if(i == 2){
+          detailList[2] = this.getStr(others.text,3)
+        }else if(i == 3){
+          detailList[3].content=addContent.txtDoc
+          detailList[3].contentValue=addContent.txt
+        }
       }
+      // // if(symptom.text.length>0){
+      //   detailList[0]=this.getStr(symptom.text,1)
+      // // }
+      // if(diagnose.text.length>0){
+      //   detailList.push(this.getStr(diagnose.text,2))
+      // }
+      // if(others.text.length>0){
+      //   let obg = {}
+      //   detailList[2] = this.getStr(others.text,3)
+      // }
+      // if(addContent.txt){
+      //   let obg = {}
+      //   obg.content=addContent.txtDoc
+      //   obg.contentValue=addContent.txt
+      //   obg.type=4
+      //   detailList.push(obg)
+      // }
       let params = {
         "dataJson": "1",
         "detailList": detailList,

+ 5 - 6
src/components/Symptom.vue

@@ -61,7 +61,7 @@
       @cancel="cancelDel"
     />
     <Search
-      v-if="searchShow"
+      v-if="this.$store.state.searchShow"
       @search="search"
       @showDetil="showDetil"
       :age="age"
@@ -83,7 +83,7 @@ export default {
   name: 'Symptom',
   props:['modluesLen','nameStr'],
   data() {
-    let { datas, pathInfo } = this.$store.state;
+    let { datas, pathInfo,searchShow } = this.$store.state;
     const { choose, text } = this.$store.state.symptom;
     return {
       age: pathInfo.patientAge,
@@ -99,7 +99,7 @@ export default {
       delText: "是否删除该信息?<br/>(已填内容将清除)",
       delIndex: null,
       showToast: false,
-      searchShow: false,//显示搜索界面
+      searchShow: searchShow,//显示搜索界面
       tmpItem:{},//检索的症状
       isSearch:false,
       scroll:null,
@@ -159,7 +159,7 @@ export default {
       console.log(val)
     },
     search(flg) {
-      this.searchShow = flg
+      this.$store.commit('setSearchShow', flg);
     },
 
     getSympList() {
@@ -185,7 +185,6 @@ export default {
       }else{
         this.$emit('next');
       }
-
     },
     showDetil(item,flg) {
       clearTimeout(this.timer);
@@ -222,7 +221,7 @@ export default {
               this.chooseSymp.push(item);
             } else { 
               this.chooseSymp.push(item);
-              this.searchShow = false
+              this.$store.commit('setSearchShow', false);
             }
           }
         })

BIN
src/images/bg-title.png


BIN
src/images/down.png


BIN
src/images/icon-go.png


BIN
src/images/icon_close.png


BIN
src/images/right .png


BIN
src/images/right.png


BIN
src/images/切图_slices/bg-title.png


BIN
src/images/切图_slices/bg-title@2x.png


BIN
src/images/切图_slices/icon-go.png


BIN
src/images/切图_slices/icon-go@2x.png


BIN
src/images/切图_slices/icon_close.png


BIN
src/images/切图_slices/icon_close@2x.png


+ 2 - 1
src/less/index.less

@@ -66,7 +66,8 @@ html,body{
   // height: auto;
   // overflow-y: auto;
   height: 100%;
-  position: absoult;
+  position: absolute;
+  overflow: hidden;
 }
 html{
   margin: 0;

+ 12 - 0
src/router/index.js

@@ -2,6 +2,8 @@ import Vue from 'vue';
 import Router from 'vue-router';
 import PathInfo from '@components/PathInfo.vue';
 import TabPage from '@components/TabPage.vue';
+import Login from '@components/Login.vue';
+import Department from '@components/Department.vue';
 Vue.use(Router);
 const router = new Router({
   routes:[
@@ -14,6 +16,16 @@ const router = new Router({
       path:'/tab',
       name:'TabPage',
       component:TabPage
+    },
+    {
+      path:'/login',
+      name:'Login',
+      component:Login
+    },
+    {
+      path:'/department',
+      name:'Department',
+      component:Department
     }
   ]
 })

+ 4 - 0
src/store.js

@@ -5,6 +5,7 @@ Vue.use(Vuex);
 
 const store = new Vuex.Store({
   state:{
+    searchShow:false,
     pathInfo:{}, //患者信息-后续提交要用
     sysConfig:[], //系统配置项
     allMoudles:[], //模板
@@ -74,6 +75,9 @@ const store = new Vuex.Store({
         state.detailShow = true;
       }
     },
+    setSearchShow(state,flg){//搜索显示与否
+      state.searchShow = flg;
+    },
     setDataAll(state,param){
       let res = state.allMoudles
       for(let i = 0;i<res.length;i++){

+ 32 - 4
src/utils/tools.js

@@ -107,6 +107,11 @@ const getModelExpStr = (str,txt,des) =>{
 
 // 替换输入框占位符
 const patt = /\$\{[^\]]+\}/g;
+// 手机号验证
+const phoneTest = /^[1]([3-9])[0-9]{9}$/;
+//身份证验证
+const identify =/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/;
+
 
 const getAllStr = (allData) =>{//获取界面数据,拼接字符串
   // console.log(allData,777777)
@@ -248,18 +253,39 @@ function trimDots(str){
 
 // 拼值,并去掉占位符
 function concatVal(data){
+  // console.log(data,111)
   let value = ""; //医生
   let valueP = ""; //患者
+  // 有无类型
+  let tmpStrHas = '';
+  let tmpStrHasP = '';
+  let tmpStrNo = '';
+  let tmpStrNoP = '';
   for(let k in data){
-    if(data[k].select==1){
+    if(data[k].select){
       if(data[k].value){
         let str = data[k].name.replace(patt,data[k].value);
         let strP = (data[k].description || data[k].name).replace(patt,data[k].value);
         value += str + ',';
         valueP += strP + ',';
       }else{
-        value += data[k].name.replace(patt,'') + ',';
-        valueP += (data[k].description || data[k].name).replace(patt,'') + ',';
+        if(data[k].controlType==8){
+          // let tmpStr = data[k].select==1?'有':'无';
+          if(data[k].select==1){
+            tmpStrHas += '有'+data[k].name+ ',';
+            tmpStrHasP += '有'+(data[k].description || data[k].name)+ ',';
+          }else{
+            tmpStrNo += '无'+data[k].name+ ',';
+            tmpStrNoP += '无'+(data[k].description || data[k].name)+ ',';
+          }
+          // value += tmpStr+data[k].name.replace(patt,'') + ',';
+          // valueP += tmpStr+(data[k].description || data[k].name).replace(patt,'') + ',';
+          value = tmpStrHas + tmpStrNo;
+          valueP = tmpStrHasP + tmpStrNoP;
+        }else{
+          value += data[k].name.replace(patt,'') + ',';
+          valueP += (data[k].description || data[k].name).replace(patt,'') + ',';
+        }
       }
     }
   }
@@ -293,7 +319,9 @@ module.exports =  {
   trimDots,
   concatVal,
   setScroll,
-  isWX
+  isWX,
+  phoneTest,
+  identify
 }