require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugin/tongue_diagnosis/report"],{"146a":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var i={uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,"b248"))},uTransition:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-transition/u-transition")]).then(n.bind(null,"30d3"))}},r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.adviceSections.length),i=n?t.__map(t.adviceSections,(function(e,n){var i=t.__get_orig(e),r=t.__map(e.list,(function(n,i){var r=t.__get_orig(n),a=e.list.length>1||n.title!==e.groupTitle;return{$orig:r,g1:a}}));return{$orig:i,l0:r}})):null;t._isMounted||(t.e0=function(e){t.showPhysiqueAnalysis=!t.showPhysiqueAnalysis},t.e1=function(e){t.showTypicalSymptom=!t.showTypicalSymptom},t.e2=function(e){t.showRiskWarning=!t.showRiskWarning},t.e3=function(e){t.showSyndromeIntroduction=!t.showSyndromeIntroduction}),t.$mp.data=Object.assign({},{$root:{g0:n,l1:i}})},a=[]},"32a4":function(t,e,n){},"62a2":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("7ca3")),a=n("8f59");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u={name:"TongueDiagnosisReport",data:function(){return{innerReport:null,report:{},showPhysiqueAnalysis:!0,showTypicalSymptom:!0,showRiskWarning:!0,showSyndromeIntroduction:!0,gender:"",detailData:{}}},onLoad:function(t){this.id=t.id,this.getReport()},computed:s(s({},(0,a.mapGetters)(["base"])),{},{adviceSections:function(){var t=this.report&&this.report.advices||{};return[{key:"food",title:"饮食建议"},{key:"sleep",title:"作息/睡眠"},{key:"sport",title:"运动建议"},{key:"music",title:"音乐疗法"},{key:"treatment",title:"调护/治疗"}].map((function(e){var n=Array.isArray(t[e.key])?t[e.key]:[];return{groupTitle:e.title,list:n}})).filter((function(t){return t.list.length>0}))},sections:function(){var t=this.report||{},e=t.features||[];if(!e.length)return[];var n={};return e.forEach((function(t){var e=t.feature_category||"其他";n[e]||(n[e]=[]),n[e].push(t)})),Object.keys(n).map((function(t){var e=n[t].map((function(t){var e="异常"===t.feature_situation;return{name:t.feature_group||"",value:"".concat(t.feature_name||""," · ").concat(t.feature_situation||""),statusClass:e?"abnormal":"normal",progress:e?55:85,desc:t.feature_interpret||""}})),i=e.some((function(t){return"abnormal"===t.statusClass}));return{title:"".concat(t,"特征"),state:i?"存在异常项":"总体正常",stateClass:i?"warning":"success",isShow:!0,items:e}}))}}),methods:{getReport:function(){var t=this;this.$util.get("tongue_diagnosis/diagnose/detail",{id:this.id}).then((function(e){1==e.code?(t.report=e.data.report,t.gender=e.data.gender,t.detailData=e.data,t.report.score||t.$util.toast("暂无报告",1500,(function(){t.$util.backPage()}))):t.$util.toast(e.message,1500,(function(){t.$util.backPage()}))})).catch((function(e){t.$util.toast(e.message,1500,(function(){t.$util.backPage()}))}))},showBlock:function(t){this.sections[t].isShow=!this.sections[t].isShow,this.$forceUpdate()},showImages:function(){var e=[];this.detailData.tb_image&&e.push(this.detailData.tb_image),this.detailData.tf_image&&e.push(this.detailData.tf_image),this.detailData.ff_image&&e.push(this.detailData.ff_image),0!=e.length?t.previewImage({urls:e}):this.$util.toast("暂无诊断图片",1500)}}};e.default=u}).call(this,n("df3c")["default"])},a564:function(t,e,n){"use strict";n.r(e);var i=n("146a"),r=n("fbd2");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("c505");var o=n("828b"),s=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,"3fc025cb",null,!1,i["a"],void 0);e["default"]=s.exports},be68:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("4c1a");i(n("3240"));var r=i(n("a564"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},c505:function(t,e,n){"use strict";var i=n("32a4"),r=n.n(i);r.a},fbd2:function(t,e,n){"use strict";n.r(e);var i=n("62a2"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a}},[["be68","common/runtime","common/vendor"]]]);