CRMEB/backend/public/admin/system_static/codeStatistic-Ct6__wKR.js
2026-09-23 16:10:21 +08:00

2 lines
2.9 KiB
JavaScript

import{s as C,y as v,z as L,j as f,W as _,B as x,H as b,C as V,l as n,u as N,k as g,A as w}from"./element-plus-C_ZDq0cz.js";import{_ as T,S as j,b as I}from"./index-DHL7RTL2.js";import{c as P}from"./cards-kFTwJ5CA.js";import{_ as U}from"./index-K7mJi7Sh.js";import{wechatQrcodeStatistic as Q}from"./api-DA9KG23L.js";import{f as D}from"./validate-a11VBqc7.js";import"./echarts-CylxjQLW.js";import"./monaco-editor-uXAv8CL-.js";import"./form-create-7SMPLzS9.js";import"./vxe-CHB4XD1z.js";import"./echarts-C6m23LPs.js";const $={class:"table-head"},q=Object.assign({name:"index"},{__name:"codeStatistic",setup(z){const k=I(),S=j.routePre,a=n([]),A={height:"400px"},c=n({time:""}),d=n([{col:6,count:0,name:"昨日新增关注",className:"md-rose"},{col:6,count:0,name:"昨日参与",className:"ios-speedometer-outline"},{col:6,count:0,name:"总关注",className:"ios-speedometer-outline"},{col:6,count:0,name:"参与总人数",className:"md-rose"}]),m=n({}),u=n(!1),B=k.query.id,y=new Date,r=new Date;r.setTime(r.setTime(new Date(new Date().getFullYear(),new Date().getMonth(),new Date().getDate()-29))),a.value=[r,y],c.value.time=D(r,"yyyy/MM/dd")+"-"+D(y,"yyyy/MM/dd"),h();function h(){Q(B,c.value).then(e=>{let t=["y_follow","y_scan","all_follow","all_scan"];d.value.map((l,s)=>{l.count=e.data[t[s]]}),M(e.data.trend.series,e.data.trend.xAxis)})}function F(e){a.value=e,c.value.time=a.value?a.value.join("-"):"",h()}function M(e,t){u.value=!0;let l=e.map(o=>o.name),s=t,p=["#5B8FF9","#5AD8A6","#FFAB2B","#5D7092"],i=[];e.map((o,Y)=>{i.push({name:o.name,type:"line",data:o.data,itemStyle:{normal:{color:p[Y]}},smooth:0})}),m.value={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"center",data:l},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!0,axisLabel:{interval:0,rotate:40,textStyle:{color:"#000000"}},data:s},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}},series:i},u.value=!1}return(e,t)=>{const l=g("pages-header"),s=g("date-range-picker"),p=g("el-card"),i=N("loading");return C((v(),L("div",null,[f(l,{title:e.$route.meta.title,backUrl:_(S)+"/marketing/channel_code/channelCodeIndex"},null,8,["title","backUrl"]),d.value.length>=0?(v(),x(_(P),{key:0,class:"mt16",cardLists:d.value},null,8,["cardLists"])):b("",!0),f(p,{bordered:!1,shadow:"never",class:"ivu-mt"},{default:V(()=>[w("div",$,[t[1]||(t[1]=w("h3",null,"关注趋势",-1)),f(s,{editable:!1,clearable:"",onChange:F,modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=o=>a.value=o),format:"YYYY/MM/DD","value-format":"YYYY/MM/DD","range-separator":"-",class:"mr20"},null,8,["modelValue"])]),m.value?(v(),x(_(U),{key:0,"option-data":m.value,styles:A,height:"100%",width:"100%"},null,8,["option-data"])):b("",!0)]),_:1})])),[[i,u.value]])}}}),te=T(q,[["__scopeId","data-v-5b73d27a"]]);export{te as default};