2 lines
5.8 KiB
JavaScript
2 lines
5.8 KiB
JavaScript
import{C as w}from"./element-plus.517d4382.js";import{i as C}from"./echarts.b30ab882.js";import{r as g}from"./index.8b1962e9.js";import{a0 as j,o,c as r,V as y,M as u,W as m,n as P,a as n,a8 as p,U as v}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";function S(s){return g.get({url:"/project.project_statistics/budget",params:s})}function k(s){return g.get({url:"/project.project_statistics/business",params:s})}function B(s){return g.get({url:"/project.project_statistics/contracts",params:s})}const D=n("div",{class:"card-header"},[n("span",null,"\u9879\u76EE\u9884\u7B97\u7EDF\u8BA1")],-1),E=n("div",{id:"ProjectPayment",class:"chart"},null,-1),L=n("div",{class:"card-header"},[n("span",null,"\u5546\u52A1\u5DE5\u4F5C\u7EDF\u8BA1")],-1),N={style:{display:"flex","justify-content":"space-between"}},V={class:"cont"},A=n("div",{class:"card-header"},[n("span",null,"\u5408\u540C\u7EDF\u8BA1")],-1),O={style:{display:"flex","justify-content":"space-between"}},T={class:"cont"},gt={__name:"Statistics",props:{project_id:Number},setup(s){const d=s,a=j([[{name:"\u9879\u76EE\u8DDF\u8FDB",value:0},{name:"\u5BA2\u6237\u9700\u6C42",value:0},{name:"\u89E3\u51B3\u65B9\u6848",value:0},{name:"\u9879\u76EE\u6838\u7B97",value:0},{name:"\u7ADE\u4E89\u5BF9\u624B",value:0}],[{name:"\u6295\u6807\u51B3\u7B56 ",value:0},{name:"\u8D2D\u4E70\u6807\u4E66",value:0},{name:"\u6807\u4E66\u5BA1\u67E5",value:0},{name:"\u6295\u6807\u7ED3\u679C",value:0}],[{name:"\u6295\u6807\u4FDD\u8BC1\u91D1",value:0},{name:"\u5DF2\u9000\u4FDD\u8BC1\u91D1",value:0},{name:"\u672A\u9000\u4FDD\u8BC1\u91D1",value:0}]]),b=async()=>{let t=await k({project_id:d.project_id});a[0][0].value=t.follow_total,a[0][1].value=t.demand_total,a[0][2].value=t.solution_total,a[0][3].value=t.estimate_total,a[0][4].value=t.competitor_total,a[1][0].value=t.decision_total,a[1][1].value=t.document_total,a[1][2].value=t.examination_total,a[1][3].value=t.successful_total,a[2][0].value=t.security_amount,a[2][1].value=t.han_refund_security_amount,a[2][2].value=t.not_refund_security_amount},e=j([[{name:"\u5408\u540C\u91D1\u989D",value:0},{name:"\u5408\u540C\u6D3D\u5546",value:0},{name:"\u7ED3\u7B97\u91D1\u989D",value:0},{name:"\u5DF2\u5F00\u7968",value:0},{name:"\u5DF2\u56DE\u6B3E",value:0},{name:"\u672A\u56DE\u6B3E",value:0},{name:"\u56DE\u6B3E\u6BD4\u4F8B",value:0}],[{name:"\u5206\u5305\u5408\u540C\u91D1\u989D",value:0},{name:"\u5206\u5305\u5408\u540C\u6D3D\u5546",value:0},{name:"\u7ED3\u7B97\u91D1\u989D",value:0},{name:"\u5DF2\u6536\u7968",value:0},{name:"\u5DF2\u4ED8\u6B3E",value:0},{name:"\u672A\u4ED8\u6B3E",value:0},{name:"\u4ED8\u6B3E\u6BD4\u4F8B",value:0}],[{name:"\u6750\u6599\u5408\u540C\u91D1\u989D",value:0},{name:"\u5DF2\u6536\u7968",value:0},{name:"\u5DF2\u4ED8\u6B3E",value:0},{name:"\u672A\u4ED8\u6B3E",value:0},{name:"\u4ED8\u6B3E\u6BD4\u4F8B",value:0}]]),f=async()=>{let t=await B({project_id:d.project_id});e[0][0].value=t.project_contract_amount,e[0][1].value=t.project_negotiation_amount,e[0][2].value=t.project_settlement_amount,e[0][3].value=t.project_invoicing_amount,e[0][4].value=t.project_returned_amount,e[0][5].value=t.project_not_returned_amount,e[0][6].value=t.project_returned_ratio,e[1][0].value=t.subcontracting_contract_amount,e[1][1].value=t.subcontracting_negotiation_amount,e[1][2].value=t.subcontracting_settlement_amount,e[1][3].value=t.subcontracting_invoicing_amount,e[1][4].value=t.subcontracting_payment_amount,e[1][5].value=t.subcontracting_not_payment_amount,e[1][6].value=t.subcontracting_payment_ratio,e[2][0].value=t.procurement_contract_amount,e[2][1].value=t.procurement_invoicing_amount,e[2][2].value=t.procurement_payment_amount,e[2][3].value=t.procurement_not_payment_amount,e[2][4].value=t.procurement_payment_ratio},h={show:!0,rich:{name:{}}},x=(t,_)=>{var l=document.getElementById(t),i=C(l);i.setOption(_)};return(async()=>{let t=await S({project_id:d.project_id});await P();var _={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:[t.series1.name,t.series2.name]},toolbox:{show:!0,orient:"vertical",left:"right",top:"center"},xAxis:[{type:"category",axisTick:{show:!1},data:t.column}],yAxis:[{type:"value"}],series:[{name:t.series1.name,type:"bar",barGap:0,label:h,emphasis:{focus:"series"},data:t.series1.data,itemStyle:{normal:{label:{}}}},{name:t.series2.name,type:"bar",label:h,emphasis:{focus:"series"},data:t.series2.data,itemStyle:{normal:{label:{}}}}]};x("ProjectPayment",_)})(),b(),f(),(t,_)=>{const l=w;return o(),r(m,null,[y(l,null,{header:u(()=>[D]),default:u(()=>[E]),_:1}),y(l,null,{header:u(()=>[L]),default:u(()=>[n("div",N,[(o(!0),r(m,null,p(a,i=>(o(),r("div",{class:"box",key:i},[(o(!0),r(m,null,p(i,c=>(o(),r("div",V,[n("div",null,v(c.name),1),n("div",null,v(c.value),1)]))),256))]))),128))])]),_:1}),y(l,null,{header:u(()=>[A]),default:u(()=>[n("div",O,[(o(!0),r(m,null,p(e,i=>(o(),r("div",{class:"box",key:i},[(o(!0),r(m,null,p(i,c=>(o(),r("div",T,[n("div",null,v(c.name),1),n("div",null,v(c.value),1)]))),256))]))),128))])]),_:1})],64)}}};export{gt as default};
|