(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/survey/survey"],{2012:function(t,e,i){"use strict";i.r(e);var n=i("2282"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},2282:function(t,e,i){"use strict";(function(t){var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(i("9523")),o=i("26cb");function s(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}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,a.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={},n=[];e.dasA.forEach((function(t,e){if(i[t.valId])for(var a=0;a<n.length;a++)n[a].id==t.valId&&n[a].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}),n.push(o),i[t.valId]=t}})),console.log("去计算",n),e.$model.getbodyresultinfo({appid:t.getStorageSync("appid"),familyid:e.user.familyid,data:n}).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("543d")["default"])},"2d25":function(t,e,i){"use strict";(function(t,e){var n=i("4ea4");i("6808");n(i("66fd"));var a=n(i("699f"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(a.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},"3fc4":function(t,e,i){"use strict";var n=i("f60b"),a=i.n(n);a.a},"699f":function(t,e,i){"use strict";i.r(e);var n=i("c61f"),a=i("2012");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("3fc4");var s=i("f0c5"),r=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,"1a070e89",null,!1,n["a"],void 0);e["default"]=r.exports},c61f:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=(t._self._c,!t.isShowA&&t.listA?t.listA.list.length:null),n=t.isShowA?t.__map(t.infoListA.slice((t.currpage-1)*t.eachpage,t.currpage*t.eachpage),(function(e,i){var n=t.__get_orig(e),a=t.__map(e.qalist,(function(e,i){var n=t.__get_orig(e),a=t.__map(e.data,(function(e,i){var n=t.__get_orig(e),a=t.dasC.indexOf(e.val);return{$orig:n,g1:a}}));return{$orig:n,l0:a}}));return{$orig:n,l1:a}})):null;t._isMounted||(t.e0=function(e,i){var n=arguments[arguments.length-1].currentTarget.dataset,a=n.eventParams||n["event-params"];i=a.it;return t.Changeradio(i)}),t.$mp.data=Object.assign({},{$root:{g0:i,l2:n}})},a=[]},f60b:function(t,e,i){}},[["2d25","common/runtime","common/vendor"]]]);