12 |
- import{E as e,a1 as a,a2 as t,o as s,w as l,u as o,x as i,v as n,t as r,y as d}from"../element-plus/element-plus.34b51316.js";import{_ as c}from"../edit/edit.5d0adf5b.js";import{_ as p}from"../question-filled/question-filled.6b9c8151.js";import{I as u}from"../_input/_input.2d87897e.js";import{S as f}from"../_select/_select.a3b84a38.js";import{T as v}from"../timeScreen/timeScreen.d7e30fd8.js";import{e as m}from"../define/define.87c1a63f.js";import{a as w,t as _,b as h,c as b,d as k}from"../api/api.21d82914.js";import{D as x}from"../_dialog/_dialog.b65b864e.js";import{d as y,f as g,i as j,n as C,o as R,J as S,K as T,a as L,T as M,Y as z,ae as I,L as P,c as E,S as D,U as V,a9 as H,R as N,Q as B,O as F,u as O,b7 as U,b6 as W,E as q}from"../@vue/@vue.5bfcce30.js";import{_ as J}from"../_drawer/_drawer.b0856643.js";import{_ as K,g as Q}from"../../assets/index.856feaee.js";import{u as $}from"../vue-router/vue-router.ccba075e.js";import"../lodash-es/lodash-es.e51fd119.js";import"../async-validator/async-validator.21881447.js";import"../@vueuse/@vueuse.ba2b0174.js";import"../dayjs/dayjs.f67a4005.js";import"../axios/axios.27022086.js";import"../@ctrl/@ctrl.9c8f424f.js";import"../@popperjs/@popperjs.f1fb8f77.js";import"../escape-html/escape-html.d572c0fd.js";import"../normalize-wheel-es/normalize-wheel-es.94de1731.js";import"../api/api.e07818ff.js";import"../pinia/pinia.b7fbd7c7.js";import"../vue-demi/vue-demi.4f3c4c97.js";import"../pinia-plugin-persist/pinia-plugin-persist.67085de7.js";import"../@element-plus/@element-plus.d499550f.js";import"../echarts/echarts.f2b2ac0c.js";import"../tslib/tslib.e35f93b8.js";import"../zrender/zrender.fe59a237.js";const A={class:"dialogBox"},G=y({__name:"editTaskName",props:{title:{default:"修改任务名称"}},emits:["confirm"],setup(a,{expose:t,emit:s}){const l=g(""),o=g(),i=async()=>{""!=o.value?.value?(n.value=!1,s("confirm",{name:o.value?.value,task_id:l.value})):e.error("名称为必填项")},n=g(!1);return t({switchShow:(e,a)=>{n.value=e,e&&C((()=>{l.value=a.task_id,o.value&&(o.value.value=a.name)}))}}),j((()=>{C((()=>{}))})),(e,t)=>(R(),S(x,{ref:"DialogRef_editType",dialogVisible:n.value,onConfirm:i,dialog_key:"editPromotePlanName",onClose:t[0]||(t[0]=e=>n.value=!1),width:"600px","dialog-title":a.title},{content:T((()=>[L("div",A,[M(u,{ref_key:"nameRef",ref:o,iptType:"textarea",title:"",placeholderTxt:"任务名称"},null,512)])])),_:1},8,["dialogVisible","dialog-title"]))}});const Y=e=>(U("data-v-27148328"),e=e(),W(),e),X={class:"flex_between"},Z=Y((()=>L("h4",{class:"lMar10 c-000 f22 c-theme_text"},D("详情"),-1))),ee={class:"container"},ae={class:"flexWrap"},te={class:"base-info"},se=Y((()=>L("div",{class:"label"},"任务名称:",-1))),le={class:"con"},oe={class:"base-info"},ie=Y((()=>L("div",{class:"label"},"账户:",-1))),ne=["innerHTML"],re={class:"con"},de={key:0},ce={class:"base-info"},pe=Y((()=>L("div",{class:"label"},"提交广告计划数:",-1))),ue={class:"con"},fe={class:"base-info"},ve=Y((()=>L("div",{class:"label"},"提交广告数:",-1))),me={class:"con"},we={class:"base-info"},_e=Y((()=>L("div",{class:"label"},"提交规则:",-1))),he={class:"con"},be={class:"base-info"},ke=Y((()=>L("div",{class:"label"},"开始执行时间:",-1))),xe={class:"con"},ye={class:"menu bMar15"},ge=["onClick"],je={class:"flex"},Ce={key:0},Re=Y((()=>L("span",{class:"icon task-status--finish-icon"},null,-1))),Se={class:"task-status--finish-font"},Te={key:0,class:"opt-link"},Le={key:1,class:"cellDiv"},Me={class:"clampTwo line21",style:{flex:"1"}},ze={class:"flex"},Ie={key:0},Pe=Y((()=>L("span",{class:"icon task-status--finish-icon"},null,-1))),Ee={class:"task-status--finish-font"},De={key:1,class:"cellDiv"},Ve={class:"clampTwo line21",style:{flex:"1"}},He=y({__name:"index",setup(e,{expose:r}){const d=g(!1),c=g(!1),p=g(),u=g(),f=g(["1"]),v=g(1),h=[{label:"提交信息",value:1},{label:"执行记录",value:2}],b=z({taskRecordList:[],descol:[{prop:"account_id",label:"账户ID",fixed:"",width:"60"},{prop:"account_name",label:"账户",fixed:"",width:"140"},{prop:"optimization_goal",label:"转化目标",fixed:"",width:"60"},{prop:"deep_conversion_spec_goal",label:"深度转化目标",fixed:""},{prop:"bid_amount",label:"转化目标出价",fixed:"",width:"80"},{prop:"deep_bid_amount",label:"深度转化目标出价",fixed:"",width:"100"},{prop:"ad_count",label:"新建广告数",fixed:"",width:"60"},{prop:"status",label:"提交结果",fixed:"",width:"140"}],recordDescol:[{prop:"created_at",label:"创建时间",fixed:""},{prop:"ad_count",label:"提交广告数",fixed:""},{prop:"status",label:"状态",fixed:""}]}),{tableHeaderStyle:k}=m(),x=e=>{e!=v.value&&2==e&&(d.value=!0,_({task_id:p.value}).then((e=>{d.value=!1,e&&(b.taskRecordList=[e])})).catch((()=>{d.value=!1}))),v.value=e},y=e=>{console.log(e)},j=()=>{c.value=!1,v.value=1};return r({switchShow:(e,a)=>{c.value=e,p.value=a,e&&(d.value=!0,w({task_id:p.value}).then((e=>{d.value=!1,u.value=e})).catch((()=>{d.value=!1})))}}),(e,r)=>{const p=I("CloseBold"),m=s,w=l,_=a,g=t,C=o,z=i,U=n;return R(),S(J,{drawerShow:c.value,onClose:j,drawerSize:"70%",headerSlotFlag:!0},{headerSlot:T((()=>[L("div",X,[Z,M(m,{class:"pointer",onClick:j},{default:T((()=>[M(p)])),_:1})])])),content:T((()=>[P((R(),E("div",ee,[M(g,{modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=e=>f.value=e),onChange:y},{default:T((()=>[M(_,{title:"任务基本信息",name:"1"},{default:T((()=>[L("div",ae,[L("div",te,[se,L("div",le,D(u.value?.info?.name),1)]),L("div",oe,[ie,M(w,{effect:"dark",placement:"top"},{content:T((()=>[L("span",{innerHTML:u.value?.info?.account?.map((e=>`${e.account_name}(${e.account_id})<br/>`)).join("")},null,8,ne)])),default:T((()=>[L("div",re,[(R(!0),E(V,null,H(u.value?.info?.account,((e,a)=>(R(),E("span",null,[N(D(e.account_name)+" ",1),a!=u.value?.info?.account?.length-1?(R(),E("em",de,"、")):B("",!0)])))),256))])])),_:1})]),L("div",ce,[pe,L("div",ue,D(u.value?.info?.camp_count),1)]),L("div",fe,[ve,L("div",me,D(u.value?.info?.ad_count),1)]),L("div",we,[_e,L("div",he,D("1"==u.value?.info?.comtype?"立即提交":"2"==u.value?.info?.comtype?"定时提交":""),1)]),L("div",be,[ke,L("div",xe,D(u.value?.info?.dotime),1)])])])),_:1})])),_:1},8,["modelValue"]),L("div",ye,[(R(),E(V,null,H(h,(e=>L("div",{class:F(["menu-item",v.value==e.value?"menu-item-active":""]),onClick:a=>x(e.value)},D(e.label),11,ge))),64))]),1==v.value?(R(),S(z,{key:0,ref:"tableRef",data:u.value?.list,"header-cell-style":O(k),border:"","empty-text":"暂无数据","max-height":"70vh"},{default:T((()=>[(R(!0),E(V,null,H(b.descol,(e=>(R(),S(C,{fixed:e.fixed,prop:e.prop,"min-width":e.width?e.width:"80px"},{header:T((()=>[L("div",je,[L("span",null,D(e.label),1)])])),default:T((a=>["status"==e.prop?(R(),E("div",Ce,[L("span",{class:F(["task-status","rMar10",2==a.row.status&&(0==a.row.fail_num?"success":"fail")])},[Re,L("span",Se,D(0==a.row.status?"待提交":1==a.row.status?"提交中":2==a.row.status?"提交完成":""),1)],2),2==a.row.status?(R(),E("span",Te," 成功:"+D(a.row.success_num)+" 失败:"+D(a.row.fail_num),1)):B("",!0)])):(R(),E("div",Le,[M(w,{disabled:!(a.row[e.prop]&&a.row[e.prop].length>30),effect:"dark",content:a.row[e.prop]+""},{default:T((()=>[L("div",Me,D(a.row[e.prop]||0==a.row[e.prop]?a.row[e.prop]:"-"),1)])),_:2},1032,["disabled","content"])]))])),_:2},1032,["fixed","prop","min-width"])))),256))])),_:1},8,["data","header-cell-style"])):B("",!0),2==v.value?(R(),S(z,{key:1,ref:"tableRef",data:b.taskRecordList,"header-cell-style":O(k),border:"","empty-text":"暂无数据","max-height":"70vh"},{default:T((()=>[(R(!0),E(V,null,H(b.recordDescol,(e=>(R(),S(C,{fixed:e.fixed,prop:e.prop,"min-width":e.width?e.width:"80px"},{header:T((()=>[L("div",ze,[L("span",null,D(e.label),1)])])),default:T((a=>["status"==e.prop?(R(),E("div",Ie,[L("span",{class:F(["task-status","rMar10",2==a.row.status&&(0==a.row.fail_num?"success":"fail")])},[Pe,L("span",Ee,D(0==a.row.status?"待提交":1==a.row.status?"提交中":2==a.row.status?"提交完成":""),1)],2)])):(R(),E("div",De,[M(w,{disabled:!(a.row[e.prop]&&a.row[e.prop].length>30),effect:"dark",content:a.row[e.prop]+""},{default:T((()=>[L("div",Ve,D(a.row[e.prop]||0==a.row[e.prop]?a.row[e.prop]:"-"),1)])),_:2},1032,["disabled","content"])]))])),_:2},1032,["fixed","prop","min-width"])))),256))])),_:1},8,["data","header-cell-style"])):B("",!0)])),[[U,d.value]])])),_:1},8,["drawerShow"])}}});var Ne=K(He,[["__scopeId","data-v-27148328"]]);const Be=e=>(U("data-v-2abe3edb"),e=e(),W(),e),Fe={class:"screenBox_mini"},Oe={class:"flex"},Ue=["innerHTML"],We={key:0,class:"flex_start"},qe={key:1},Je={key:0},Ke={key:2},Qe=Be((()=>L("span",{class:"icon task-status--finish-icon"},null,-1))),$e={class:"task-status--finish-font"},Ae={key:0},Ge=["innerHTML"],Ye={class:"opt-link"},Xe={key:3},Ze=["onClick"],ea=["onClick"],aa=Be((()=>L("span",{class:"opt-link pointer"}," 删除 ",-1))),ta={key:4,class:"cellDiv"},sa={class:"clampTwo line21",style:{flex:"1"}},la={key:0,class:"paginationBox flex",style:{"justify-content":"center"}};var oa=K(y({__name:"index",setup(a){const t=$(),w=g(),{DetailRef:_,EditTaskNameRef:x,InputRef_text:y,acRef:j,statusRef:C,timeRef:z,loading:I,tableInfo:U,pageInfo:W,init_acList:J,clearEvent:K,tableHeaderStyle:A}=m();q((async()=>{w.value=JSON.parse(Q("userInfo")),await J(),await Y()}));const Y=e=>{I.value=!0;const a={account_id:j.value.value,keyword:y.value.value,status:C.value.value,start:z.value.dateVal&&z.value.dateVal[0],end:z.value.dateVal&&z.value.dateVal[1],page:e||1,pageSize:U.pageSize};h(a).then((e=>{I.value=!1,U.tableList=e.data,U.total=e.pageInfo.total,U.totalPages=e.pageInfo.totalPages})).catch((()=>{I.value=!1}))},X=e=>{U.currentPage=e,Y(e)},Z=a=>{I.value=!0,b({task_id:a.task_id,name:a.name}).then((()=>{e.success("修改成功!"),Y(U.currentPage)})).catch((()=>{I.value=!1}))};return(a,m)=>{const h=p,b=l,g=c,q=s,J=r,Q=o,$=i,ee=d,ae=n;return R(),E(V,null,[L("div",Fe,[M(u,{ref_key:"InputRef_text",ref:y,title:"关键词",placeholderTxt:"关键词",onChangeEvent:m[0]||(m[0]=()=>Y()),onClearEvent:m[1]||(m[1]=()=>Y())},null,512),M(f,{ref_key:"acRef",ref:j,title:"账号",selectWidth:"160px",onChangeEvent:m[2]||(m[2]=()=>Y()),onClearEvent:m[3]||(m[3]=()=>Y()),optObj:{k:"account_id",la:"account_id",val:"account_id"},options:O(W).acList},null,8,["options"]),M(f,{ref_key:"statusRef",ref:C,title:"状态",selectWidth:"160px",onChangeEvent:m[4]||(m[4]=()=>Y()),onClearEvent:m[5]||(m[5]=()=>Y()),options:O(W).statusList},null,8,["options"]),M(v,{title:"时间",selectWidth:"260px",haveQuick:!1,clearFlag:!0,valueIsKong:!0,ref_key:"timeRef",ref:z,onInit:m[6]||(m[6]=()=>Y())},null,512),L("span",{class:"pointer c-theme lMar10",onClick:m[7]||(m[7]=()=>{O(K)(),Y()})},"清空")]),P((R(),S($,{ref:"tableRef",data:O(U).tableList,"header-cell-style":O(A),style:{width:"100%"},border:"","empty-text":"暂无数据","row-key":"campaign_id","max-height":"calc(100vh - 200px)"},{default:T((()=>[(R(!0),E(V,null,H(O(U).descol,(a=>(R(),S(Q,{fixed:a.fixed,prop:a.prop,"min-width":a.width?a.width:"80px"},{header:T((()=>[L("div",Oe,[L("span",null,D(a.label),1),a.note?(R(),S(b,{key:0,placement:"top",effect:"dark"},{content:T((()=>[L("span",{innerHTML:a.note},null,8,Ue)])),default:T((()=>[M(h,{class:"c-999 f14 pointer"})])),_:2},1024)):B("",!0)])])),default:T((s=>["name"==a.prop?(R(),E("div",We,[L("span",null,D(s.row[a.prop]),1),M(q,{color:"#3173FF",class:"tMar3 pointer lMarauto f16 icon",onClick:e=>{return a=s.row,void x.value?.switchShow(!0,{task_id:a.id,name:a.name});var a}},{default:T((()=>[M(g)])),_:2},1032,["onClick"])])):"comtype"==a.prop?(R(),E("div",qe,[N(D(1==s.row[a.prop]?"立即提交":2==s.row[a.prop]?"定时提交":"")+" ",1),2==s.row[a.prop]?(R(),E("p",Je,D(s.row.dotime),1)):B("",!0)])):"status"==a.prop?(R(),E("div",Ke,[L("span",{class:F(["task-status","rMar10",2==s.row.status&&(0==s.row.fail_num?"success":"fail")])},[Qe,L("span",$e,D(0==s.row.status?"待提交":1==s.row.status?"提交中":2==s.row.status?"提交完成":""),1)],2),2==s.row.status?(R(),E("span",Ae,[M(b,{disabled:!(s.row.fail_reason&&""!=s.row.fail_reason&&s.row.fail_num>0),placement:"top",effect:"dark"},{content:T((()=>[L("span",{innerHTML:JSON.parse(s.row.fail_reason)},null,8,Ge)])),default:T((()=>[L("span",Ye," 成功:"+D(s.row.success_num)+" 失败:"+D(s.row.fail_num),1)])),_:2},1032,["disabled"])])):B("",!0)])):"operate"==a.prop?(R(),E("div",Xe,[L("span",{class:"opt-link rMar10 pointer",onClick:e=>{return a=s.row.id,void _.value?.switchShow(!0,a);var a}}," 详情 ",8,Ze),w.value?.userAuth>10?(R(),E("span",{key:0,class:"opt-link rMar10 pointer",onClick:e=>(e=>{let a=t.resolve({path:"/gdtList/batchGdt",query:{task_id:e}});window.open(a.href,"_blank")})(s.row.id)}," 复制 ",8,ea)):B("",!0),M(J,{title:"确定要删除该任务?",onConfirm:a=>{return t=s.row.id,I.value=!0,void k({task_id:t}).then((()=>{e.success("删除成功!"),Y(U.currentPage)})).catch((()=>{I.value=!1}));var t}},{reference:T((()=>[aa])),_:2},1032,["onConfirm"])])):(R(),E("div",ta,[M(b,{disabled:!(s.row[a.prop]&&s.row[a.prop].length>30),effect:"dark",content:s.row[a.prop]+""},{default:T((()=>[L("div",sa,D(s.row[a.prop]||0==s.row[a.prop]?s.row[a.prop]:"-"),1)])),_:2},1032,["disabled","content"])]))])),_:2},1032,["fixed","prop","min-width"])))),256))])),_:1},8,["data","header-cell-style"])),[[ae,O(I)]]),Number(O(U).total)>0?(R(),E("div",la,[M(ee,{currentPage:O(U).currentPage,"onUpdate:currentPage":m[8]||(m[8]=e=>O(U).currentPage=e),"page-size":O(U).pageSize,"onUpdate:page-size":m[9]||(m[9]=e=>O(U).pageSize=e),background:"",total:O(U).total,onCurrentChange:X},null,8,["currentPage","page-size","total"])])):B("",!0),M(G,{ref_key:"EditTaskNameRef",ref:x,onConfirm:Z},null,512),M(Ne,{ref_key:"DetailRef",ref:_},null,512)],64)}}}),[["__scopeId","data-v-2abe3edb"]]);export{oa as default};
|