Files
aiot-platform-ui/apps/web-antd/dist/js/index-CO5MEbPm.js
lzh 19d36d1ffb
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 8s
chore: build and deploy web-antd
2026-03-09 13:05:46 +08:00

2 lines
9.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var I=Object.defineProperty;var P=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var M=(a,t,e)=>t in a?I(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,y=(a,t)=>{for(var e in t||(t={}))T.call(t,e)&&M(a,e,t[e]);if(P)for(var e of P(t))N.call(t,e)&&M(a,e,t[e]);return a};var C=(a,t,e)=>new Promise((x,f)=>{var b=o=>{try{u(e.next(o))}catch(i){f(i)}},g=o=>{try{u(e.throw(o))}catch(i){f(i)}},u=o=>o.done?x(o.value):Promise.resolve(o.value).then(b,g);u((e=e.apply(a,t)).next())});import{aq as v,bF as U,ar as $,$ as O,av as S}from"./bootstrap-CRjSNGHY.js";import"./vxe-table-uq8U2E1u.js";import{g as V}from"./index-BlYqifN-.js";import{g as R}from"./index-DHLRhwOb.js";import{d9 as E,m as j,b9 as Y,cT as k,dj as q,dk as G,v as W,ab as A,b2 as D,bJ as L,j as d,u as s,ad as X,I as Z,bb as H}from"../jse/index-index-CMeVxoEG.js";import{_ as J}from"./content-wrap.vue_vue_type_script_setup_true_lang-D2NrGcoD.js";import{u as K,_ as Q}from"./use-echarts-C2aELJCl.js";import{_ as z}from"./page.vue_vue_type_script_setup_true_lang-3ywDTU7g.js";import{u as ee}from"./use-vxe-grid-BMVG5Iiw.js";import"./dict-tag.vue_vue_type_script_setup_true_lang-BB6x-AyV.js";function te(a){return v.get("/crm/statistics-performance/get-contract-price-performance",{params:a})}function ae(a){return v.get("/crm/statistics-performance/get-receivable-price-performance",{params:a})}function ne(a){return v.get("/crm/statistics-performance/get-contract-count-performance",{params:a})}const B=(a={})=>y({top:10},a),w=(a={})=>y({left:20,right:20,bottom:20,containLabel:!0},a),oe=(a={})=>y({trigger:"axis",axisPointer:{type:"shadow"}},a);function re(a,t){switch(a){case"ContractCountPerformance":return{grid:w(),legend:B(),series:[{name:"当月合同数量(个)",type:"line",data:t.map(e=>e.currentMonthCount)},{name:"上月合同数量(个)",type:"line",data:t.map(e=>e.lastMonthCount)},{name:"去年同月合同数量(个)",type:"line",data:t.map(e=>e.lastYearCount)},{name:"环比增长率(%",type:"line",yAxisIndex:1,data:t.map(e=>e.lastMonthCount===0?"NULL":((e.currentMonthCount-e.lastMonthCount)/e.lastMonthCount*100).toFixed(2))},{name:"同比增长率(%",type:"line",yAxisIndex:1,data:t.map(e=>e.lastYearCount===0?"NULL":((e.currentMonthCount-e.lastYearCount)/e.lastYearCount*100).toFixed(2))}],toolbox:{feature:{dataZoom:{xAxisIndex:!1},brush:{type:["lineX","clear"]},saveAsImage:{show:!0,name:"客户总量分析"}}},tooltip:oe(),yAxis:[{type:"value",name:"数量(个)",axisTick:{show:!1},axisLabel:{color:"#BDBDBD",formatter:"{value}"},axisLine:{lineStyle:{color:"#BDBDBD"}},splitLine:{show:!0,lineStyle:{color:"#e6e6e6"}}},{type:"value",name:"",axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#BDBDBD",formatter:"{value}%"},axisLine:{lineStyle:{color:"#BDBDBD"}},splitLine:{show:!0,lineStyle:{color:"#e6e6e6"}}}],xAxis:{type:"category",name:"日期",data:t.map(e=>e.time)}};case"ContractPricePerformance":return{grid:w(),legend:B(),series:[{name:"当月合同金额(元)",type:"line",data:t.map(e=>e.currentMonthCount)},{name:"上月合同金额(元)",type:"line",data:t.map(e=>e.lastMonthCount)},{name:"去年同月合同金额(元)",type:"line",data:t.map(e=>e.lastYearCount)},{name:"环比增长率(%",type:"line",yAxisIndex:1,data:t.map(e=>e.lastMonthCount===0?"NULL":((e.currentMonthCount-e.lastMonthCount)/e.lastMonthCount*100).toFixed(2))},{name:"同比增长率(%",type:"line",yAxisIndex:1,data:t.map(e=>e.lastYearCount===0?"NULL":((e.currentMonthCount-e.lastYearCount)/e.lastYearCount*100).toFixed(2))}],toolbox:{feature:{dataZoom:{xAxisIndex:!1},brush:{type:["lineX","clear"]},saveAsImage:{show:!0,name:"客户总量分析"}}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},yAxis:[{type:"value",name:"金额(元)",axisTick:{show:!1},axisLabel:{color:"#BDBDBD",formatter:"{value}"},axisLine:{lineStyle:{color:"#BDBDBD"}},splitLine:{show:!0,lineStyle:{color:"#e6e6e6"}}},{type:"value",name:"",axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#BDBDBD",formatter:"{value}%"},axisLine:{lineStyle:{color:"#BDBDBD"}},splitLine:{show:!0,lineStyle:{color:"#e6e6e6"}}}],xAxis:{type:"category",name:"日期",data:t.map(e=>e.time)}};case"ReceivablePricePerformance":return{grid:w(),legend:B(),series:[{name:"当月回款金额(元)",type:"line",data:t.map(e=>e.currentMonthCount)},{name:"上月回款金额(元)",type:"line",data:t.map(e=>e.lastMonthCount)},{name:"去年同月回款金额(元)",type:"line",data:t.map(e=>e.lastYearCount)},{name:"环比增长率(%",type:"line",yAxisIndex:1,data:t.map(e=>e.lastMonthCount===0?"NULL":((e.currentMonthCount-e.lastMonthCount)/e.lastMonthCount*100).toFixed(2))},{name:"同比增长率(%",type:"line",yAxisIndex:1,data:t.map(e=>e.lastYearCount===0?"NULL":((e.currentMonthCount-e.lastYearCount)/e.lastYearCount*100).toFixed(2))}],toolbox:{feature:{dataZoom:{xAxisIndex:!1},brush:{type:["lineX","clear"]},saveAsImage:{show:!0,name:"客户总量分析"}}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},yAxis:[{type:"value",name:"金额(元)",axisTick:{show:!1},axisLabel:{color:"#BDBDBD",formatter:"{value}"},axisLine:{lineStyle:{color:"#BDBDBD"}},splitLine:{show:!0,lineStyle:{color:"#e6e6e6"}}},{type:"value",name:"",axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#BDBDBD",formatter:"{value}%"},axisLine:{lineStyle:{color:"#BDBDBD"}},splitLine:{show:!0,lineStyle:{color:"#e6e6e6"}}}],xAxis:{type:"category",name:"日期",data:t.map(e=>e.time)}};default:return{}}}const le=U(),ie=[{tab:"员工合同数量统计",key:"ContractCountPerformance"},{tab:"员工合同金额统计",key:"ContractPricePerformance"},{tab:"员工回款金额统计",key:"ReceivablePricePerformance"}];function se(){var a;return[{fieldName:"time",label:"选择年份",component:"DatePicker",componentProps:{picker:"year",format:"YYYY",valueFormat:"YYYY",placeholder:"请选择年份"},defaultValue:new Date().getFullYear().toString()},{fieldName:"deptId",label:"归属部门",component:"ApiTreeSelect",componentProps:{api:()=>C(null,null,function*(){const t=yield V();return E(t)}),labelField:"name",valueField:"id",childrenField:"children",treeDefaultExpandAll:!0,placeholder:"请选择归属部门"},defaultValue:(a=le.userInfo)==null?void 0:a.deptId},{fieldName:"userId",label:"员工",component:"ApiSelect",componentProps:{api:R,labelField:"nickname",valueField:"id",placeholder:"请选择员工",allowClear:!0}}]}const ge=j({__name:"index",setup(a){const t=Y("ContractCountPerformance"),e=Y(),{renderEcharts:x}=K(e),[f,b]=$({commonConfig:{componentProps:{class:"w-full"}},schema:se(),showCollapseButton:!0,submitButtonOptions:{content:O("common.query")},wrapperClass:"grid-cols-1 md:grid-cols-2",handleSubmit:()=>C(null,null,function*(){yield o(t.value)})}),[g,u]=ee({gridOptions:{columns:[],height:"auto",keepSource:!0,pagerConfig:{enabled:!1},proxyConfig:{enabled:!1},rowConfig:{keyField:"id",isHover:!0},toolbarConfig:{enabled:!1}}});function o(i){return C(this,null,function*(){t.value=i;const r=yield b.getValues(),c=Number.parseInt(r.time);r.times=[],r.times[0]=k(q(new Date(c,0,1))),r.times[1]=k(G(new Date(c,11,31)));let p=[];const h=[];let l=[];switch(i){case"ContractCountPerformance":{l=[{title:"当月合同数量统计(个)"},{title:"上月合同数量统计(个)"},{title:"去年当月合同数量统计(个)"},{title:"环比增长率(%"},{title:"同比增长率(%"}],p=yield ne(r);break}case"ContractPricePerformance":{l=[{title:"当月合同金额统计(元)"},{title:"上月合同金额统计(元)"},{title:"去年当月合同金额统计(元)"},{title:"环比增长率(%"},{title:"同比增长率(%"}],p=yield te(r);break}case"ReceivablePricePerformance":{l=[{title:"当月回款金额统计(元)"},{title:"上月回款金额统计(元)"},{title:"去年当月回款金额统计(元)"},{title:"环比增长率(%"},{title:"同比增长率(%"}],p=yield ae(r);break}}const F={title:"日期",field:"title",minWidth:200,align:"left"};h.splice(0),h.push(F),p.forEach((n,m)=>{const _={title:n.time,field:`field${m}`};h.push(_),l[0][`field${m}`]=n.currentMonthCount,l[1][`field${m}`]=n.lastMonthCount,l[2][`field${m}`]=n.lastYearCount,l[3][`field${m}`]=n.lastMonthCount===0?"NULL":((n.currentMonthCount-n.lastMonthCount)/n.lastMonthCount*100).toFixed(2),l[4][`field${m}`]=n.lastYearCount===0?"NULL":((n.currentMonthCount-n.lastYearCount)/n.lastYearCount*100).toFixed(2)}),yield x(re(i,p),!0),yield u.grid.reloadColumn(h),yield u.grid.reloadData(l)})}return W(()=>{o(t.value)}),(i,r)=>(D(),A(s(z),{"auto-content-height":""},{default:L(()=>[d(s(J),null,{default:L(()=>[d(s(f)),d(s(S),{"active-key":t.value,"onUpdate:activeKey":r[0]||(r[0]=c=>t.value=c),class:"w-full",onChange:o},{default:L(()=>[(D(!0),X(Z,null,H(s(ie),c=>(D(),A(s(S).TabPane,{key:c.key,tab:c.tab,"force-render":!0},null,8,["tab"]))),128))]),_:1},8,["active-key"]),d(s(Q),{class:"mb-20 h-full w-full",ref_key:"chartRef",ref:e},null,512),d(s(g),{class:"min-h-[400px]"})]),_:1})]),_:1}))}});export{ge as default};