1 |
- var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,i=(t,s,a)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,u=(e,t)=>{for(var s in t||(t={}))n.call(t,s)&&i(e,s,t[s]);if(a)for(var s of a(t))o.call(t,s)&&i(e,s,t[s]);return e},r=(e,a)=>t(e,s(a));import{_ as c}from"./plugin-vue_export-helper.44898cd3.js";import{o as l,c as h,m as p,d,h as f,H as m,T as y,a as g}from"./vendor.f6a75447.js";import{B as v}from"./Loading.0da0e019.js";const x={xian:1.375*Math.PI,fu:1.625*Math.PI,fu2:1.75*Math.PI,hua:1.875*Math.PI,chi:2.125*Math.PI,ruan:2.375*Math.PI,chen:2.625*Math.PI,chen2:2.75*Math.PI,xi:2.875*Math.PI,shu:3.125*Math.PI,shu2:3.25*Math.PI,kong:0,shi:0},k={shu:[0,0],chi:[0,0],hua:[0,0],xi:[0,0],xian:[0,0],ruan:[0,0],fu:[0,0],chen:[0,0],kong:[0,0],shi:[0,0]},b={cun:"rgba(255, 50, 51, 1)",guan:"rgba(255, 152, 0, 1)",chi:"rgba(32, 178, 41, 1)"},j=[{key:"xian",title:["弦","软"],value:50},{key:"hua",title:["滑","细"],value:50},{key:"fu",title:["浮","沉"],value:50},{key:"shu",title:["数","迟"],value:50},{key:"kong",title:["空","实"],value:50}],_={mai:"",value:{xian:50,hua:50,fu:50,shu:50,kong:50}},P={cun:_,guan:_,chi:_},I={shu:"",hua:"",xian:"",fu:"",kong:""},O={};j.forEach((e=>{O[e.key]=[...e.title]}));const M=O,w=[{title:"寒",key:"chill"},{title:"热",key:"fever"},{title:"湿",key:"dampness"},{title:"风",key:"feng"},{title:"饮",key:"phlegm"},{title:"痰",key:"tan"},{title:"气结",key:"qijie"},{title:"淤血",key:"yuxue"}],E={qi:4,blood:4,fluids:4,humor:4},T={qi:4,blood:4,fluids:4,humor:4},$=e=>{const t={title:[],desc:[]};return e?(e.forEach((e=>{t.title.push(e.name_cn),t.desc.push(e.explaination_cn)})),t):t},q={new_food_propose:"饮食",new_sport_propose:"运动",other_propose:"生活"},S=e=>{const t=["qi","blood","fluids","humor"],s={level:Object.assign({},T),text:[],desc:[]};for(const n of t){const t=e[n];t&&(s.level[n]=(a=t.score)<50?7:a>=50&&a<80?6:a>=80&&a<90?5:a>=90&&a<=110?4:a>110&&a<120?3:a>=120&&a<150?2:a>=150?1:4,s.text.push(t.text),s.desc.push(t.desc))}var a;return s},B=e=>{const t=["phlegm","dampness","chill","fever"],s={value:[],text:[],desc:[]};for(const a of t){const t=e[a];t&&(t.score>0&&(s.value.push(a),s.desc.push(t.desc)),t.text&&s.text.push(t.text))}return s},L=e=>{const t=["new_food_propose","new_sport_propose","other_propose"],s=[];for(const a of t){const t=e[a];t&&t[a]&&s.push({title:q[a],desc:t[a]})}return s},z=e=>{const t={text:[],desc:[]};return e.desc&&(t.text=[...e.desc.desc]),e.desc_detail&&(t.desc=[...e.desc_detail.desc_detail]),t},C=e=>{const t=[];return["taiyang","yangming","shaoyang","shaoyin","jueyin","taiyin"].forEach((s=>{e[s]&&t.push({key:s,text:e[s]})})),t},D={shu:"",hua:"",xian:"",fu:"",kong:""},H=(e,t,s)=>{const a=(e=>{const t={shu:0,chi:0};return e>180?t.shu=6:e<=180&&e>150?t.shu=5:e<=150&&e>130?t.shu=4:e<=130&&e>110?t.shu=3:e<=110&&e>100?t.shu=2:e<=100&&e>=90?t.shu=1:e<90&&e>60?(t.shu=0,t.chi=0):e<=60&&e>50?t.chi=1:e<=50&&e>45?t.chi=2:e<=45&&(t.chi=3),t})(t),n={};let o={shu:0,chi:0,hua:0,xi:0,xian:0,ruan:0,fu:0,chen:0,kong:0,shi:0};const i=[["shu","chi"],["hua","xi"],["xian","ruan"],["fu","chen"],["kong","shi"]],u=e.xian[0]>e.ruan[0]||e.xian[0]===e.ruan[0]&&e.xian[1]>e.ruan[1],r=a.shu>0;for(const p in e){const t=p;o[t]=e[t][0]}o=Object.assign(Object.assign({},o),a);const c=Object.assign({},D);let l=0;for(const p of i){const e=p[0],t=p[1],s=o[e]-o[t];s>0?(n[e]={level:o[e],division:!1},c[e]="left"):s<0?(c[e]="right",n[t]={level:o[t],division:!1}):(l++,n[e]={level:o[e],division:!1},n[t]={level:o[t],division:!1})}l===i.length&&delete n.hua,n.shu&&(n.shu.division=u),n.fu&&(n.fu.division=!r),n.chen&&(n.chen.division=u);const h={};return s.forEach((e=>{for(const t in n){if(0===n[t].level)continue;let s="";"shu"===t&&u&&(s="2"),"chen"!==t||u||(s="2"),h[`${t}${s}_${e.key}`]=!0}})),{mais:n,duadMai:c,lj:h}};const N={},X={class:"loading-component"},A=[p("div",null,[p("div",{class:"icon-loading"}),p("p",null,"渲染中...")],-1)];var F=c(N,[["render",function(e,t){return l(),h("div",X,A)}]]);const G=e=>null!==e&&"object"==typeof e,J=(e,t=200)=>e?e.includes("aliyun")?`${e}?x-oss-process=image/resize,h_${t}`.replace(/https:|http:/,""):e:"",K=d({name:"Toast",props:{duration:{type:Number,default:2e3},mask:{type:Boolean,default:!0},message:{type:String,default:""},type:{type:String,default:"text"}},setup(e){const t=f(!0);return()=>{let s;return clearTimeout(s),s=setTimeout((()=>{t.value=!1}),e.duration),m(y,{name:"fade"},{default:()=>m(v,{mask:e.mask,message:e.message,type:e.type,visible:t.value})})}}}),Q={duration:2e3,mask:!0,message:"",type:"text"},R=(e,t)=>{const s=u({},((e,t)=>G(e)?r(u(u({},Q),e),{type:t}):r(u({},Q),{message:e,type:t}))(t,e));["success","fail","text"].includes(s.type)||(s.type="text");const a=s.duration,n=document.createElement("div");n.style.display="block",n.style.color="white",document.body.appendChild(n);const o=g(K,{duration:a,mask:(null==s?void 0:s.mask)||!0,message:(null==s?void 0:s.message)||"",type:null==s?void 0:s.type});o.mount(n),setTimeout((()=>{o.unmount(),n.remove()}),a+300)},U=e=>t=>{R(e,t)},V=e=>{G(e)?R(e.type,e):R(Q.type,e)};V.success=U("success"),V.fail=U("fail"),V.text=U("text");const W=(e,t={cun:"",guan:"",chi:"",summary:[]})=>{const s={branch:u({},P),total:""};if(!e)return s;return["cun","guan","chi"].forEach((a=>{s.branch[a]={mai:(t[a]||"").replace(/,/g,"、"),value:e[a]||""}})),s.total=(t.summary||[]).join(" "),s},Y=e=>{if(!e)return;const t=e.split("-");return 3===t.length?{name:t[0],mac:t[2],v:`${parseInt(t[1])}.X`}:void 0},Z=e=>({0:"左手",1:"右手",2:"总体"}[e]||"");export{F as L,V as T,M as a,P as b,Z as c,I as d,C as e,W as f,H as g,w as h,$ as i,S as j,B as k,L as l,z as m,Y as n,J as o,x as p,E as q,_ as r,k as s,b as t,j as u};
|