Explorar el Código

Merge remote-tracking branch 'origin/master' into referMaster

zhouna hace 5 años
padre
commit
e931043753

+ 4 - 1
.babelrc

@@ -8,5 +8,8 @@
     }],
     "stage-2"
   ],
-  "plugins": ["transform-vue-jsx", "transform-runtime"]
+  "plugins": [
+    "transform-vue-jsx", 
+    "transform-runtime"
+  ]
 }

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

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

+ 2 - 2
config/index.js

@@ -4,8 +4,8 @@
 
 const path = require('path')
 // const proxy_path = 'http://192.168.2.236:80';
-// const proxy_path = 'http://192.168.2.236:5050';
-const proxy_path = 'http://192.168.2.241:5050';
+const proxy_path = 'http://192.168.2.121:5050';
+// const proxy_path = 'http://192.168.2.241:5050';
 
 module.exports = {
   dev: {

+ 86 - 20
package-lock.json

@@ -4,12 +4,37 @@
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
+    "@babel/runtime": {
+      "version": "7.6.3",
+      "resolved": "https://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.6.3.tgz",
+      "integrity": "sha1-k1Eix0xz0iQMr9Mt21/Cps01zx8=",
+      "requires": {
+        "regenerator-runtime": "^0.13.2"
+      },
+      "dependencies": {
+        "regenerator-runtime": {
+          "version": "0.13.3",
+          "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.3.tgz",
+          "integrity": "sha1-fPanfY9cb2Drc8X8GVWyzrAea/U="
+        }
+      }
+    },
     "@types/q": {
       "version": "1.5.2",
       "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz",
       "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==",
       "dev": true
     },
+    "@vant/icons": {
+      "version": "1.1.15",
+      "resolved": "https://registry.npm.taobao.org/@vant/icons/download/@vant/icons-1.1.15.tgz?cache=0&sync_timestamp=1571923117293&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vant%2Ficons%2Fdownload%2F%40vant%2Ficons-1.1.15.tgz",
+      "integrity": "sha1-U8UaziHpmSv+6y4a2QlPv2UG0RY="
+    },
+    "@vue/babel-helper-vue-jsx-merge-props": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.0.0.tgz",
+      "integrity": "sha1-BI/leZWNpAj7eosqPsBQtQpmEEA="
+    },
     "accepts": {
       "version": "1.3.7",
       "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@@ -281,7 +306,8 @@
     "assert-plus": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+      "optional": true
     },
     "assign-symbols": {
       "version": "1.0.0",
@@ -2081,6 +2107,7 @@
       "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"
       }
@@ -3407,7 +3434,8 @@
     "delayed-stream": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+      "optional": true
     },
     "depd": {
       "version": "1.1.2",
@@ -4138,7 +4166,8 @@
     "extsprintf": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
-      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+      "optional": true
     },
     "fast-deep-equal": {
       "version": "2.0.1",
@@ -4499,8 +4528,8 @@
     },
     "fsevents": {
       "version": "1.2.9",
-      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
-      "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==",
+      "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.9.tgz",
+      "integrity": "sha1-P17WZYPM1vQAtaANtvfoYTY+OI8=",
       "optional": true,
       "requires": {
         "nan": "^2.12.1",
@@ -4514,7 +4543,8 @@
         },
         "ansi-regex": {
           "version": "2.1.1",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -4532,11 +4562,13 @@
         },
         "balanced-match": {
           "version": "1.0.0",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
+          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -4549,15 +4581,18 @@
         },
         "code-point-at": {
           "version": "1.1.0",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "concat-map": {
           "version": "0.0.1",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "console-control-strings": {
           "version": "1.1.0",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -4660,7 +4695,8 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "ini": {
           "version": "1.3.5",
@@ -4670,6 +4706,7 @@
         "is-fullwidth-code-point": {
           "version": "1.0.0",
           "bundled": true,
+          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -4682,17 +4719,20 @@
         "minimatch": {
           "version": "3.0.4",
           "bundled": true,
+          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
         },
         "minimist": {
           "version": "0.0.8",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "minipass": {
           "version": "2.3.5",
           "bundled": true,
+          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.2",
             "yallist": "^3.0.0"
@@ -4709,6 +4749,7 @@
         "mkdirp": {
           "version": "0.5.1",
           "bundled": true,
+          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -4781,7 +4822,8 @@
         },
         "number-is-nan": {
           "version": "1.0.1",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -4791,6 +4833,7 @@
         "once": {
           "version": "1.4.0",
           "bundled": true,
+          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -4866,7 +4909,8 @@
         },
         "safe-buffer": {
           "version": "5.1.2",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -4896,6 +4940,7 @@
         "string-width": {
           "version": "1.0.2",
           "bundled": true,
+          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -4913,6 +4958,7 @@
         "strip-ansi": {
           "version": "3.0.1",
           "bundled": true,
+          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -4951,11 +4997,13 @@
         },
         "wrappy": {
           "version": "1.0.2",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         },
         "yallist": {
           "version": "3.0.3",
-          "bundled": true
+          "bundled": true,
+          "optional": true
         }
       }
     },
@@ -5845,7 +5893,8 @@
     "jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
-      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+      "optional": true
     },
     "json-loader": {
       "version": "0.5.7",
@@ -6538,8 +6587,8 @@
     },
     "nan": {
       "version": "2.14.0",
-      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
-      "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
+      "resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.0.tgz",
+      "integrity": "sha1-eBj3IgJ7JFmobwKV1DTR/CM2xSw=",
       "optional": true
     },
     "nanomatch": {
@@ -11002,7 +11051,8 @@
     "tweetnacl": {
       "version": "0.14.5",
       "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
-      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+      "optional": true
     },
     "type": {
       "version": "1.0.1",
@@ -11307,6 +11357,17 @@
         "spdx-expression-parse": "^3.0.0"
       }
     },
+    "vant": {
+      "version": "2.2.10",
+      "resolved": "https://registry.npm.taobao.org/vant/download/vant-2.2.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvant%2Fdownload%2Fvant-2.2.10.tgz",
+      "integrity": "sha1-rAqkPn8n5WpyCXdPh7h62TYIO1E=",
+      "requires": {
+        "@babel/runtime": "7.x",
+        "@vant/icons": "1.1.15",
+        "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
+        "vue-lazyload": "1.2.3"
+      }
+    },
     "vary": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -11343,6 +11404,11 @@
       "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.3.tgz",
       "integrity": "sha512-KmvZVtmM26BQOMK1rwUZsrqxEGeKiYSZGA7SNWE6uExx8UX/cj9hq2MRV/wWC3Cq6AoeDGk57rL9YMFRel/q+g=="
     },
+    "vue-lazyload": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npm.taobao.org/vue-lazyload/download/vue-lazyload-1.2.3.tgz?cache=0&sync_timestamp=1568801961628&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-lazyload%2Fdownload%2Fvue-lazyload-1.2.3.tgz",
+      "integrity": "sha1-kB+ewVx+bKeHgaK65KNDaGve2yw="
+    },
     "vue-loader": {
       "version": "13.7.3",
       "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-13.7.3.tgz",

+ 1 - 0
package.json

@@ -19,6 +19,7 @@
     "less-loader": "^4.1.0",
     "lib-flexible": "^0.3.2",
     "portal-vue": "^2.1.6",
+    "vant": "^2.2.10",
     "vue": "^2.5.2",
     "vue-photo-preview": "^1.1.3",
     "vue-router": "^3.0.1",

+ 1 - 0
src/common/ComTextArea.vue

@@ -78,6 +78,7 @@ export default {
       -webkit-appearance: none;
       padding: .16rem /* 16/100 */ .3rem /* 30/100 */;
       margin-bottom: .3rem;
+      background-color: transparent;
     }
   }
 </style>

+ 3 - 2
src/common/Input.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inp-wrap">
-    <input :type="item.controlType==6?'text':'tel'" 
+    <input :type="item.controlType==6?'text':'number'" 
           :maxlength="item.controlType==6?'':10"
           :class="{'change':borColor}" 
           v-model="val" 
@@ -26,7 +26,7 @@
       changeVal(e){
         this.borColor = true;
         if(this.item.controlType==7){//数字键盘
-          this.val = e.target.value=e.target.value.replace(/[^\d]/g,'')
+          this.val = e.target.value=e.target.value.replace(/^\.$/,'')
         }
         // document.activeElement.scrollIntoViewIfNeeded(true);
         this.borColor = false;
@@ -75,6 +75,7 @@
       outline-color: invert;
       padding-left: 0.1rem;
       box-sizing: border-box;
+      // background: #fff;
       background: transparent;
     }
     .change{

+ 3 - 3
src/common/MultiLineInput.vue

@@ -6,7 +6,7 @@
           <template v-for="(item,idx) in content.iptLis">
             <input v-if="content.iptLis.length>1" 
               class="contentVal" 
-              :type="content.type=='number'?'tel':'text'" 
+              :type="content.type=='number'?'number':'text'" 
               :style="{'width':1/content.iptLis.length*100-3+'%'}" 
               :key="item.placeholder+idx" 
               v-model="item.value"
@@ -17,7 +17,7 @@
               :maxlength="content.type=='number'?10:''"
               @click="handleClick">
             <input v-show="content.iptLis.length==1" class="contentVal" 
-              :type="content.type=='number'?'tel':'text'" 
+              :type="content.type=='number'?'number':'text'" 
               :placeholder="content.placeholder" 
               v-model="item.value"
               @input="changeVal($event,idx,content.type)" 
@@ -74,7 +74,7 @@ export default {
       let tmpTxt = '',arr=this.tmpArr
       document.activeElement.scrollIntoViewIfNeeded(true);
       if(type == 'number'){
-        e.currentTarget.value=e.currentTarget.value.replace(/[^\d]/g,'')
+        e.currentTarget.value = e.currentTarget.value.replace(/^\.$/,'')
       }
       arr[num]=e.currentTarget.value
       tmpTxt=arr.join('/')

+ 15 - 7
src/common/OptionInp.vue

@@ -1,10 +1,11 @@
 <!-- 带输入框选项 -->
 <template>
   <div :class="['inpbox',{'check':item.select},{'exclu':exclu}]">
-    <span class="prefix" v-if="msg.prefix">{{msg.prefix}}</span>
+    <span class="prefix" v-if="msg.prefix" @click="focusInp">{{msg.prefix}}</span>
     <!-- <div class="inp" @click="preClick"> -->
-      <input :type="msg.type=='number'?'tel':'text'" 
+      <input :type="msg.type=='number'?'number':'text'"
               :placeholder="msg.placeholder"
+              ref="inp"
               :style="{'width':!msg.prefix&&!msg.suffix?'90%':'33%'}"
               :disabled="exclu"
               :maxlength="msg.type=='number'?10:''"
@@ -15,7 +16,7 @@
               @focus="focus"
               @input="changeVal">
     <!-- </div> -->
-    <span class="suffix" v-if="msg.suffix">{{msg.suffix}}</span>
+    <span class="suffix" v-if="msg.suffix" @click="focusInp">{{msg.suffix}}</span>
   </div>
 </template>
 <script type="text/javascript">
@@ -27,7 +28,7 @@ import $ from 'jquery';
       return{
         msg:{},
         txt:this.item.value || '',
-        select:0,
+        select:0
       }
     },
     props:['item','exclu'],
@@ -37,11 +38,17 @@ import $ from 'jquery';
       this.select = this.item.select;
     },
     methods:{
+      focusInp(){
+        setTimeout(()=>{
+          this.$refs.inp.focus();
+        })
+
+      },
       changeVal(e){
         if(this.msg.type=='number'){//数字键盘
-          this.txt = e.target.value=e.target.value.replace(/[^\d]/g,'')
+          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);
@@ -74,7 +81,7 @@ import $ from 'jquery';
         // const select = this.item.select;
         if(!this.select){//聚焦时自动选中该项
           this.$emit('handleSelec');
-        } 
+        }
       }
     },
     watch:{
@@ -109,6 +116,7 @@ import $ from 'jquery';
       border-bottom: 1px solid #DFE0E4 !important;
       border-radius: 0;
       padding-left: .05rem;
+      background-color: transparent;
       height: 0.38rem;
       line-height: 0.38rem;
     }

+ 86 - 0
src/common/PickTime.vue

@@ -0,0 +1,86 @@
+<!-- 时间类型控件 -->
+<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>
+</template>
+<script type="text/javascript">
+  import $ from 'jquery';
+  import Picker from './Picker.vue';
+  export default {
+    name:'PickTime',
+    data() {
+      return {
+        val:this.item.value || '请选择',
+        showTime:false,
+        picIndex:this.item.pickIndex||[]
+      }
+    },
+    props:['item'],
+    methods: {
+      showPicker(){
+        this.showTime = true;
+        $(".btscroll").css({'position':'fixed'})
+        $(".foot").css({'position':'fixed'})
+      },
+      getTimeVal(value,index){//确定
+        // 首位为0则去掉
+        if(value.charAt(0) == 0){
+          this.val = value.substr(1);
+        }else{
+          this.val = value;
+        }
+        this.showTime = false;
+        const newData = Object.assign({},this.item,{value:this.val,valueP:this.val,pickIndex:index});
+        this.$emit("updata",newData);
+        $(".btscroll").css({'position':'absolute'})
+      },
+      close(){//点击蒙层关闭
+        this.showTime = false;
+        $(".btscroll").css({'position':'absolute'})
+      }
+    },
+    components:{
+      Picker
+    },
+    watch:{
+      item:{
+        handler(newVal,oldVal){
+          this.val = newVal.value|| '请选择';
+          //有初始值或者未选择时,重置index
+          const hasOrg =newVal.value==='1分钟'; //newVal.value.indexOf("分钟")>-1||newVal.value.indexOf("1")>-1||newVal.value.indexOf("0")>-1;
+          if(!newVal.value||hasOrg){//没有值时复原时间组件中的index
+            this.$refs.picker.resetIndex();
+          }
+        },
+        deep:true
+      }
+    }
+  };
+</script>
+<style lang="less" scoped>
+  @import '../less/base.less';
+  .toast-wrap{
+    margin-bottom: .2rem;
+    position: relative;
+    z-index: 116;
+    .ptab{
+      width:100%;
+      height: .8rem;
+      line-height: .8rem;
+      text-align: center;
+      border:1px solid #E6E6E6;
+      border-radius: .1rem;
+      color:#7C828E;
+    }
+    .check{
+      color: #colors[theme] !important;
+    }
+    .tip{
+      color: #7C828E;
+      font-size: .24rem;
+    }
+  }
+</style>

+ 139 - 0
src/common/Picker.vue

@@ -0,0 +1,139 @@
+<!-- 时间选择弹窗 -->
+<template>
+  <portal to="notification-outlet">
+      <div class="toast-wrap" v-if="show">
+        <div class="content">
+          <van-picker
+            :columns="columns"
+            :visible-item-count='3'
+            :swipe-duration="100"
+            @change="handlechange"
+          />
+          <div class="confBtn">
+            <p class="tip" v-show="showTip">请选择正确的时间</p>
+            <div @click="getVal">确认</div>
+          </div>
+        </div>
+      <div class="mask" @click="onCancel"></div>
+      </div>
+  </portal>
+</template>
+<script type="text/javascript">
+  import $ from 'jquery';
+  const num = [0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9];
+  const unit = ['分钟', '小时', '天', '周', '月','年','分钟', '小时', '天', '周', '月','年'];
+  export default {
+    name:'Picker',
+    data() {
+      return {
+        columns: [
+          {
+            values:num,
+            className:'column1',
+            defaultIndex: 10
+          },
+          {
+            values:num,
+            className:'column2',
+            defaultIndex: 11
+          },
+          {
+            values:unit,
+            className:'column3',
+            defaultIndex: 6
+          },
+        ],
+        showTip:false,
+        columIndx:[]
+      }
+    },
+    props:['show','picIndex'],
+    created(){//记录位置
+      this.columns[0].defaultIndex = this.columIndx[0] = this.picIndex[0] || 10;
+      this.columns[1].defaultIndex = this.columIndx[1] = this.picIndex[1] || 11;
+      this.columns[2].defaultIndex = this.columIndx[2] = this.picIndex[2] || 6;
+    },
+    methods: {
+      getVal() {
+        const val1 = $(".column1 ul .van-picker-column__item--selected")[0].innerText;
+        const val2 = $(".column2 ul .van-picker-column__item--selected")[0].innerText;
+        const val3 = $(".column3 ul .van-picker-column__item--selected")[0].innerText;
+        // 如果选两个0,则提示
+        if(val1 == 0 && val2 == 0){
+          this.showTip = true;
+          return
+        }
+        const value = val1 + val2 + val3;
+        this.$emit("comfirn",value,this.columIndx)
+        this.columns[0].defaultIndex = this.columIndx[0] || 10;
+        this.columns[1].defaultIndex = this.columIndx[1] || 11;
+        this.columns[2].defaultIndex = this.columIndx[2] || 6;
+      },
+      onCancel() {
+        this.$emit("cancel")
+        this.showTip = false;
+      },
+      handlechange(picker, value, colum){//关掉提示
+        this.showTip = false;
+        for(let i=0;i<3;i++){
+          if(i == 2){
+            this.columIndx[i] = unit.lastIndexOf(value[i]);
+          }else{
+            this.columIndx[i] = num.lastIndexOf(value[i]);
+          }
+        }
+      },
+      resetIndex(){//清除时复原默认index
+        this.columns[0].defaultIndex = 10;
+        this.columns[1].defaultIndex = 11;
+        this.columns[2].defaultIndex = 6;
+      }
+    }
+  };
+</script>
+<style lang="less" scoped>
+  @import '../less/base.less';
+  .toast-wrap{
+    .content{
+      padding-top: 25px;
+      width: 6.3rem;
+      // height: 4.8rem;
+      height: 227px;
+      background: #fff;
+      z-index: 999;
+      position: fixed;
+      top:50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+      box-sizing: border-box;
+      border-radius: .2rem;
+      z-index: 1000;
+      font-size: .3rem;
+      overflow-y: hidden;
+      .confBtn{
+        height: 44px;
+        line-height: 44px;
+        text-align: center;
+        border-top: 1px solid #ebedf0;
+        margin-top: 25px;
+        position: relative;
+        .tip{
+          position: absolute;
+          top:-22px;
+          font-size: .24rem;
+          color: red;
+          line-height: 20px;
+          width:100%;
+          text-align: center;
+        }
+        div{
+          color: #colors[theme];
+        }
+      }
+    }
+    .mask{
+      .mask;
+      z-index: 999;
+    }
+  }
+</style>

+ 8 - 8
src/common/UploadImg.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="img-wrap">
     <div class="box">
-      
+
       <ul class="upload-imgs">
         <li
           v-show="imgLen<6"
@@ -55,7 +55,7 @@ export default {
     this.$previewRefresh();//预览刷新
     /*if(isIos()){
       $('.upload').removeAttr("capture")
-    }else if(!isWX()){ 
+    }else if(!isWX()){
     // 微信端添加这个属性直接调拍照
     //安卓手机且非微信端添加相机属性,否则QQ浏览器打不开相机
       $('.upload').attr("capture","camera")
@@ -71,7 +71,7 @@ export default {
       const inp = this.$refs.inp;
       if(this.flag){
         inp.click();
-      } 
+      }
     },
     delImg(key) {
       let obj = this.imgs;
@@ -89,16 +89,16 @@ export default {
       let file = fileTag.files[0];
       const that = this;
       this.imgBase64(file, function (image, canvas) {
-        var maxSize = 4 * 1024; // 4M
+        var maxSize = 0.5 * 1024; // 0.5M
         var fileSize = file.size / 1024; //kb 图片大小
         var uploadSrc;
         var uploadFile;
-        if (fileSize > maxSize) { // 如果图片大小大于4m,进行压缩
-          uploadSrc = canvas.toDataURL(file.type, maxSize / fileSize);
-          uploadFile = that.dataURLtoFile(uploadSrc, file.name.split('.')[0]); // 转成file文件
+        if (fileSize > maxSize) { // 如果图片大小大于0.5M,进行压缩
+          uploadSrc = canvas.toDataURL(file.type, 0.1);
+          uploadFile = that.dataURLtoFile(uploadSrc, file.name); // 转成file文件
           // uploadFile = that.convertBase64UrlToBlob(uploadSrc); // 转成blob
         } else {
-          uploadSrc = image.src; 
+          uploadSrc = image.src;
           uploadFile = file;
         }
 

+ 10 - 3
src/components/AddContent.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="symp-wrap addper btscroll">
+  <div class="addc-wrap addper btscroll">
     <div class="content">
         <div class="choose">
         <ul class="addPart">
@@ -35,6 +35,11 @@
                 @updata="updataData($event,index,item)"
               ></MultiLineInput>
             </template>
+            <!-- 时间控件 -->
+            <PickTime v-if="item.controlType==9"
+              :item="item"
+              :key="item.id"
+              @updata="updataData($event,idx,item)"/>
           </li>
         </ul>
         <div class="result" v-if="allStr">
@@ -62,6 +67,7 @@ import Radio from '../common/Radio.vue';
 import CheckBox from '../common/CheckBox.vue';
 import {imageUrlPrefix,getAllStr,setScroll} from '@utils/tools.js';
 import BScroll from 'better-scroll';
+import PickTime from '../common/PickTime.vue';
 export default {
   name: 'AddContent',
   props: ['allMoudles','preName'],
@@ -137,7 +143,8 @@ export default {
     MultiLineInput,
     Input,
     Radio,
-    CheckBox
+    CheckBox,
+    PickTime
   }
 }
 </script>
@@ -146,7 +153,7 @@ export default {
 .questionImg {
   width: 100%;
 }
-.symp-wrap {
+.addc-wrap {
   font-size: 0.3rem;
   overflow: hidden;
   .content {

+ 0 - 2
src/components/Department.vue

@@ -61,9 +61,7 @@
                     recordId:msg.recordId,
                     time:(new Date(time.replace(/\-/g, "/"))).getTime()
                 }
-
                 localStorage.setItem('loginParam',JSON.stringify(params))//保存登陆信息,扫码进入徐删除该参数
-
                 this.$router.push({
                     path:'/home',
                     query:params

+ 30 - 14
src/components/Detail.vue

@@ -2,17 +2,17 @@
   <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>
+      <p class="quest"><img v-show="item.required==1" src="../images/ip.svg"/>{{index + 1 +'.' + (item.description || item.name)}}</p>
       <img class="questionImg" :src="item.url.replace('{imageUrlPrefix}',imgUrl)" v-if="item.url">
-      <Radio v-if="item.controlType==1" 
+      <Radio v-if="item.controlType==1"
             :item="item"
             :key="item.id"
             @updata="updataData"/>
-      <RadioSelect v-if="item.controlType==8" 
+      <RadioSelect v-if="item.controlType==8"
             :item="item"
             :key="item.id"
             @updata="updataData"/>
-      <CheckBox v-if="item.controlType==2" 
+      <CheckBox v-if="item.controlType==2"
             :item="item"
             :key="item.id"
             @updata="updataData"/>
@@ -36,6 +36,9 @@
           @updata="updataData($event,item)"
         ></MultiLineInput>
       </template>
+      <PickTime v-if="item.controlType == 9"
+              @updata="updataData"
+              :item="item"/>
     </div>
   </div>
 </template>
@@ -46,6 +49,7 @@ 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 PickTime from '../common/PickTime.vue';
 import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
 // 将获取到的数据源转换成私有数据,处理选择事件。点击完成后统一存到store中,便于回读
   export default {
@@ -66,7 +70,8 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
       Input,
       ComTextArea,
       MultiLineInput,
-      RadioSelect
+      RadioSelect,
+      PickTime
     },
     methods:{
       updataData(data,item){
@@ -82,7 +87,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
                 if(detList[k].id==data.id){
                   detList.splice(k,1,data)
                 }
-              } 
+              }
               for(let n in detList){//给父级赋值
                 if(detList[n].value){
                   tempVal += detList[n].name.replace(patt,detList[n].value)+',';
@@ -98,7 +103,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
               mapping.splice(i,1,data)
             }
           }
-          
+
         }
         // 实时更新清空样式
         if(data.value){
@@ -112,19 +117,19 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
           }
         }
         // 更新完成样式
-        let checkReq = this.checkReq();
+        /*let checkReq = this.checkReq();
         if(checkReq){
           this.$emit('checkReq',true)
         }else{
           this.$emit('checkReq',false)
-        }
+        }*/
       },
       saveData(){//存值
         this.checkDatas = Object.assign({},this.checkDatas,{select:1});
         const datas = this.checkDatas.questionMapping;
         const id = this.checkDatas.id;
         let chooseSymp = this.$store.state.symptom.choose;
-        
+
         let text = ""; //医生
         let textP = "";//患者
         let special = ""; //拼到主诉
@@ -153,7 +158,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
             }
           }
         }
-        
+
         let msg = this.checkDatas.name+ ',' + text;
         let msgP = (this.checkDatas.description || this.checkDatas.name)+ ',' + textP;
         let newMsg = "";
@@ -176,6 +181,12 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
         const datas = JSON.parse(JSON.stringify(this.checkDatas.questionMapping))
         let reqFlag = false;//必填项标识
         for(let i in datas){
+          // 时间控件需要清除缓存的index
+          if(datas[i].controlType ==9){
+            if(datas[i].pickIndex){
+              datas[i].pickIndex = [];
+            }
+          }
           datas[i].value = "";
           datas[i].valueP = "";
           if(datas[i].required==1){
@@ -204,7 +215,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
         }else{
           this.$store.commit('setDatas',{data:Object.assign({},this.checkDatas,{select:1}),pId:this.checkDatas.id,type:this.data.moduleType,ppId:this.data.ppId});
         }
-        
+
         this.$store.commit('setText',{text:msg,textP:msgP,pId:this.checkDatas.id,type:this.data.moduleType,flag:true,order:this.data.order,arrFlag:true,index:this.data.index});
       },
       check(){// 校验是否有已填项
@@ -229,7 +240,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
         }
         return false;
       },
-      checkReq(){// 校验必填项
+      /*checkReq(){// 校验必填项
         const datas = this.checkDatas.questionMapping;
         for(let k in datas){
           if(datas[k].required==1 && !datas[k].value){
@@ -237,7 +248,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
           }
         }
         return true;
-      }
+      }*/
     },
   }
 </script>
@@ -250,6 +261,11 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
     .quest{
       color:#colors[quest];
       margin-bottom: .2rem;
+      img{
+        width: 16px;
+        vertical-align: text-top;
+        margin-right: 4px;
+      }
     }
     .questionImg {
       width: 100%;

+ 24 - 23
src/components/DetailBox.vue

@@ -5,11 +5,10 @@
       <div class="content detailBoxMain" ref="detailBox">
         <div class="tmpDom"></div>
         <div class="main">
-          <Detail :datas="privateData" 
+          <Detail :datas="privateData"
                   ref="detail"
                   :data="data"
-                  @check="changeCheck($event)"
-                  @checkReq="changeFins($event)"/>
+                  @check="changeCheck($event)"/>
         </div>
         <!-- <div class="foot" @click="complete">完成</div> -->
       </div>
@@ -23,16 +22,17 @@
       </div>
     </div>
     <!-- <div :class="['foot',{'noCheck':!checkF}]" @click="complete">完成</div> -->
-    <div style="position:absolute" :class="['foot',{'noCheck':!checkF || !reqFinish}]" @click="complete">完成</div>
-    <Toast :message="clearTxt" 
+    <div style="position:absolute" :class="['foot']" @click="complete">完成</div>
+    <Toast :message="clearTxt"
           :show="showToast"
-          @comfirn="comfirnDel" 
+          @comfirn="comfirnDel"
           @cancel="cancelDel"/>
   </portal>
 </template>
 <script type="text/javascript">
   import Detail from './Detail.vue';
   import Toast from '../common/Toast.vue';
+  import Picker from '../common/Picker.vue';
   import {fixedKeyboard,setScroll,moduleCP} from '@utils/tools.js';
   import BScroll from 'better-scroll';
   import $ from 'jquery';
@@ -50,20 +50,21 @@
         tips:"(请完成病情预问诊可让医生提前了解病情)",
         checkF:false, //详情页有无已选项标识
         show:detailShow,
-        reqFinish:false
+        //reqFinish:false,
+        showPic:false
       }
     },
     mounted(){
       this.$nextTick(()=>{
         // 校验是否有已填项,有--弹窗;无--return
         let hasCheck = this.$refs.detail.check();
-        let checkReq = this.$refs.detail.checkReq();
+        //let checkReq = this.$refs.detail.checkReq();
         if(hasCheck){
           this.checkF = true;
         }
-        if(checkReq && hasCheck){
+        /*if(checkReq && hasCheck){
           this.reqFinish = true;
-        }
+        }*/
         setTimeout(() => {
           let scroll = setScroll(BScroll,true,'.viewPrew')
           this.scroll = scroll
@@ -74,7 +75,7 @@
     methods:{
       onScroll(data) {
         this.$store.commit('setScroll', data)
-        document.activeElement.scrollIntoViewIfNeeded(true);        
+        document.activeElement.scrollIntoViewIfNeeded(true);
       },
       close(){
         // 有必填项但没值则将choose移除 8-19
@@ -94,31 +95,31 @@
             }
           }
         }
-        
+
         this.$store.commit('setDetail',{detail:{}})
       },
       complete(){
       //有选中内容才可以点完成#1919
         // if(this.checkF){
       //必填项都填完了才可以点完成
-        if(this.reqFinish && this.checkF){
+        //if(this.checkF){
           this.$refs.detail.saveData();
           this.$store.commit('setSearchShow', false);
-        }
+       // }
       },
       changeCheck(flag){//是否有选中项
         this.checkF = flag;
       },
-      changeFins(flag){//必填项是否都填了
+      /*changeFins(flag){//必填项是否都填了
         this.reqFinish = flag;
-      },
+      },*/
       handleClear(){//清空
         // 校验是否有已填项,有--弹窗;无--return
         if(this.checkF){
           this.showToast = true;
           $(".btscroll").css({'position':'fixed'})
           $(".foot").css({'position':'fixed'})
-        }  
+        }
       },
       cancelDel(){
         $(".btscroll").css({'position':'absolute'})
@@ -129,7 +130,7 @@
         this.$refs.detail.clearData();
         this.showToast = false;
         this.checkF = false;
-        this.reqFinish = false;
+        //this.reqFinish = false;
         // 让detail组件更新
         const type = this.data.moduleType;
         if(type == moduleCP['symp']){ //症状情况单独处理
@@ -138,8 +139,8 @@
           const data = read[id];
           this.$store.commit('setDetail',{detail:data,ppId:null,moduleType:moduleCP['symp']})
         }
-        
-      }
+
+      },
     },
     components:{
       Detail,
@@ -182,7 +183,7 @@
     background: #fff;
     border-radius: .08rem .08rem 0 0;
     font-size: .3rem;
-    animation: wave .4s linear;
+    animation: wave .6s linear;
     height: 100%;
     overflow: hidden;
     .head{
@@ -254,9 +255,9 @@
     50% {top: 50%;}
     75% {top: 25%;}
     100% {top: 45px;}
-  } 
+  }
   @keyframes foo {
     0% {bottom:-1rem;}
     100% {bottom:0;}
   }
-</style>
+</style>

+ 8 - 1
src/components/DiagTreat.vue

@@ -45,6 +45,11 @@
               @updata="updataData($event,it.id,i,index)"
             ></MultiLineInput>
         </template>
+        <!-- 时间控件 -->
+        <PickTime v-if="it.controlType==9"
+            :item="it"
+            :key="it.id"
+            @updata="updataData($event,it.id,i)"/>
       </div>
       <div class="result" v-if="getText()">
         <p class="title">{{datas.name}}</p>
@@ -73,6 +78,7 @@
   import CheckBox from '../common/CheckBox.vue';
   import BScroll from 'better-scroll';
   import MultiLineInput from '../common/MultiLineInput.vue';
+  import PickTime from '../common/PickTime.vue';
   export default {
     name:'DiagTreat',
     data(){
@@ -168,7 +174,8 @@
       ComTextArea,
       Radio,
       CheckBox,
-      MultiLineInput
+      MultiLineInput,
+      PickTime
     },
     computed:{
       getItem(){

+ 7 - 6
src/components/Login.vue

@@ -15,8 +15,8 @@
         <div class="slideType" v-if="show">
           <ul>
             <!-- <li @click="handleType('手机号',103)">手机号</li> -->
-            <li @click="handleType('身份证号',101)">身份证号</li>
             <li @click="handleType('病历号',102)">病历号</li>
+            <li @click="handleType('身份证号',101)">身份证号</li>
             <li @click="handleType('市民卡号',104)" style="border:0 none">市民卡号</li>
           </ul>
         </div>
@@ -46,7 +46,7 @@
       </div>
       <div :class="['btn',value&&patName?'btnClick':'btnDis']" @click="handleDepart">进入预问诊</div>
     </div>
-    <div class="tip">注:建议您可先输入病情情况,方便医生提前了解情况</div>
+    <!--<div class="tip">注:建议您可先输入病情情况,方便医生提前了解情况</div>-->
     <Submit v-if="submit" :showType="showType" :fail="failMsg" @showSubmit="showSubmit"></Submit>
     <Tiptoast
         :show="showTip"
@@ -68,8 +68,8 @@ export default {
       failMsg: "",
       submit: false,
       show: false,
-      type: "101",
-      name: "身份证号",
+      type: "102",
+      name: "病历号",
       patName:'',
       value: "",
       message:{
@@ -102,7 +102,8 @@ export default {
     },
     blur() {
       if(MobileDevice.getModels().join(' or ').indexOf('6') == -1){
-        document.activeElement.scrollIntoViewIfNeeded(true);      
+        document.activeElement.scrollIntoView({behavior: "smooth", block: "end"});
+        document.activeElement.scrollIntoViewIfNeeded(true);
         setTimeout(() => {
           document.activeElement.scrollIntoViewIfNeeded(true);
         }, 300);
@@ -111,7 +112,7 @@ export default {
     changeName() {
       document.activeElement.scrollIntoViewIfNeeded(true);
       const { patName } = this;
-      this.patName = patName.replace(/[0-9]*$/,'').replace(/[`~!@#$%^&)(*_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im,'')
+      this.patName = patName.replace(/[`~!@#$%^&)(*_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im,'')
     },
     changeVal() {
       document.activeElement.scrollIntoViewIfNeeded(true);

+ 8 - 1
src/components/Others.vue

@@ -40,6 +40,11 @@
               @updata="updataData($event,it.id,i,index)"
             ></MultiLineInput>
         </template>
+        <!-- 时间控件 -->
+        <PickTime v-if="it.controlType==9"
+            :item="it"
+            :key="it.id"
+            @updata="updataData($event,it.id,i)"/>
       </div>
       <div class="result" v-if="getText()">
         <p class="title">{{datas.name}}</p>
@@ -68,6 +73,7 @@
   import CheckBox from '../common/CheckBox.vue';
   import MultiLineInput from '../common/MultiLineInput.vue';
   import BScroll from 'better-scroll';
+  import PickTime from '../common/PickTime.vue';
   export default {
     name:'Others',
     data(){
@@ -164,7 +170,8 @@
       ComTextArea,
       Radio,
       CheckBox,
-      MultiLineInput
+      MultiLineInput,
+      PickTime
     },
     computed:{
       getItem(){

+ 4 - 4
src/components/PathInfo.vue

@@ -31,7 +31,7 @@
             <p class="big">智能预问诊</p>
           </div>
           <div class="inner">
-            <p>该系统通过智能引导式问诊,帮助医生规范、全面的采集患者的症状、体征、病史等信息,从而实现诊疗流程的优化和配置。</p>
+            <p>请认真填写以下内容,以便就诊时医生可以更好的了解病情,感谢您的配合!</p>
             <button @click="getStart">开始</button>
           </div>
           <!-- <p v-if="type==3">您已完成过一次预问诊,是否再次录入</p> -->
@@ -195,7 +195,7 @@
           this.submit = false
           clearTimeout(timer)
         }, 2000);
-      }, 
+      },
     },
     components:{
       Submit
@@ -258,7 +258,7 @@
       white-space: nowrap;
       overflow-x: auto;
       padding:0 .15rem .15rem 0;
-      -webkit-overflow-scrolling: touch;  
+      -webkit-overflow-scrolling: touch;
       text-align: center;//隐藏儿童
     }
     .emery,.child{
@@ -315,4 +315,4 @@
       background-size: cover;
     }
   }
-</style>
+</style>

+ 6 - 1
src/components/Search.vue

@@ -45,7 +45,7 @@
 <script>
 import api from '@utils/api.js';
 export default {
-  props: ['age', 'sexType', 'chooseSymp'],
+  props: ['age', 'sexType', 'chooseSymp','setText'],
   data() {
     return {
       searchVal: '',
@@ -69,6 +69,11 @@ export default {
   },
   methods: {
     showDetil(item) {
+      if(this.chooseSymp.length>0){     //已有选中症状,不展开详情
+        this.$emit('setText',item);     //选中症状
+        this.search();      //关闭搜索页
+        return;
+      }
       let flg = false;
       if(JSON.stringify(this.tmpItem)==JSON.stringify(item)){//eg:重复点击胸痛bug
         flg = true

+ 34 - 9
src/components/Symptom.vue

@@ -34,10 +34,12 @@
         <span
           class="symp"
           v-for="(it,ind) in symp"
+          v-if="ind<9||showAll"
           :key="it.conceptId"
           @touchstart.stop.prevent="touchstart(it)"
           @touchend.stop.prevent="touchend(it)"
         >{{it.description || it.name}}</span>
+        <p class="show-all" v-if="chooseSymp.length===0" @click="showAllLabel">{{showAll?"收起":"展开全部"}}</p>
         <p class="tip" v-show="chooseSymp.length==0">长按症状按钮可显示症状解释说明</p>
       </div>
       <div
@@ -65,6 +67,7 @@
     <Search
       v-if="this.$store.state.searchShow"
       @search="search"
+      @setText="common"
       @showDetil="showDetil"
       :age="age"
       :chooseSymp="chooseSymp"
@@ -109,6 +112,7 @@ export default {
       startTime:'',
       timer:null,
       showExp:false,
+      showAll:false,    //默认显示9个症状,showAll=true展开全部
       message:{
         title:'',
         text:''
@@ -136,6 +140,7 @@ export default {
     touchstart(it){
       this.startTime = +new Date();
       const that = this;
+      this.start = this.$store.state.scroll;
       this.timer = setTimeout(function(){
         // 长按事件
           that.showExp = true;
@@ -146,7 +151,7 @@ export default {
             that.message.title = "";
             that.message.text = "暂无资料";
           }
-          
+
         },600)
     },
     closeTip(){
@@ -191,8 +196,8 @@ export default {
       const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
       //将选中的name存到store中的text
       this.$store.commit('setText', { type: moduleCP['symp'], text: item.name,textP: item.description||item.name, pId: this.questId });
-      
-      if (id) {
+      //不是第一个症状,都不弹出详情
+      if (this.chooseSymp.length === 0&&id) {
         const param = {
           "age": this.age,
           "id": id,
@@ -203,20 +208,20 @@ export default {
           if (result.code == 0) {
             const mapping = result.data.questionMapping;
             this.labelDetail = result.data;
-            this.$store.commit('setOrigin', { type: moduleCP['symp'], data: result.data });
+            //this.$store.commit('setOrigin', { type: moduleCP['symp'], data: result.data }); //2544暂时不存,被删除后加上详情不会再显示
             if (mapping && mapping.length > 0) {
               this.$store.commit('setDetail',{detail:result.data,ppId:null,moduleType:moduleCP['symp']})
               if(flg){
                 return
               }
               this.chooseSymp.push(item);
-            } else { 
+            } else {
               this.chooseSymp.push(item);
               this.$store.commit('setSearchShow', false);
             }
           }
         })
-      } else {//没有questionId或id 
+      } else {//没有questionId或id
         this.chooseSymp.push(item);
         this.checkText = this.$store.state.symptom.text;
       }
@@ -228,12 +233,19 @@ export default {
     },
     touchend(item,flg) {//症状点开详情
       clearTimeout(this.timer);
+      this.end = this.$store.state.scroll;
+      if(JSON.stringify(this.start)!== JSON.stringify(this.end)){
+        return;
+      }
       let endTime = +new Date();
       if(endTime - this.startTime < 500){//点击事件
         this.common(item,flg);
       }
       this.startTime = "";
     },
+    showAllLabel(){
+      this.showAll = !this.showAll;
+    },
     getSympText() {//推送使用医生端信息
       const text = this.$store.state.symptom.text;
       let msg = "";
@@ -272,7 +284,8 @@ export default {
       $(".btscroll").css({'position':'absolute'})
       this.chooseSymp.splice(this.delIndex, 1);
       this.checkText.splice(this.delIndex, 1);
-      this.$store.commit('delText', { type: moduleCP['symp'], pId: this.questId })
+      this.$store.commit('delText', { type: moduleCP['symp'], pId: this.questId });
+      console.log(this.$store.state)
       // 删除setDatas数据,防止回读
       this.$store.commit('setDatas', { type: moduleCP['symp'], pId: this.questId ,data:''})
       // 删除完-常见;其他-推送
@@ -300,7 +313,7 @@ export default {
       const read = this.$store.state.symptom.datas;
       const data = read[(item.questionId||item.id)] || origin[(item.questionId||item.id)];
       if (data&&data.questionMapping && data.questionMapping.length > 0) {
-        this.$store.commit('setDetail',{detail:data,ppId:null,moduleType:moduleCP['symp']})       
+        this.$store.commit('setDetail',{detail:data,ppId:null,moduleType:moduleCP['symp']})
       }
     },
   },
@@ -320,7 +333,7 @@ export default {
         }else{
           this.getSympList();
           this.quesText = "请问您这次哪里最不舒服?";
-        } 
+        }
       },
       deep:true
     }
@@ -397,6 +410,18 @@ export default {
 }
 .label{
   .label;
+  .show-all{
+    text-align: right;
+    color: #4f7aff;
+    font-size: 0.25rem;
+    height:35px;
+    line-height: 35px;
+    float: right;
+   /* width: 80px;
+    border:1px #4f7aff solid;
+    border-radius: 5px;
+    margin: auto;*/
+  }
 }
 .result{
   .result;

BIN
src/images/ip.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/images/ip.svg


+ 4 - 0
src/main.js

@@ -6,8 +6,12 @@ import preview from 'vue-photo-preview';
 import 'vue-photo-preview/dist/skin.css';
 import PortalVue from 'portal-vue';
 import './utils/getfile.js';
+// import {Picker} from 'vant';
+import Picker from 'vant/lib/picker';
+import 'vant/lib/picker/style';
 Vue.use(PortalVue);
 Vue.use(preview);
+Vue.use(Picker);
 Vue.config.productionTip = false;
 
 

+ 12 - 1
src/utils/tools.js

@@ -318,6 +318,7 @@ function setScroll(scroll,flg,wrapper){
   return new scroll(wrapper?wrapper:'.wrapper',{
       scrollY: flg,
       click: true,
+      tap: true,
       probeType:3,
       // bounceTime:800,
       momentumLimitTime:300,//只有在屏幕上快速滑动的时间小于 momentumLimitTime,才能开启 momentum 动画。
@@ -361,6 +362,15 @@ function dateParser(timestamp,link = '-'){
   return result;
 }
 
+// 获取01-99
+const getNum = () => {
+  let num = [];
+  for(let i = 1; i < 100; i++){
+    num.push(i.toString().padStart(2,'0'));
+  }
+  return num;
+}
+
 module.exports =  {
   imageUrlPrefix,
   getUrlArgObject,
@@ -384,7 +394,8 @@ module.exports =  {
   compare,
   dateParser,
   name,
-  isQQ
+  isQQ,
+  getNum
 }