12 |
- import{E as e,o as a,O as t,_ as s,$ as l,B as o,C as i,v as n,A as r,X as p}from"../element-plus/element-plus.DqqeXZzT.js";import{_ as d}from"../edit/edit.A4ubo7z3.js";import{_ as c}from"../question-filled/question-filled.CpBGPdbF.js";import{I as u}from"../_input/_input.DPT4C86A.js";import{S as f}from"../_select/_select.DVQW4rAo.js";import{T as v}from"../timeScreen/timeScreen.BqNtDQOu.js";import{e as m}from"../define/define.Bw5ccVBh.js";import{a as _,t as w,b as h,c as k,d as b}from"../api/api.D60NzXqX.js";import{D as x}from"../_dialog/_dialog.ium6sOk7.js";import{d as y,r 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,u as F,ba as U,b8 as W,E as q}from"../@vue/@vue.lccsL1Mu.js";import{_ as A}from"../_drawer/_drawer.C0e253H5.js";import{_ as J,g as $}from"../../assets/index-DYMYfyXS.js";import{u as K}from"../vue-router/vue-router.D86bYXwF.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"../api/api.BtQEnbVN.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:"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",Q,[M(u,{ref_key:"nameRef",ref:o,iptType:"textarea",title:"",placeholderTxt:"任务名称"},null,512)])])),_:1},8,["dialogVisible","dialog-title"]))}}),X=e=>(U("data-v-27148328"),e=e(),W(),e),Y={class:"flex_between"},Z=X((()=>L("h4",{class:"lMar10 c-000 f22 c-theme_text"},D("详情"),-1))),ee={class:"container"},ae={class:"flexWrap"},te={class:"base-info"},se=X((()=>L("div",{class:"label"},"任务名称:",-1))),le={class:"con"},oe={class:"base-info"},ie=X((()=>L("div",{class:"label"},"账户:",-1))),ne=["innerHTML"],re={class:"con"},pe={key:0},de={class:"base-info"},ce=X((()=>L("div",{class:"label"},"提交广告计划数:",-1))),ue={class:"con"},fe={class:"base-info"},ve=X((()=>L("div",{class:"label"},"提交广告数:",-1))),me={class:"con"},_e={class:"base-info"},we=X((()=>L("div",{class:"label"},"提交规则:",-1))),he={class:"con"},ke={class:"base-info"},be=X((()=>L("div",{class:"label"},"开始执行时间:",-1))),xe={class:"con"},ye={class:"menu bMar15"},ge=["onClick"],je={class:"flex"},Ce={key:0},Re=X((()=>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=X((()=>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 p=g(!1),d=g(!1),c=g(),u=g(),f=g(["1"]),v=g(1),h=[{label:"提交信息",value:1},{label:"执行记录",value:2}],k=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:b}=m(),x=e=>{e!=v.value&&2==e&&(p.value=!0,w({task_id:c.value}).then((e=>{p.value=!1,e&&(k.taskRecordList=[e])})).catch((()=>{p.value=!1}))),v.value=e},y=e=>{console.log(e)},j=()=>{d.value=!1,v.value=1};return r({switchShow:(e,a)=>{d.value=e,c.value=a,e&&(p.value=!0,_({task_id:c.value}).then((e=>{p.value=!1,u.value=e})).catch((()=>{p.value=!1})))}}),(e,r)=>{const c=I("CloseBold"),m=a,_=t,w=s,g=l,C=o,z=i,U=n;return R(),S(A,{drawerShow:d.value,onClose:j,drawerSize:"70%",headerSlotFlag:!0},{headerSlot:T((()=>[L("div",Y,[Z,M(m,{class:"pointer",onClick:j},{default:T((()=>[M(c)])),_: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(w,{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(_,{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",pe,"、")):B("",!0)])))),256))])])),_:1})]),L("div",de,[ce,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",_e,[we,L("div",he,D("1"==u.value?.info?.comtype?"立即提交":"2"==u.value?.info?.comtype?"定时提交":""),1)]),L("div",ke,[be,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:O(["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":F(b),border:"","empty-text":"暂无数据","max-height":"70vh"},{default:T((()=>[(R(!0),E(V,null,H(k.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:O(["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(_,{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:k.taskRecordList,"header-cell-style":F(b),border:"","empty-text":"暂无数据","max-height":"70vh"},{default:T((()=>[(R(!0),E(V,null,H(k.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:O(["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(_,{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,p.value]])])),_:1},8,["drawerShow"])}}}),Ne=J(He,[["__scopeId","data-v-27148328"]]),Be=e=>(U("data-v-2abe3edb"),e=e(),W(),e),Oe={class:"screenBox_mini"},Fe={class:"flex"},Ue=["innerHTML"],We={key:0,class:"flex_start"},qe={key:1},Ae={key:0},Je={key:2},$e=Be((()=>L("span",{class:"icon task-status--finish-icon"},null,-1))),Ke={class:"task-status--finish-font"},Qe={key:0},Ge=["innerHTML"],Xe={class:"opt-link"},Ye={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"}},oa=J(y({__name:"index",setup(s){const l=K(),_=g(),{DetailRef:w,EditTaskNameRef:x,InputRef_text:y,acRef:j,statusRef:C,timeRef:z,loading:I,tableInfo:U,pageInfo:W,init_acList:A,clearEvent:J,tableHeaderStyle:Q}=m();q((async()=>{_.value=JSON.parse($("userInfo")),await A(),await X()}));const X=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}))},Y=e=>{U.currentPage=e,X(e)},Z=a=>{I.value=!0,b({task_id:a.task_id,name:a.name}).then((()=>{e.success("修改成功!"),X(U.currentPage)})).catch((()=>{I.value=!1}))};return(s,m)=>{const h=c,b=t,g=d,q=a,A=p,$=o,K=i,ee=r,ae=n;return R(),E(V,null,[L("div",Oe,[M(u,{ref_key:"InputRef_text",ref:y,title:"关键词",placeholderTxt:"关键词",onChangeEvent:m[0]||(m[0]=()=>X()),onClearEvent:m[1]||(m[1]=()=>X())},null,512),M(f,{ref_key:"acRef",ref:j,title:"账号",selectWidth:"160px",onChangeEvent:m[2]||(m[2]=()=>X()),onClearEvent:m[3]||(m[3]=()=>X()),optObj:{k:"account_id",la:"account_id",val:"account_id"},options:F(W).acList},null,8,["options"]),M(f,{ref_key:"statusRef",ref:C,title:"状态",selectWidth:"160px",onChangeEvent:m[4]||(m[4]=()=>X()),onClearEvent:m[5]||(m[5]=()=>X()),options:F(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]=()=>X())},null,512),L("span",{class:"pointer c-theme lMar10",onClick:m[7]||(m[7]=()=>{F(J)(),X()})},"清空")]),P((R(),S(K,{ref:"tableRef",data:F(U).tableList,"header-cell-style":F(Q),style:{width:"100%"},border:"","empty-text":"暂无数据","row-key":"campaign_id","max-height":"calc(100vh - 200px)"},{default:T((()=>[(R(!0),E(V,null,H(F(U).descol,(a=>(R(),S($,{fixed:a.fixed,prop:a.prop,"min-width":a.width?a.width:"80px"},{header:T((()=>[L("div",Fe,[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((t=>["name"==a.prop?(R(),E("div",We,[L("span",null,D(t.row[a.prop]),1),M(q,{color:"#3173FF",class:"tMar3 pointer lMarauto f16 icon",onClick:e=>{return a=t.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==t.row[a.prop]?"立即提交":2==t.row[a.prop]?"定时提交":"")+" ",1),2==t.row[a.prop]?(R(),E("p",Ae,D(t.row.dotime),1)):B("",!0)])):"status"==a.prop?(R(),E("div",Je,[L("span",{class:O(["task-status","rMar10",2==t.row.status&&(0==t.row.fail_num?"success":"fail")])},[$e,L("span",Ke,D(0==t.row.status?"待提交":1==t.row.status?"提交中":2==t.row.status?"提交完成":""),1)],2),2==t.row.status?(R(),E("span",Qe,[M(b,{disabled:!(t.row.fail_reason&&""!=t.row.fail_reason&&t.row.fail_num>0),placement:"top",effect:"dark"},{content:T((()=>[L("span",{innerHTML:JSON.parse(t.row.fail_reason)},null,8,Ge)])),default:T((()=>[L("span",Xe," 成功:"+D(t.row.success_num)+" 失败:"+D(t.row.fail_num),1)])),_:2},1032,["disabled"])])):B("",!0)])):"operate"==a.prop?(R(),E("div",Ye,[L("span",{class:"opt-link rMar10 pointer",onClick:e=>{return a=t.row.id,void w.value?.switchShow(!0,a);var a}}," 详情 ",8,Ze),_.value?.userAuth>10?(R(),E("span",{key:0,class:"opt-link rMar10 pointer",onClick:e=>(e=>{let a=l.resolve({path:"/gdtList/batchGdt",query:{task_id:e}});window.open(a.href,"_blank")})(t.row.id)}," 复制 ",8,ea)):B("",!0),M(A,{title:"确定要删除该任务?",onConfirm:a=>{return s=t.row.id,I.value=!0,void k({task_id:s}).then((()=>{e.success("删除成功!"),X(U.currentPage)})).catch((()=>{I.value=!1}));var s}},{reference:T((()=>[aa])),_:2},1032,["onConfirm"])])):(R(),E("div",ta,[M(b,{disabled:!(t.row[a.prop]&&t.row[a.prop].length>30),effect:"dark",content:t.row[a.prop]+""},{default:T((()=>[L("div",sa,D(t.row[a.prop]||0==t.row[a.prop]?t.row[a.prop]:"-"),1)])),_:2},1032,["disabled","content"])]))])),_:2},1032,["fixed","prop","min-width"])))),256))])),_:1},8,["data","header-cell-style"])),[[ae,F(I)]]),Number(F(U).total)>0?(R(),E("div",la,[M(ee,{currentPage:F(U).currentPage,"onUpdate:currentPage":m[8]||(m[8]=e=>F(U).currentPage=e),"page-size":F(U).pageSize,"onUpdate:page-size":m[9]||(m[9]=e=>F(U).pageSize=e),background:"",total:F(U).total,onCurrentChange:Y},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:w},null,512)],64)}}}),[["__scopeId","data-v-2abe3edb"]]);export{oa as default};
|