(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/archives/add_archives"],{"0465":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("a34a"));function i(t){return t&&t.__esModule?t:{default:t}}function u(t,e,n,a,i,u,o){try{var r=t[u](o),s=r.value}catch(c){return void n(c)}r.done?e(s):Promise.resolve(s).then(a,i)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(a,i){var o=t.apply(e,n);function r(t){u(o,a,i,r,s,"next",t)}function s(t){u(o,a,i,r,s,"throw",t)}r(void 0)}))}}var r={onLoad:function(t){},onShow:function(){},data:function(){return{imgList:"",name:"",list:[{name:"男",disabled:!1},{name:"女",disabled:!1}],value:"男",date:"请选择出生日期",show:!1,guanxi:"请选择",guanxiindex:-1,guanxilist:[{value:"1",label:"父亲"},{value:"2",label:"母亲"},{value:"3",label:"祖父"},{value:"4",label:"祖母"},{value:"5",label:"外祖父"},{value:"6",label:"外祖母"},{value:"7",label:"叔侄"}],idcrad:"",touxiang:""}},methods:{ChooseImage:function(){var e=this;t.chooseImage({count:1,sizeType:["compressed"],sourceType:["album","camera"],success:function(t){e.imgList=t.tempFilePaths,e.$request.upload("/api/v1/common/uploadFile",e.imgList[0]).then((function(t){var n=JSON.parse(t);0==n.status&&(e.touxiang=n.data.url,console.log(e.touxiang))}))}})},radioGroupChange:function(t){this.value=t},bindDateChange:function(t){var e=t.detail;this.date=e.value},confirm:function(t){this.guanxiindex=t.detail.value,this.guanxi=this.guanxilist[t.detail.value].label},addarchives:function(){var e=o(a.default.mark((function e(){var n,i;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=0,n="男"==this.value?1:2,void 0===this.imgList[0]||""==this.name||"请选择出生日期"==this.date||-1==this.guanxiindex||""==this.idcrad||!this.$util.isIdCard(this.idcrad)){e.next=10;break}return e.next=5,this.$request.post("/api/v1/patient/createPatient",{name:this.name,sex:n,avatar:this.touxiang,birthday:this.date,relationship_type:this.guanxiindex,card_type:1,card_number:this.idcrad});case 5:i=e.sent,console.log(i),0==i.status&&(t.showToast({title:"提交成功",icon:"none",duration:1500}),setTimeout((function(){t.navigateBack({delta:1})}),1500)),e.next=11;break;case 10:t.showToast({title:"请填写完整",icon:"none"});case 11:case"end":return e.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}()}};e.default=r}).call(this,n("543d")["default"])},"0a6f":function(t,e,n){},2216:function(t,e,n){"use strict";n.r(e);var a=n("0465"),i=n.n(a);for(var u in a)"default"!==u&&function(t){n.d(e,t,(function(){return a[t]}))}(u);e["default"]=i.a},"40b4":function(t,e,n){"use strict";var a=n("0a6f"),i=n.n(a);i.a},"41a5":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return a}));var a={uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,"8225"))},uRadio:function(){return n.e("uview-ui/components/u-radio/u-radio").then(n.bind(null,"e9ba"))}},i=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.show=!t.show})},u=[]},"7f95":function(t,e,n){"use strict";n.r(e);var a=n("41a5"),i=n("2216");for(var u in i)"default"!==u&&function(t){n.d(e,t,(function(){return i[t]}))}(u);n("40b4");var o,r=n("f0c5"),s=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"db3db890",null,!1,a["a"],o);e["default"]=s.exports},"9bf8":function(t,e,n){"use strict";(function(t){n("02cf");a(n("66fd"));var e=a(n("7f95"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])}},[["9bf8","common/runtime","common/vendor"]]]);