All Downloads are FREE. Search and download functionalities are using the official Maven repository.

admin.assets.index-D-RP5z5r.js Maven / Gradle / Ivy

import{a as oe,N as M,b as le}from"./search-form.vue_vue_type_script_setup_true_lang-Csk6aNWf.js";import{d as A,Z as O,r as R,a0 as G,q as ne,o as I,c as q,w as s,f as e,h as t,$ as a,b as K,g as j,t as D,ac as L,ax as E,ay as H,az as se,a3 as z,Y as U,aw as re,av as ue,l as ie,L as ce,ag as F,aA as pe,a8 as me,_ as de,B as C,aB as fe,aj as V,ah as J,ai as be,ak as ge,F as he}from"./index-D2gfy4BV.js";import{f as Y,_ as _e,a as ve,b as ye,c as Be,d as ke}from"./job-task-list-table.vue_vue_type_script_setup_true_lang-BWfE14-k.js";import{_ as we,u as je,a as De}from"./table-CBd8wgyy.js";import{_ as Se}from"./select-group.vue_vue_type_script_setup_true_lang-BaCzN5y0.js";import{_ as Ne,a as xe}from"./task-batch-status.vue_vue_type_script_setup_true_lang-D1r86YH8.js";import{_ as Re}from"./datetime-range.vue_vue_type_script_setup_true_lang-quYHVz0P.js";import{f as Te}from"./job-zG0yc1zw.js";import{_ as $e}from"./log-drawer-BYtEGha_.js";import{_ as Ce}from"./detail-drawer-CQjfY8zD.js";import{_ as Je,a as Le}from"./DescriptionsItem-LCBYJ9Xx.js";import{b as Ue}from"./Grid-DUVCwFN_.js";import"./group-CHo9Y09B.js";import"./CollapseItem-BF9JL9RU.js";const Ie=A({name:"JobBatchSearch",__name:"job-batch-search",props:{model:{required:!0},modelModifiers:{}},emits:O(["reset","search"],["update:model"]),setup(v,{emit:T}){const y=R(!1),h=T,B=R([]),c=G(v,"model"),_=R(c.value.jobName);function u(){_.value="",h("reset")}function b(){h("search")}async function f(){const i=await Te({keywords:_.value,groupName:c.value.groupName});B.value=i.data}function k(i){c.value.jobId=i}ne(()=>_.value,i=>{i.length!==0?f():y.value=!1});function $(i){return i.map(p=>({value:p.id,label:p.jobName}))}function S(i){return[i.label,`(${i.value})`]}return(i,p)=>{const w=we,N=xe,n=oe;return I(),q(n,{"btn-span":"12 s:24 m:10 l:12 xl:16",model:c.value,onSearch:b,onReset:u},{default:s(()=>[e(w,{span:"24 s:12 m:8",label:t(a)("page.jobBatch.groupName"),path:"groupName",class:"pr-24px"},{default:s(()=>[e(Se,{value:c.value.groupName,"onUpdate:value":p[0]||(p[0]=r=>c.value.groupName=r),clearable:""},null,8,["value"])]),_:1},8,["label"]),e(w,{span:"24 s:12 m:8",label:t(a)("page.jobBatch.jobName"),path:"jobName",class:"pr-24px"},{default:s(()=>[e(N,{value:_.value,"onUpdate:value":p[1]||(p[1]=r=>_.value=r),placeholder:t(a)("page.jobBatch.form.jobName"),options:$(B.value),"empty-visible":y.value,clearable:"",filterable:"","render-label":S,onSelect:k},null,8,["value","placeholder","options","empty-visible"])]),_:1},8,["label"]),e(w,{span:"24 s:12 m:8",label:t(a)("page.jobBatch.taskBatchStatus"),path:"taskBatchStatus",class:"pr-24px"},{default:s(()=>[e(Ne,{value:c.value.taskBatchStatus,"onUpdate:value":p[2]||(p[2]=r=>c.value.taskBatchStatus=r),clearable:""},null,8,["value"])]),_:1},8,["label"]),e(w,{span:"24 s:24 m:14 l:12 xl:8",label:t(a)("page.common.createTime"),path:"datetimeRange",class:"pr-24px"},{default:s(()=>[e(Re,{value:c.value.datetimeRange,"onUpdate:value":p[3]||(p[3]=r=>c.value.datetimeRange=r)},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),Pe=A({name:"JobBatchDetailDrawer",__name:"job-batch-detail-drawer",props:O({rowData:{default:null},log:{type:Boolean,default:!1}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(v){const T=v,y=G(v,"visible"),h=R(),B=R(!1);async function c(u){B.value=!0,h.value=u}async function _(){var b;const{error:u}=await Y(T.rowData.id);u||(b=window.$message)==null||b.success(a("common.operateSuccess"))}return(u,b)=>{const f=Je,k=U,$=Le,S=re,i=_e,p=ue,w=Ce,N=$e;return I(),K(z,null,[e(w,{modelValue:y.value,"onUpdate:modelValue":b[0]||(b[0]=n=>y.value=n),title:t(a)("page.jobBatch.detail"),width:["50%","90%"]},{default:s(()=>[e(p,{type:"segment",animated:"","default-value":u.log?1:0},{default:s(()=>[e(S,{name:0,tab:t(a)("page.log.info")},{default:s(()=>[e($,{class:"pt-16px","label-placement":"top",bordered:"",column:2},{default:s(()=>[e(f,{label:t(a)("page.jobBatch.groupName")},{default:s(()=>{var n;return[j(D((n=u.rowData)==null?void 0:n.groupName),1)]}),_:1},8,["label"]),e(f,{label:t(a)("page.jobBatch.jobName")},{default:s(()=>{var n;return[j(D((n=u.rowData)==null?void 0:n.jobName),1)]}),_:1},8,["label"]),e(f,{label:t(a)("page.jobBatch.taskBatchStatus")},{default:s(()=>{var n;return[e(k,{type:t(L)((n=u.rowData)==null?void 0:n.taskBatchStatus)},{default:s(()=>{var r;return[j(D(t(a)(t(E)[(r=u.rowData)==null?void 0:r.taskBatchStatus])),1)]}),_:1},8,["type"])]}),_:1},8,["label"]),e(f,{label:t(a)("page.jobBatch.executionAt")},{default:s(()=>{var n;return[j(D((n=u.rowData)==null?void 0:n.executionAt),1)]}),_:1},8,["label"]),e(f,{label:t(a)("page.jobBatch.operationReason")},{default:s(()=>{var n;return[e(k,{type:t(L)((n=u.rowData)==null?void 0:n.operationReason)},{default:s(()=>{var r;return[j(D(t(a)(t(H)[(r=u.rowData)==null?void 0:r.operationReason])),1)]}),_:1},8,["type"])]}),_:1},8,["label"]),e(f,{label:t(a)("page.jobBatch.executorType")},{default:s(()=>{var n;return[e(k,{type:t(L)((n=u.rowData)==null?void 0:n.executorType)},{default:s(()=>{var r;return[j(D(t(a)(t(se)[(r=u.rowData)==null?void 0:r.executorType])),1)]}),_:1},8,["type"])]}),_:1},8,["label"]),e(f,{label:t(a)("page.jobBatch.executorInfo"),span:2},{default:s(()=>{var n;return[j(D((n=u.rowData)==null?void 0:n.executorInfo),1)]}),_:1},8,["label"]),e(f,{label:t(a)("common.createDt"),span:2},{default:s(()=>{var n;return[j(D((n=u.rowData)==null?void 0:n.createDt),1)]}),_:1},8,["label"])]),_:1})]),_:1},8,["tab"]),e(S,{name:1,tab:t(a)("page.log.title"),"display-directive":"if"},{default:s(()=>[e(i,{"row-data":u.rowData,onShowLog:c,onRetry:_},null,8,["row-data"])]),_:1},8,["tab"])]),_:1},8,["default-value"])]),_:1},8,["modelValue","title"]),e(N,{show:B.value,"onUpdate:show":b[1]||(b[1]=n=>B.value=n),title:t(a)("page.log.title"),"task-data":h.value},null,8,["show","title","task-data"])],64)}}}),Me=ie(Pe,[["__scopeId","data-v-e5f932b6"]]),Ve={class:"min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"};function x(v){return typeof v=="function"||Object.prototype.toString.call(v)==="[object Object]"&&!ge(v)}const ea=A({name:"job_batch",__name:"index",setup(v){const T=ce(),y=R(),{bool:h,setTrue:B}=F(!1),{bool:c,setBool:_}=F(!1),u=history.state.jobName,b=history.state.jobId,f=history.state.taskBatchStatus,{columnChecks:k,columns:$,data:S,getData:i,loading:p,mobilePagination:w,searchParams:N,resetSearchParams:n}=je({apiFn:ve,apiParams:{page:1,size:10,groupName:null,jobName:null,taskBatchStatus:null,jobId:null,datetimeRange:pe()},searchParams:{jobId:b,jobName:u,taskBatchStatus:f},columns:()=>[{type:"selection",width:30},{key:"id",align:"center",width:60,title:()=>e("div",{class:"flex-center"},[e("span",null,[a("page.jobBatch.jobTask.id")]),e(me,{trigger:"hover"},{trigger:()=>e("span",{class:"mb-2px ml-5px text-16px"},[e(de,{icon:"ant-design:info-circle-outlined"},null)]),default:()=>e("span",null,[a("common.idDetailTip")])})]),render:o=>{function l(){y.value=o,_(!1),B()}return e(C,{text:!0,tag:"a",type:"primary",onClick:l,class:"ws-normal"},{default:()=>[o.id]})}},{key:"groupName",title:a("page.jobBatch.groupName"),align:"left",width:120},{key:"taskType",title:a("page.jobBatch.taskType"),align:"center",width:120,render:o=>{if(o.taskType===null)return null;const l={1:"info",2:"success",3:"error",4:"primary",5:"warning"},m=a(fe[o.taskType]);return e(U,{type:l[o.taskType]},x(m)?m:{default:()=>[m]})}},{key:"jobName",title:a("page.jobBatch.jobName"),align:"center",width:120},{key:"executionAt",title:a("page.jobBatch.executionAt"),align:"center",width:120},{key:"taskBatchStatus",title:a("page.jobBatch.taskBatchStatus"),align:"center",width:120,render:o=>{if(o.taskBatchStatus===null)return null;const l=a(E[o.taskBatchStatus]);return e(U,{type:{1:"info",2:"info",3:"info",4:"error",5:"error",6:"error"}[o.taskBatchStatus]},x(l)?l:{default:()=>[l]})}},{key:"operationReason",title:a("page.jobBatch.operationReason"),align:"center",width:120,render:o=>{if(o.operationReason===null)return null;const l=a(H[o.operationReason]);return e(U,{type:L(o.operationReason)},x(l)?l:{default:()=>[l]})}},{key:"createDt",title:a("common.createDt"),align:"center",width:120},{key:"operate",title:a("common.operate"),align:"center",width:160,render:o=>{let l;const m=()=>o.taskBatchStatus===1||o.taskBatchStatus===2?e(z,null,[e(V,{vertical:!0},null),e(M,{onPositiveClick:()=>te(o.id)},{default:()=>a("common.confirmStop"),trigger:()=>{let d;return e(C,{type:"error",text:!0,ghost:!0,size:"small"},x(d=a("common.stop"))?d:{default:()=>[d]})}})]):null,P=()=>o.taskBatchStatus===4||o.taskBatchStatus===5||o.taskBatchStatus===6?e(z,null,[e(V,{vertical:!0},null),e(M,{onPositiveClick:()=>ae(o.id)},{default:()=>a("common.confirmRetry"),trigger:()=>{let d;return e(C,{type:"error",text:!0,ghost:!0,size:"small"},x(d=a("common.retry"))?d:{default:()=>[d]})}})]):null;return e("div",{class:"flex-center gap-8px"},[e(C,{type:"primary",text:!0,ghost:!0,size:"small",onClick:()=>ee(o)},x(l=a("common.log"))?l:{default:()=>[l]}),m(),P(),e(V,{vertical:!0},null),e(M,{onPositiveClick:()=>W(o.id)},{default:()=>a("common.confirmDelete"),trigger:()=>{let d;return e(C,{type:"error",text:!0,ghost:!0,size:"small"},x(d=a("common.delete"))?d:{default:()=>[d]})}})])}}]}),{checkedRowKeys:r,onDeleted:Z,onBatchDeleted:Q}=De(S,i);async function W(o){const{error:l}=await ye(o);l||Z()}async function X(){const{error:o}=await Be(r.value);o||Q()}function ee(o){y.value=o,_(!0),B()}async function ae(o){var m;const{error:l}=await Y(o);l||((m=window.$message)==null||m.success(a("common.operateSuccess")),i())}async function te(o){var m;const{error:l}=await ke(o);l||((m=window.$message)==null||m.success(a("common.operateSuccess")),i())}return(o,l)=>{const m=le,P=Ue,d=he;return I(),K("div",Ve,[e(Ie,{model:t(N),"onUpdate:model":l[0]||(l[0]=g=>J(N)?N.value=g:null),onReset:t(n),onSearch:t(i)},null,8,["model","onReset","onSearch"]),e(d,{title:t(a)("page.jobBatch.title"),bordered:!1,size:"small",class:"sm:flex-1-hidden card-wrapper","header-class":"view-card-header"},{"header-extra":s(()=>[e(m,{columns:t(k),"onUpdate:columns":l[1]||(l[1]=g=>J(k)?k.value=g:null),"disabled-delete":t(r).length===0,loading:t(p),"show-add":!1,onDelete:X,onRefresh:t(i)},null,8,["columns","disabled-delete","loading","onRefresh"])]),default:s(()=>[e(P,{"checked-row-keys":t(r),"onUpdate:checkedRowKeys":l[2]||(l[2]=g=>J(r)?r.value=g:null),columns:t($),data:t(S),"flex-height":!t(T).isMobile,"scroll-x":1200,loading:t(p),remote:"","row-key":g=>g.id,pagination:t(w),class:"sm:h-full"},null,8,["checked-row-keys","columns","data","flex-height","loading","row-key","pagination"])]),_:1},8,["title"]),t(h)?(I(),q(Me,{key:0,visible:t(h),"onUpdate:visible":l[3]||(l[3]=g=>J(h)?h.value=g:null),log:t(c),"onUpdate:log":l[4]||(l[4]=g=>J(c)?c.value=g:null),"row-data":y.value},null,8,["visible","log","row-data"])):be("",!0)])}}});export{ea as default};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy