1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- Vue.component('visitor-info', {
- template: '<div><div class="c-f16 c-border-b pb5">就诊人信息</div>\
- <ul class="pl40">\
- <li class="h34">\
- <span class="fc-999 mr40 w100">就诊居民</span>\
- <span class="ti1">{{param.patientName}}</span>\
- </li>\
- <li class="h34">\
- <span class="fc-999 mr40 w100">身份证号</span>\
- <span class="ti1">{{handleIdcard(param.cardNo)}}</span>\
- </li>\
- <li class="h34">\
- <span class="fc-999 mr40 w100">社保卡号</span>\
- <span class="ti1">{{param.clinicCard}}</span>\
- </li>\
- <li class="h34">\
- <span class="fc-999 mr40 w100">手机号码</span>\
- <input class="bd1 ti1" v-model="param.patientPhone" placeholder="输入手机号码" />\
- </li>\
- </ul>\
- </div>',
- props: ["param"],
- data: function() {
- return {
- imgCode: "",
- text: ""
- }
- },
- mounted: function() {
- this.initValidate()
- },
- methods: {
- // 验证
- sureValue: function() {
- if(!isMobilePhone(visitor.phone)) {
- top.showErrorMessage("手机号码编辑错误!")
- return true
- }
- },
- handleIdcard: function(str) {
- var len = str.length
- if (len == 18) {
- return str.substr(0, 4) + '**********' + str.substr(14, 4)
- } else if (len == 15) {
- return str.substr(0, 4) + '*******' + str.substr(11, 4)
- }
- },
- initValidate: function() {
- var docInfo = JSON.parse(window.localStorage.getItem('docInfo'))
- var vm = this
- APIService.captchaWithDoctor(docInfo.jobCode, {
-
- }).then(function(res) {
- if(res.status == 200) {
- vm.imgCode = "data:image/png;base64,"+ res.data.image
- vm.param.key = res.data.key
- } else {
-
- }
- }).catch(function(e) {
-
- })
- },
- }
- })
|