12 |
- import{_ as e}from"../_popconfirm/_popconfirm.C2WlUwAw.js";import{p as a,T as s}from"../tableInfo/tableInfo.DCb2GEsc.js";import{I as t}from"../_input/_input.DPT4C86A.js";import{S as l}from"../_select/_select.DVQW4rAo.js";import{E as n,u as o,v as i}from"../element-plus/element-plus.DqqeXZzT.js";import{_ as r}from"../_drawer/_drawer.C0e253H5.js";import{A as p}from"../api/api.BtQEnbVN.js";import{_ as m}from"../../assets/index-DYMYfyXS.js";import{d as u,r as c,Y as d,i as f,n as y,o as v,c as j,T as b,K as _,L as k,U as h,a9 as w,a as x,S as g,u as L,R as O,h as I,ba as C,b8 as M}from"../@vue/@vue.lccsL1Mu.js";import"../caret-top/caret-top.BxG-YGIs.js";import"../question-filled/question-filled.CpBGPdbF.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 F={class:"detialBox"},R={class:"content"},S={class:"bMar40"},W={class:"title"},z={class:"flexWrap"},N={key:0,style:{width:"100%"},class:"bMar25"},D={class:"name"},E={class:"val"},$={key:1,style:{width:"50%"},class:"bMar25"},T={class:"name"},V={key:0,class:"val"},q={key:0},B={key:1},H={key:2},U={key:3},A={key:1,class:"val"},K={class:"lMar5"},Y={key:2,class:"val"},G={class:"title flex"},J=(e=>(C("data-v-6b94aaf9"),e=e(),M(),e))((()=>x("span",null,"操作详情",-1))),P=O("仅查看含有提交失败的任务"),Q={class:"text-center"},X={class:"flex",style:{"justify-content":"center"}},Z={key:0},ee={key:1},ae={key:2},se={key:3},te=m(u({__name:"detial",props:{propsObj:{default:{}}},emits:["init"],setup(e,{expose:t,emit:l}){const m=e,{proxy:u}=I(),O=u.$NumberHandle,C=c(),M=d({infoList:[{title:"基本信息",info:[{name:"任务名称",key:"title",isLine:!0},{name:"操作类型",key:"type"},{name:"创建时间",key:"created_at"},{name:"执行状态",key:"status"},{name:"执行结果",key:"status2"}]}],chooseList:[],onlyFail:!1}),te=d([{name:"序号",column:"idx",slotFlag:!0,minWidth:"60px"},{name:"素材ID",column:"mf_id",minWidth:"90px"},{name:"素材名称",column:"mf_name",minWidth:"140px"},{name:"账户名称",column:"account_name",minWidth:"140px"},{name:"创建时间",column:"created_at"},{name:"操作结果",column:"status",slotFlag:!0},{name:"失败原因",column:"reason"}]),{tableInfo:le,tableListRef:ne,total:oe}=a(te),ie=async()=>{C.value=!0;const e=d({task_id:m.propsObj.id,only_fail:M.onlyFail?1:0});let a=await u.$http.get(p.task_detial,e);C.value=!1,a&&"0"==a.errNo?le.tableList=a.rst:n.error(a.errMsg)},re=c(!1);return t({switchShow:e=>{re.value=e,e&&y((()=>{ie()}))}}),f((()=>{y((()=>{}))})),(a,t)=>{const l=o,n=i;return v(),j("div",F,[b(r,{drawerShow:re.value,onClose:t[1]||(t[1]=e=>re.value=!1),title:"任务详情",drawerSize:"70%"},{content:_((()=>[k((v(),j("div",R,[(v(!0),j(h,null,w(M.infoList,(a=>(v(),j("div",S,[x("div",W,g(a.title),1),x("div",z,[(v(!0),j(h,null,w(a.info,(a=>(v(),j(h,null,[a.isLine?(v(),j("div",N,[x("span",D,g(a.name),1),x("span",E,g(e.propsObj[a.key]||"-"),1)])):(v(),j("div",$,[x("span",T,g(a.name),1),"执行状态"==a.name?(v(),j("span",V,[0==e.propsObj[a.key]?(v(),j("span",q,"待执行")):1==e.propsObj[a.key]?(v(),j("span",B,"执行中")):2==e.propsObj[a.key]?(v(),j("span",H,"执行完成")):(v(),j("span",U,"-"))])):"执行结果"==a.name?(v(),j("span",A,[x("span",null,"成功: "+g(L(O)(e.propsObj.success_num)||0),1),x("span",K,"失败: "+g(L(O)(e.propsObj.fail_num)||0),1)])):(v(),j("span",Y,g(e.propsObj[a.key]||"-"),1))]))],64)))),256))])])))),256)),x("div",G,[J,b(l,{class:"lMarauto",modelValue:M.onlyFail,"onUpdate:modelValue":t[0]||(t[0]=e=>M.onlyFail=e),onChange:ie},{default:_((()=>[P])),_:1},8,["modelValue"])]),b(s,{ref_key:"tableListRef",ref:ne,tableData:L(le).tableList,descol:L(le).descolList},{idx:_((e=>[x("div",Q,g(Number(e.index)+1),1)])),status:_((e=>[x("div",X,[0==e.row.status?(v(),j("span",Z,"待执行")):1==e.row.status?(v(),j("span",ee,"成功")):2==e.row.status?(v(),j("span",ae,"失败")):(v(),j("span",se,"-"))])])),_:1},8,["tableData","descol"])])),[[n,C.value]])])),_:1},8,["drawerShow"])])}}}),[["__scopeId","data-v-6b94aaf9"]]),le={class:"screenBox flex"},ne={class:"flex",style:{"justify-content":"center"}},oe={key:0},ie={key:1},re={key:2},pe={key:3},me={class:"lMar10 c-theme f12"},ue={class:"lMar5 c-theme f12"},ce={class:"text-center"},de=["onClick"],fe=m(u({__name:"index",setup(o){const{proxy:i}=I(),r=i.$NumberHandle,m=d([{name:"任务名称",column:"title",minWidth:"140px"},{name:"提交数量",column:"num"},{name:"操作类型",column:"type"},{name:"创建时间",column:"created_at"},{name:"执行状态",column:"status",slotFlag:!0},{name:"操作",column:"operate",slotFlag:!0}]),{tableInfo:u,tableListRef:y,total:k}=a(m),w=c(),O=c(),C=d({statusList:[{label:"执行中",value:"1"},{label:"执行完成",value:"2"}],infoObj:{}}),M=async(e,a)=>{y.value.loading=!0;const s=d({title:w.value.value,status:O.value.value,page:e||1,pageSize:a||20});let t=await i.$http.get(p.task_list,s);y.value.loading=!1,t&&"0"==t.errNo?(u.tableList=t.rst.data,k.value=t.rst.pageInfo.total):n.error(t.errMsg)},F=c();return f((async()=>{await M()})),(a,o)=>(v(),j(h,null,[x("div",le,[b(t,{ref_key:"InputRef_text",ref:w,title:"任务名称",placeholderTxt:"任务名称",onChangeEvent:o[0]||(o[0]=e=>M()),onClearEvent:o[1]||(o[1]=e=>M())},null,512),b(l,{ref_key:"statusRef",ref:O,clearFlag:!0,title:"执行状态",selectWidth:"160px",onChangeEvent:o[2]||(o[2]=e=>M()),onClearEvent:o[3]||(o[3]=e=>M()),options:C.statusList},null,8,["options"])]),b(s,{ref_key:"tableListRef",ref:y,tableData:L(u).tableList,descol:L(u).descolList,onInit:M},{status:_((e=>[x("div",ne,[0==e.row.status?(v(),j("span",oe,"待执行")):1==e.row.status?(v(),j("span",ie,"执行中")):2==e.row.status?(v(),j("span",re,"执行完成")):(v(),j("span",pe,"-")),x("span",me,"成功: "+g(L(r)(e.row.success_num)||0),1),x("span",ue,"失败: "+g(L(r)(e.row.fail_num)||0),1)])])),operate:_((a=>[x("div",ce,[x("span",{class:"operate_text",onClick:e=>{return s=a.row,C.infoObj=s,void F.value.switchShow(!0);var s}},"详情",8,de),b(e,{onConfirm:e=>(async e=>{const a=d({task_id:e.id});let s=await i.$http.post(p.task_dele,a);n.info(s.errMsg),s&&"0"==s.errNo&&await M()})(a.row)},null,8,["onConfirm"])])])),_:1},8,["tableData","descol"]),b(te,{ref_key:"detialRef",ref:F,propsObj:C.infoObj},null,8,["propsObj"])],64))}}),[["__scopeId","data-v-1961bb58"]]);export{fe as default};
|