猎羽广告

index.DRVV5gx5.js 8.0KB

12
  1. import{E as e,k as a,M as t,v as s,O as l,o as r,B as o,C as i,A as n,U as d}from"../element-plus/element-plus.DqqeXZzT.js";import{A as p}from"../api/api.BtQEnbVN.js";import{j as u,h as c,_ as m,o as f,g as v}from"../../assets/index-DYMYfyXS.js";import{r as _,Y as y,d as g,L as k,c as h,a as b,T as j,K as x,o as w,J as I,U as P,a9 as R,O as M,$ as z,S as L,Q as C,R as K,u as O,M as T,ba as E,b8 as F,E as S,n as D}from"../@vue/@vue.lccsL1Mu.js";import{S as U}from"../_select/_select.DVQW4rAo.js";import{a as N,_ as Y}from"../caret-top/caret-top.BxG-YGIs.js";import{_ as V}from"../question-filled/question-filled.CpBGPdbF.js";import{l as A}from"../list/list.W6MLSjHS.js";import{e as B}from"../index/index.vPeoHBQC.js";import"../lodash-es/lodash-es.LxYfApIs.js";import"../async-validator/async-validator.DSgsWN2H.js";import"../@vueuse/@vueuse.D2YafqsA.js";import"../dayjs/dayjs.D4rZQhfm.js";import"../axios/axios.CUN3se9v.js";import"../@ctrl/@ctrl.D2oWfImC.js";import"../@popperjs/@popperjs.D3lHDW-0.js";import"../escape-html/escape-html.J6B7JOz4.js";import"../normalize-wheel-es/normalize-wheel-es.Erkn7R64.js";import"../vue-router/vue-router.D86bYXwF.js";import"../pinia/pinia.DodrAXQg.js";import"../vue-demi/vue-demi.Dq6ymT-8.js";import"../pinia-plugin-persist/pinia-plugin-persist.Cjrd7Wf_.js";import"../@element-plus/@element-plus.BWbqilIf.js";import"../echarts/echarts.C_nC9ACL.js";import"../tslib/tslib.DduEQve-.js";import"../zrender/zrender.XYf_pgl8.js";const q={class:"table_container"},H={class:"tableTop"},J=(e=>(E("data-v-2a6a7343"),e=e(),F(),e))((()=>b("div",{class:"title"},null,-1))),W=K("导出数据"),$={key:1,class:"sortBox lMar5 pointer"},G=["onClick"],Q=["onClick"],X={key:0},Z=["src"],ee={key:1},ae=["title"],te={class:"clampTwo line21",style:{flex:"1"}},se={key:0},le={key:0,class:"paginationBox flex",style:{"justify-content":"center"}},re=m(g({__name:"dataList",props:{mainPageInfo:{type:Object,default:()=>{}}},setup(d,{expose:m}){const v=d;_();const g=_(),E=_(!1),F=y({tableList:[],descol:[],summary:[],sortKey:"",currentPage:1,pageSize:20,total:0,totalPages:0,sortType:"desc",updateKey:1}),S=(e,a)=>{F.sortType=a,F.sortKey=e,re(1)},D=e=>{F.currentPage=e,re(e)},U=async()=>{E.value=!0;let a={page:1,page_size:1e3,start_date:v.mainPageInfo.time[0],end_date:v.mainPageInfo.time[1],has_cost:v.mainPageInfo.has_cost,promoter_id:v.mainPageInfo.promoter_id,advertiser_name:v.mainPageInfo.keyword},t=await c.get(p.oe_promoter_data_report_list,a);if(E.value=!1,t&&"0"==t.errNo){let e=t.rst.data.list,a=t.rst.data?.explain,s=a.map((e=>e.label)),l=a.map((e=>e.key_value));B({excelDatas:[{tHeader:s,filterVal:l,tableDatas:e,sheetName:""}],name:`数据报表(导出时间:${u(0)})`})}else e.error(t.errMsg)},re=async(a,t)=>{E.value=!0;let s={page:a||F.currentPage,page_size:t||F.pageSize,start_date:v.mainPageInfo.time[0],end_date:v.mainPageInfo.time[1],has_cost:v.mainPageInfo.has_cost,promoter_id:v.mainPageInfo.promoter_id,advertiser_name:v.mainPageInfo.keyword},l=await c.get(p.oe_promoter_data_report_list,s);E.value=!1,l&&"0"==l.errNo?(l.rst?.data?.summary?.length>0&&(F.summary=l.rst?.data?.summary[0]),F.descol=l.rst.data?.explain,F.tableList=l.rst?.data?.list,F.total=l.rst?.pageInfo.total,F.totalPages=l.rst?.pageInfo.total,F.updateKey++):e.error(l.errMsg)},{tableHeaderStyle:oe}=A();return m({init:re}),(e,d)=>{const p=a,u=V,c=l,m=N,v=r,_=Y,y=o,A=i,B=n,re=t,ie=s;return k((w(),h("div",q,[b("div",H,[J,b("div",null,[j(p,{class:"lMar10",type:"primary",plain:"",onClick:U},{default:x((()=>[W])),_:1})])]),j(re,null,{default:x((()=>[k(b("div",null,[(w(),I(A,{ref_key:"tableAccountRef",ref:g,data:F.tableList,"header-cell-style":O(oe),style:{width:"100%"},key:F.updateKey,border:"","empty-text":"暂无数据","max-height":"calc(100vh - 280px)"},{default:x((()=>[(w(!0),h(P,null,R(F.descol,(e=>(w(),I(y,{fixed:1==e.disabled,prop:e.key_value,"min-width":"advertiser_status"!=e.key_value&&"advertiser_nick"!=e.key_value&&e.label.length<=4?"120px":e.label.length<=8?"150px":"200px"},{header:x((()=>[b("div",{class:M(["flex",[F.sortKey==e.key_value?"active_css":""]])},[b("span",{style:z({color:F.sortKey==e.key_value?"#3173FF":""})},L(e.label),5),e.tooltip&&e.tooltip!=e.label?(w(),I(c,{key:0,placement:"top",effect:"dark",content:e.tooltip},{default:x((()=>[j(u,{class:"lMar5 c-999 f14 pointer"})])),_:2},1032,["content"])):C("",!0),1==e.if_sort?(w(),h("div",$,[b("div",{class:"sortItem",onClick:a=>S(e.key_value,"asc")},[j(v,{color:"asc"==F.sortType&&F.sortKey==e.key_value?"#3173FF":""},{default:x((()=>[j(m)])),_:2},1032,["color"])],8,G),b("div",{class:"sortItem",onClick:a=>S(e.key_value,"desc")},[j(v,{color:"desc"==F.sortType&&F.sortKey==e.key_value?"#3173FF":""},{default:x((()=>[j(_)])),_:2},1032,["color"])],8,Q)])):C("",!0)],2)])),default:x((a=>["mf_view"==e.key_value?(w(),h("div",X,[b("img",{src:a.row.pre_oss_url,style:{width:"100px",height:"60px","object-fit":"contain"}},null,8,Z)])):"mf_info"==e.key_value?(w(),h("div",ee,[b("p",{class:"hiddenEllipsis",title:a.row.mf_name},L(a.row.mf_name),9,ae),b("p",null,"ID: "+L(a.row.mf_id),1)])):(w(),h("div",{key:2,class:M(["cellDiv",F.sortKey==e.key_value?"active_css":""])},[j(c,{disabled:!(a.row[e.key_value]&&a.row[e.key_value].length>30),effect:"dark",content:a.row[e.key_value]+""},{default:x((()=>[b("div",te,[K(L(a.row[e.key_value]||0==a.row[e.key_value]?-1!=e.label.indexOf("ID")||-1!=e.label.indexOf("id")?a.row[e.key_value]:O(f)(a.row[e.key_value],2,!0):"-"),1),-1==e.label.indexOf("率")||!a.row[e.key_value]&&0!=a.row[e.key_value]?C("",!0):(w(),h("span",se,"%"))])])),_:2},1032,["disabled","content"])],2))])),_:2},1032,["fixed","prop","min-width"])))),256))])),_:1},8,["data","header-cell-style"])),Number(F.total)>0?(w(),h("div",le,[j(B,{currentPage:F.currentPage,"onUpdate:currentPage":d[0]||(d[0]=e=>F.currentPage=e),"page-size":F.pageSize,"onUpdate:page-size":d[1]||(d[1]=e=>F.pageSize=e),background:"",total:F.total,onCurrentChange:D},null,8,["currentPage","page-size","total"])])):C("",!0)],512),[[T,!0]])])),_:1})])),[[ie,E.value]])}}}),[["__scopeId","data-v-2a6a7343"]]),oe=e=>(E("data-v-2d57e720"),e=e(),F(),e),ie=oe((()=>b("div",{class:"flex_between"},[b("div",{class:"page_title"},"投手数据")],-1))),ne={class:"screen_box"},de={class:"flex tMar15"},pe=oe((()=>b("div",{class:"label lMar20 rMar10"},"投手",-1))),ue=oe((()=>b("div",{class:"label lMar20 rMar10"},"是否有消耗",-1))),ce={class:"flex"},me=oe((()=>b("div",{class:"label lMar20 rMar10"},"投放时间",-1))),fe=m(g({__name:"index",setup(a){const t=_(),s=_({list:[{name:"否",value:0},{name:"是",value:1}]}),{dataListRef:l,acTrendRef:r,userRef:o,costRef:i,pageInfo:n,getUserList:m}=(()=>{const a=_(),t=_(),s=_(),l=_(),r=y({data_group:"account",time_type:"day",time:[u(-1),u(0)],keyword:"",has_cost:"",acList:[],userList:[],promoter_id:""});return{dataListRef:a,acTrendRef:t,userRef:l,costRef:s,pageInfo:r,getUserList:async()=>{let a=await c.get(p.user_list,{});a&&"0"==a.errNo?r.userList=a.rst:e.error(a.errMsg)}}})(),f=e=>{"userRef"==e&&(n.promoter_id=o.value?.value),"costRef"==e&&(n.has_cost=i.value?.value),g()},g=()=>{D((()=>{r.value&&r.value.change(),l.value&&l.value.init(1)}))};return S((()=>{t.value=JSON.parse(v("userInfo")),m(),g()})),(e,a)=>{const t=d;return w(),h(P,null,[ie,b("div",ne,[b("div",de,[pe,j(U,{ref_key:"userRef",ref:o,selectWidth:"180px",onChangeEvent:a[0]||(a[0]=e=>f("userRef")),onClearEvent:a[1]||(a[1]=e=>f("userRef")),filterFlag:!0,optObj:{k:"id",la:"username",val:"id"},options:O(n).userList},null,8,["options"]),ue,j(U,{ref_key:"costRef",ref:i,selectWidth:"180px",onChangeEvent:a[2]||(a[2]=e=>f("costRef")),onClearEvent:a[3]||(a[3]=e=>f("costRef")),filterFlag:!0,optObj:{k:"value",la:"name",val:"value"},options:s.value.list},null,8,["options"]),b("div",ce,[me,j(t,{modelValue:O(n).time,"onUpdate:modelValue":a[4]||(a[4]=e=>O(n).time=e),type:"daterange","value-format":"YYYY-MM-DD","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",size:"default",style:{width:"280px"},onChange:g,clearable:!1,class:"lMar10"},null,8,["modelValue"])])])]),j(re,{ref_key:"dataListRef",ref:l,mainPageInfo:O(n)},null,8,["mainPageInfo"])],64)}}}),[["__scopeId","data-v-2d57e720"]]);export{fe as default};