PageSourceSearch

https://mhtclouding.com/tongying/assets/index-CnASXpxW.js

js mhtclouding.com collected 2026-10-02 16:03:09 UTC 5,408 bytes, 1 lines download raw bytes

1import{i as E}from"./index-Ddg5t14L.js";import{B as O,_ as V,r as p,z as m,C as B,D as F,d as G,F as J,G as U,o,c,e,p as D,A as n,H as y,I as f,n as k,f as $,h as W,J as j,K as A,L as H,s as K,t as q}from"./index-uGWb9Yh4.js";function Q(){return O({url:"/crm/dashboard/overview",method:"get"})}const u=v=>(K("data-v-32623aa6"),v=v(),q(),v),X={class:"screen"},Y=u(()=>e("div",null,[e("p",null,"CRM COMMAND CENTER"),e("h1",null,"客户经营数据大屏")],-1)),Z=u(()=>e("i",null,null,-1)),ee={class:"metrics"},te={class:"grid"},le={class:"panel trend"},ne=u(()=>e("div",{class:"title"},[e("div",null,[e("p",null,"增长趋势"),e("h2",null,"客户与合同金额走势")]),e("span",null,"近 6 个月")],-1)),ae={class:"panel source"},se=u(()=>e("div",{class:"title"},[e("div",null,[e("p",null,"客户洞察"),e("h2",null,"客户来源分布")])],-1)),oe={class:"panel plans"},ce=u(()=>e("div",{class:"title"},[e("div",null,[e("p",null,"跟进状态"),e("h2",null,"客户推进阶段")])],-1)),re={key:0,class:"empty"},ie={class:"panel contracts"},ue={class:"title"},de=u(()=>e("div",null,[e("p",null,"业务动态"),e("h2",null,"最新合同")],-1)),pe=u(()=>e("i",null,null,-1)),ve={key:0,class:"empty"},_e={__name:"index",setup(v){const _=p(!0),b=p(""),i=p({summary:{},clientSources:[],clientPlans:[],monthlyTrend:[],recentContracts:[]}),g=p(),x=p();let a,s;const h=t=>(Number(t||0)/1e4).toFixed(1),N=t=>`${h(t)} 万`,T=m(()=>{const t=i.value.summary||{};return[{label:"有效客户",value:t.clientCount||0,unit:"家",note:`本月新增 ${t.newClientCount||0} 家`,icon:"客",tone:"blue"},{label:"合同总数",value:t.contractCount||0,unit:"份",note:`待审批 ${t.pendingContractCount||0} 份`,icon:"合",tone:"orange"},{label:"合同总额",value:h(t.contractAmount),unit:"万",note:"累计有效合同金额",icon:"金",tone:"green"},{label:"往来邮件",value:t.emailCount||0,unit:"封",note:"客户沟通沉淀",icon:"邮",tone:"purple"}]}),C=m(()=>{const t=i.value.clientPlans||[],r=Math.max(...t.map(d=>Number(d.value)),1);return t.map(d=>({...d,percent:Math.round(Number(d.value)/r*100)}))}),w=m(()=>i.value.recentContracts||[]),I=t=>({APPROVED:"已通过",APPROVING:"审批中",SUBMITTED:"已提交",REJECTED:"已驳回",DRAFT:"草稿"})[t]||"待处理",L=t=>({APPROVED:"ok",APPROVING:"wait",SUBMITTED:"wait",REJECTED:"no"})[t]||"draft";function P(){const t=i.value.monthlyTrend||[];a==null||a.dispose(),s==null||s.dispose(),a=E(g.value),s=E(x.value),a.setOption({grid:{left:42,right:45,top:28,bottom:25},tooltip:{trigger:"axis"},legend:{right:0,textStyle:{color:"#65758c"}},xAxis:{type:"category",data:t.map(r=>r.month),axisLabel:{color:"#8190a3"},axisLine:{lineStyle:{color:"#dce5ef"}}},yAxis:[{type:"value",axisLabel:{color:"#8190a3"},splitLine:{lineStyle:{type:"dashed",color:"#e9eff5"}}},{type:"value",axisLabel:{color:"#8190a3",formatter:"{value}万"},splitLine:{show:!1}}],series:[{name:"新增客户",type:"bar",data:t.map(r=>r.clientCount),barWidth:17,itemStyle:{color:"#3790f4",borderRadius:[5,5,0,0]}},{name:"合同金额",type:"line",yAxisIndex:1,smooth:!0,data:t.map(r=>h(r.contractAmount)),lineStyle:{color:"#f39b3d",width:3},itemStyle:{color:"#f39b3d"},areaStyle:{color:"rgba(243,155,61,.12)"}}]}),s.setOption({tooltip:{trigger:"item"},legend:{bottom:0,icon:"circle",textStyle:{color:"#65758c"}},color:["#368cf2","#32bf97","#f2b44b","#8573e6","#ee788b","#47b8c4"],series:[{type:"pie",radius:["48%","72%"],center:["50%","43%"],label:{show:!1},itemStyle:{borderColor:"#fff",borderWidth:4},data:i.value.clientSources||[]}]})}async function R(){_.value=!0;try{const t=await Q();i.value=t.data||i.value}finally{_.value=!1,await j(),P()}}const S=()=>{a==null||a.resize(),s==null||s.resize()};return B(()=>{b.value=new Date().toLocaleString("zh-CN",{hour12:!1}).replace(/\//g,"."),R(),window.addEventListener("resize",S)}),F(()=>{window.removeEventListener("resize",S),a==null||a.dispose(),s==null||s.dispose()}),(t,r)=>{const d=G("router-link"),z=J("loading");return U((o(),c("main",X,[e("header",null,[Y,e("aside",null,[Z,D("数据实时汇总 "+n(b.value),1)])]),e("section",ee,[(o(!0),c(y,null,f(T.value,l=>(o(),c("article",{key:l.label},[e("b",{class:A(l.tone)},n(l.icon),3),e("div",null,[e("p",null,n(l.label),1),e("strong",null,n(l.value),1),e("small",null,n(l.unit),1),e("em",null,n(l.note),1)])]))),128))]),e("section",te,[e("article",le,[ne,e("div",{ref_key:"trendEl",ref:g,class:"chart"},null,512)]),e("article",ae,[se,e("div",{ref_key:"sourceEl",ref:x,class:"chart"},null,512)]),e("article",oe,[ce,(o(!0),c(y,null,f(C.value,(l,M)=>(o(),c("div",{key:l.name,class:"plan"}
1,[e("span",null,"0"+n(M+1),1),e("label",null,n(l.name),1),e("i",null,[e("b",{style:H({width:l.percent+"%"})},null,4)]),e("strong",null,n(l.value),1)]))),128)),C.value.length?k("",!0):(o(),c("div",re,"暂无客户阶段数据"))]),e("article",ie,[e("div",ue,[de,$(d,{to:"/contract/contractlist"},{default:W(()=>[D("查看全部")]),_:1})]),(o(!0),c(y,null,f(w.value,l=>(o(),c("div",{key:l.contractId,class:"contract"},[pe,e("div",null,[e("b",null,n(l.subject||"未命名合同"),1),e("span",null,n(l.customerName||"未关联客户"),1)]),e("strong",null,n(N(l.finalAmount)),1),e("em",{class:A(L(l.approveStatus))},n(I(l.approveStatus)),3)]))),128)),w.value.length?k("",!0):(o(),c("div",ve,"暂无合同记录"))])])])),[[z,_.value]])}}},ye=V(_e,[["__scopeId","data-v-32623aa6"]]);export{ye as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.