(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/survey/survey"],{"015c":function(t,e,i){"use strict";var a=i("22a5"),n=i.n(a);n.a},"22a5":function(t,e,i){},5472:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=(t._self._c,!t.isShowA&&t.listA?t.listA.list.length:null),a=t.isShowA?t.__map(t.infoListA.slice((t.currpage-1)*t.eachpage,t.currpage*t.eachpage),(function(e,i){var a=t.__get_orig(e),n=t.__map(e.qalist,(function(e,i){var a=t.__get_orig(e),n=t.__map(e.data,(function(e,i){var a=t.__get_orig(e),n=t.dasC.indexOf(e.val);return{$orig:a,g1:n}}));return{$orig:a,l0:n}}));return{$orig:a,l1:n}})):null;t._isMounted||(t.e0=function(e,i){var a=arguments[arguments.length-1].currentTarget.dataset,n=a.eventParams||a["event-params"];i=n.it;return t.Changeradio(i)}),t.$mp.data=Object.assign({},{$root:{g0:i,l2:a}})},n=[]},"5b43":function(t,e,i){"use strict";(function(t,e){var a=i("47a9");i("6846");a(i("3240"));var n=a(i("5cf6"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(n.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},"5cf6":function(t,e,i){"use strict";i.r(e);var a=i("5472"),n=i("a049");for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("015c");var s=i("828b"),r=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"62765aa7",null,!1,a["a"],void 0);e["default"]=r.exports},a049:function(t,e,i){"use strict";i.r(e);var a=i("d7ca"),n=i.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);e["default"]=n.a},d7ca:function(t,e,i){"use strict";(function(t){var a=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("7ca3")),o=i("8f59");function s(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function r(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach((function(e){(0,n.default)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var l={computed:r(r({},(0,o.mapState)(["user","appTheme"])),{},{info:function(){return this.user}}),onLoad:function(){t.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:this.appTheme})},onShow:function(){this.handleTypeInfo()},methods:{handleTypeInfo:function(){var t=this;t.$model.getbodyinfo({familyid:t.user.familyid}).then((function(e){0==e.code?(t.listA=e.data,t.isShowA=!1,console.log("计算成功,去查看结果吧！")):t.handleListx(1)}))},handleListx:function(t){var e=this;e.isShowA=!0,e.currpage=1,e.dasA=[],e.dasC=[],e.listA="",e.tmidlistA=[],e.infoListA=[],e.$model.getbodylist({isrestart:t,sex:e.user.sex,familyid:e.user.familyid}).then((function(t){console.log(123,t),0==t.code&&(e.pagesum=Math.ceil(t.data.length/e.eachpage),e.infoListA=t.data)}))},Changeradio:function(t){if(-1==this.tmidlistA.indexOf(t.id))console.log(0),this.tmidlistA.push(t.id),this.dasC.push(t.val),this.dasA.push(t);else for(var e=0;e<this.tmidlistA.length;e++)t.id==this.tmidlistA[e]&&(console.log(1),-1==this.dasC.indexOf(t.val)&&(this.tmidlistA.push(t.id),this.dasC.push(t.val),this.dasA.push(t),console.log(2)),this.tmidlistA.splice(e,1),this.dasC.splice(e,1),this.dasA.splice(e,1))},handlesub:function(){var e=this,i={},a=[];e.dasA.forEach((function(t,e){if(i[t.valId])for(var n=0;n<a.length;n++)a[n].id==t.valId&&a[n].list.push({id:t.id,score:t.value});else{var o={id:"",list:[]};o.id=t.valId,o.list.push({id:t.id,score:t.value}),a.push(o),i[t.valId]=t}})),console.log("去计算",a),e.$model.getbodyresultinfo({appid:t.getStorageSync("appid"),familyid:e.user.familyid,data:a}).then((function(t){console.log("res",t),e.tmidlistA=[],e.dasA=[],e.dasC=[],0==t.code?(e.listA=t.data,e.isShowA=!1,e.currpage=1,console.log("计算成功,去查看结果吧！")):e.$tools.msg(t.message)}))},pre:function(){this.currpage--},next:function(){this.currpage++}},data:function(){return{isShowA:!0,dasA:[],dasC:[],listA:[],infoListA:[],tmidlistA:[],pagesum:null,currpage:1,eachpage:2}}};e.default=l}).call(this,i("df3c")["default"])}},[["5b43","common/runtime","common/vendor"]]]);