require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_index/test"],{210:function(t,e,n){"use strict";(function(t,e){var i=n(4);n(26);i(n(25));var s=i(n(211));t.__webpack_require_UNI_MP_PLUGIN__=n,e(s.default)}).call(this,n(1)["default"],n(2)["createPage"])},211:function(t,e,n){"use strict";n.r(e);var i=n(212),s=n(214);for(var o in s)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(o);n(216);var r,a=n(34),u=Object(a["default"])(s["default"],i["render"],i["staticRenderFns"],!1,null,null,null,!1,i["components"],r);u.options.__file="pages_index/test.vue",e["default"]=u.exports},212:function(t,e,n){"use strict";n.r(e);var i=n(213);n.d(e,"render",(function(){return i["render"]})),n.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(e,"components",(function(){return i["components"]}))},213:function(t,e,n){"use strict";var i;n.r(e),n.d(e,"render",(function(){return s})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return o})),n.d(e,"components",(function(){return i}));var s=function(){var t=this,e=t.$createElement,n=(t._self._c,null!=t.patient?t.$getAge(t.patient.birthday):null),i=null!=t.patient?t.$parseIdCard(t.patient.idCard):null,s=null!=t.item?JSON.parse(t.item.scoreJson):null;t._isMounted||(t.e0=function(e,n){var i=arguments[arguments.length-1].currentTarget.dataset,s=i.eventParams||i["event-params"];n=s.option;return t.optionClick(t.item,n)}),t.$mp.data=Object.assign({},{$root:{m0:n,m1:i,l0:s}})},o=!1,r=[];s._withStripped=!0},214:function(t,e,n){"use strict";n.r(e);var i=n(215),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=s.a},215:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(207),s={data:function(){return{scrollTop:0,formJson:null,tempId:null,patient:null,items:{},msgs:[],index:0,item:null}},computed:{imgPath:function(){return this.$store.state.imgpath}},onLoad:function(e){this.tempId=e.tempId;var n=this;t.$on("refreshOrderPatient",(function(t){n.patient=t}))},onShow:function(){this.getTestTempDetails(),this.getTestDetails()},onShareAppMessage:function(t){if(this.$isLogin())return{title:"健康体质检测",path:"/pages_index/test?tempId="+this.tempId,imageUrl:this.$store.state.imgpath+"/app/image/logoshare.png"}},onShareTimeline:function(t){if(this.utils.isLogin())return{title:"健康体质检测",imageUrl:this.$store.state.imgpath+"/app/image/logoshare.png"}},methods:{getTestDetails:function(){var e={tempId:this.tempId};(0,i.getTestDetails)(e).then((function(e){200==e.code?t.setNavigationBarTitle({title:e.data.name+"自测"}):t.showToast({icon:"none",title:"请求失败"})}),(function(t){}))},addMsg:function(e,n){var i={type:e,content:n};this.msgs.push(i);var s=this;t.createSelectorQuery().select(".msgs").boundingClientRect((function(t){var e=t.height;s.scrollTop=e})).exec()},optionClick:function(e,n){null!=this.patient?(e.option=n.name,console.log(e.option),this.addMsg(2,n.name),this.index++,this.index<=this.items.length-1?(this.item=this.items[this.index],this.addMsg(1,this.item.title)):this.submit()):t.showToast({icon:"none",title:"请选择体验者"})},getTestTempDetails:function(){var t=this,e={tempId:this.tempId};(0,i.getTestTempDetails)(e).then((function(e){200==e.code&&(t.items=e.items,t.items.length>0&&(t.item=t.items[0],t.addMsg(1,t.item.title)))}),(function(t){}))},addPatient:function(){t.navigateTo({url:"/pages_index/patient"})},submit:function(){var e={tempId:this.tempId,patientId:this.patient.patientId,formJson:JSON.stringify(this.items)};(0,i.doReport)(e).then((function(e){200==e.code?t.redirectTo({url:"/pages_index/testResult?reportId="+e.reportId}):t.showToast({icon:"none",title:e.msg})}))}}};e.default=s}).call(this,n(2)["default"])},216:function(t,e,n){"use strict";n.r(e);var i=n(217),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=s.a},217:function(t,e,n){}},[[210,"common/runtime","common/vendor","pages_index/common/vendor"]]]);
//# sourceMappingURL=../../.sourcemap/mp-weixin/pages_index/test.js.map