| 1 |
- var x=(E,f,m)=>new Promise((k,_)=>{var b=l=>{try{g(m.next(l))}catch(d){_(d)}},y=l=>{try{g(m.throw(l))}catch(d){_(d)}},g=l=>l.done?k(l.value):Promise.resolve(l.value).then(b,y);g((m=m.apply(E,f)).next())});import{_ as Q}from"./componentMap-61ccdbb2.js";import{u as U}from"./useForm-bff27c7a.js";import"./FormItem.vue_vue_type_script_lang-39d09a3e.js";import{P as H}from"./ImportModal.vue_vue_type_style_index_0_scoped_375ed303_lang-fdd1625c.js";import"./index-4f5bc708.js";import{l as W}from"./index-a4e1ec38.js";import{ak as I,m as X,_ as ee}from"./index.js";import{a as O,b as te}from"./suppliesStatsApi-d9d19543.js";import{u as F,_ as R}from"./useTable-98d6d579.js";import{m as ae,d as se,f as i,o as oe,Y as p,Z as u,_ as C,l as t,u as e,a7 as o,$ as w,a9 as c,F as D,E as P}from"./vue-aed314e3.js";import{S as le,B as ne,a5 as v,a6 as V}from"./antd-f259b82a.js";import z from"./pie-28422db8.js";import"./index-7fe9c1e2.js";import"./index-6811a03f.js";import"./useFormItem-421691fe.js";import"./uuid-31b8b5a4.js";import"./useSortable-7d2b6665.js";import"./download-2ecc6b15.js";import"./copyTextToClipboard-328ee3b1.js";import"./TextEditor-4892fcd0.js";import"./onMountedOrActivated-d9097634.js";import"./useWindowSizeFn-6e9d633b.js";import"./useForm-c7f42ee0.js";import"./componentMap-175d8229.js";import"./sortable.esm-4ae27e0b.js";import"./useECharts-947e808e.js";const ie=[{title:"耗材类型",dataIndex:"type",align:"left"},{title:"数量",dataIndex:"sum",align:"left"},{title:"占比",dataIndex:"proportion",align:"left"}],re=[{title:"耗材厂商",dataIndex:"type",align:"left"},{title:"数量",dataIndex:"sum",align:"left"},{title:"占比",dataIndex:"proportion",align:"left"}],pe=[{title:"药品名称",dataIndex:"type",align:"left"},{title:"数量",dataIndex:"sum",align:"left"},{title:"占比",dataIndex:"proportion",align:"left"}],ue=[{field:"searchNames",component:"Input",componentProps:{placeholder:"请输入设备编号"},renderComponentContent:()=>({prefix:()=>ae(le)})}],me={class:"flex items-center xt-form"},de={class:"flex"},ce={class:"mb-4"},fe={key:0},_e={class:"mb-4"},ye=["onClick"],ge={key:0},he=se({__name:"index",setup(E){const f=i("耗材类型统计"),m=i("耗材厂商统计"),k=i({}),_=i({}),b=i([]),y=i([]),g=i([]),l=i([]),d=i(""),[L,{getFieldsValue:A}]=U({schemas:ue,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),[Y,{setTableData:Z}]=F({showIndexColumn:!1,bordered:!0,striped:!1,showSummary:!0,summaryFunc:$,pagination:!1,maxHeight:400,dataSource:b.value,columns:ie}),[j,{setTableData:q}]=F({showIndexColumn:!1,bordered:!0,showSummary:!0,summaryFunc:$,striped:!1,pagination:!1,maxHeight:400,dataSource:y.value,columns:re}),[G,{setTableData:N}]=F({showIndexColumn:!1,bordered:!0,striped:!1,pagination:!1,maxHeight:400,dataSource:g.value,columns:pe}),T=i();oe(()=>x(this,null,function*(){T.value=yield W({dictCode:"ct"}),B()}));function J(){return x(this,null,function*(){l.value=A().patrolTime||[],B()})}function B(){return x(this,null,function*(){const n={statsTime:l.value},r=yield O(n);b.value=r.data,yield Z(r.data);const a={content:[],description:f.value};r.data.forEach(h=>{a.content.push({name:I(T.value,h.type,"label"),value:h.sum})}),k.value=a;const s=yield te(n);y.value=s.data,yield q(s.data);const S={content:[],description:f.value};s.data.forEach(h=>{S.content.push({name:h.type,value:h.sum})}),_.value=S,M(y.value[0])})}function K(){console.log("下载按钮")}function M(n){return x(this,null,function*(){if(n){const r={statsTime:l.value,makers:n.type},a=yield O(r);d.value=n.type,yield N(a.data)}else yield N([])})}function $(n){console.log(n);let r=0,a=0;return n.forEach(s=>{r+=s.sum,a+=parseFloat(parseFloat(s.proportion.split("%")[0]).toFixed(2))}),[{type:"合计",sum:r,proportion:a+"%"}]}return(n,r)=>(p(),u(D,null,[C("div",me,[C("div",de,[t(e(Q),{onRegister:e(L),onFieldValueChange:J,style:{width:"240px"},class:"mr-2"},null,8,["onRegister"])]),t(e(ne),{type:"default",onClick:K,style:{height:"38px","margin-top":"-8px"}},{default:o(()=>[t(X,{icon:"icon-xt-download-download_default|iconfont",size:14})]),_:1})]),C("div",ce,[t(e(H),{title:f.value},null,8,["title"])]),t(e(V),{style:{"max-height":"400px"}},{default:o(()=>[t(e(v),{span:16},{default:o(()=>[t(z,{data:k.value},null,8,["data"])]),_:1}),t(e(v),{span:8},{default:o(()=>[t(e(R),{onRegister:e(Y)},{bodyCell:o(({column:a,record:s})=>[a.key==="type"?(p(),u("span",fe,w(e(I)(T.value,s.type,"label")),1)):c("",!0)]),_:1},8,["onRegister"])]),_:1})]),_:1}),C("div",_e,[t(e(H),{title:m.value},null,8,["title"])]),t(e(V),{style:{"max-height":"400px"}},{default:o(()=>[t(e(v),{span:16},{default:o(()=>[t(z,{data:_.value},null,8,["data"])]),_:1}),t(e(v),{span:8},{default:o(()=>[t(e(R),{onRegister:e(j)},{bodyCell:o(({column:a,record:s})=>[a.key==="sum"?(p(),u("a",{key:0,onClick:S=>M(s)},w(s.sum),9,ye)):c("",!0)]),_:1},8,["onRegister"])]),_:1})]),_:1}),t(e(V),{style:{"max-height":"200px"}},{default:o(()=>[t(e(v),{span:24},{default:o(()=>[t(e(R),{onRegister:e(G)},{headerCell:o(({column:a})=>[a.key==="type"?(p(),u(D,{key:0},[P(w(d.value),1)],64)):c("",!0),a.key==="sum"?(p(),u(D,{key:1},[P(" 数量 ")],64)):c("",!0),a.key==="proportion"?(p(),u(D,{key:2},[P(" 占比 ")],64)):c("",!0)]),bodyCell:o(({column:a,record:s})=>[a.key==="type"?(p(),u("span",ge,w(e(I)(T.value,s.type,"label")),1)):c("",!0)]),_:1},8,["onRegister"])]),_:1})]),_:1})],64))}});const qe=ee(he,[["__scopeId","data-v-15dee191"]]);export{qe as default};
|