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

admin.assets.index-B0_BZGPB.js Maven / Gradle / Ivy

The newest version!
import{a as L,N as C,b as M}from"./search-form.vue_vue_type_script_setup_true_lang-Csk6aNWf.js";import{d as U,Z as j,r as D,a0 as z,q,o as T,c as G,w as p,f as t,h as l,$ as o,bT as K,L as V,aA as E,B as W,ax as H,Y as P,ay as Y,a3 as Z,aj as J,b as Q,ah as $,ak as X,F as ee}from"./index-D2gfy4BV.js";import{f as ae,a as te,b as oe,c as le,d as ne}from"./workflow-DL9sDB8e.js";import{_ as se,u as re,a as ce}from"./table-CBd8wgyy.js";import{_ as ie}from"./select-group.vue_vue_type_script_setup_true_lang-BaCzN5y0.js";import{_ as ue,a as me}from"./task-batch-status.vue_vue_type_script_setup_true_lang-D1r86YH8.js";import{_ as pe}from"./datetime-range.vue_vue_type_script_setup_true_lang-quYHVz0P.js";import{b as de}from"./Grid-DUVCwFN_.js";import"./group-CHo9Y09B.js";const fe=U({name:"WorkflowBatchSearch",__name:"workflow-batch-search",props:{model:{required:!0},modelModifiers:{}},emits:j(["reset","search"],["update:model"]),setup(d,{emit:S}){const g=D(!1),_=S,v=D([]),r=z(d,"model"),u=D(r.value.workflowName);function w(){u.value="",_("reset")}function b(){_("search")}async function f(){const s=await ae({keywords:u.value,groupName:r.value.groupName});v.value=s.data}function B(s){r.value.workflowId=s}q(()=>u.value,s=>{s.length!==0?f():g.value=!1});function x(s){return s.map(n=>({value:n.id,label:n.workflowName}))}function k(s){return[s.label,`(${s.value})`]}return(s,n)=>{const h=se,N=me,R=L;return T(),G(R,{"btn-span":"12 s:24 m:10 l:12 xl:16",model:r.value,onSearch:b,onReset:w},{default:p(()=>[t(h,{span:"24 s:12 m:8",label:l(o)("page.workflowBatch.groupName"),path:"groupName",class:"pr-24px"},{default:p(()=>[t(ie,{value:r.value.groupName,"onUpdate:value":n[0]||(n[0]=c=>r.value.groupName=c),clearable:""},null,8,["value"])]),_:1},8,["label"]),t(h,{span:"24 s:12 m:8",label:l(o)("page.workflowBatch.workflowName"),"label-width":100,path:"workflowName",class:"pr-24px"},{default:p(()=>[t(N,{value:u.value,"onUpdate:value":n[1]||(n[1]=c=>u.value=c),placeholder:l(o)("page.workflowBatch.form.workflowName"),options:x(v.value),"empty-visible":g.value,clearable:"",filterable:"","render-label":k,onSelect:B},null,8,["value","placeholder","options","empty-visible"])]),_:1},8,["label"]),t(h,{span:"24 s:12 m:8",label:l(o)("page.workflowBatch.taskBatchStatus"),path:"taskBatchStatus",class:"pr-24px"},{default:p(()=>[t(ue,{value:r.value.taskBatchStatus,"onUpdate:value":n[2]||(n[2]=c=>r.value.taskBatchStatus=c),clearable:""},null,8,["value"])]),_:1},8,["label"]),t(h,{span:"24 s:24 m:14 l:12 xl:8",label:l(o)("page.common.createTime"),path:"datetimeRange",class:"pr-24px"},{default:p(()=>[t(pe,{value:r.value.datetimeRange,"onUpdate:value":n[3]||(n[3]=c=>r.value.datetimeRange=c)},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),he={class:"min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"};function y(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!X(d)}const xe=U({name:"workflow_batch",__name:"index",setup(d){const S=K(),g=V(),_=history.state.workflowId,v=history.state.workflowName,r=history.state.taskBatchStatus,{columns:u,columnChecks:w,data:b,getData:f,loading:B,mobilePagination:x,searchParams:k,resetSearchParams:s}=re({apiFn:te,apiParams:{page:1,size:10,workflowId:null,workflowName:null,groupName:null,taskBatchStatus:null,datetimeRange:E()},searchParams:{workflowId:_,workflowName:v,taskBatchStatus:r},columns:()=>[{type:"selection"},{key:"id",title:o("common.index"),align:"center",width:120,render:e=>{function a(){I(e.id)}return t(W,{text:!0,tag:"a",type:"primary",onClick:a,class:"ws-normal"},{default:()=>[e.id]})}},{key:"workflowName",title:o("page.workflowBatch.workflowName"),align:"left",minWidth:120},{key:"groupName",title:o("page.workflowBatch.groupName"),align:"left",minWidth:120},{key:"executionAt",title:o("page.workflowBatch.executionAt"),align:"left",minWidth:120},{key:"taskBatchStatus",title:o("page.workflowBatch.taskBatchStatus"),align:"left",minWidth:120,render:e=>{if(!e.taskBatchStatus)return null;const a={1:"info",2:"success",3:"success",4:"error",5:"warning",6:"warning"},i=o(H[e.taskBatchStatus]);return t(P,{type:a[e.taskBatchStatus]},y(i)?i:{default:()=>[i]})}},{key:"operationReason",title:o("page.workflowBatch.operationReason"),align:"left",minWidth:120,render:e=>{if(!e.operationReason)return null;const a=o(Y[e.operationReason]);return t(P,{type:"warning"},y(a)?a:{default:()=>[a]})}},{key:"createDt",title:o("page.workflowBatch.createDt"),align:"left",minWidth:120},{key:"operate",title:o("common.operate"),align:"center",width:130,render:e=>t("div",{class:"flex-center gap-8px"},[(e==null?void 0:e.taskBatchStatus)===1||(e==null?void 0:e.taskBatchStatus)===2?t(Z,null,[t(C,{onPositiveClick:()=>F(e.id)},{default:()=>o("common.confirmStop"),trigger:()=>{let a;return t(W,{type:"error",text:!0,ghost:!0,size:"small"},y(a=o("common.stop"))?a:{default:()=>[a]})}}),t(J,{vertical:!0},null)]):"",t(C,{onPositiveClick:()=>R(e.id)},{default:()=>o("common.confirmDelete"),trigger:()=>{let a;return t(W,{type:"error",text:!0,ghost:!0,size:"small"},y(a=o("common.delete"))?a:{default:()=>[a]})}})])}]}),{checkedRowKeys:n,onDeleted:h,onBatchDeleted:N}=ce(b,f);async function R(e){const{error:a}=await oe(e);a||h()}async function c(){const{error:e}=await ne(n.value);e||N()}async function F(e){var i;const{error:a}=await le(e);a||((i=window.$message)==null||i.success(o("common.executeSuccess")),f())}function I(e){S.push({path:"/workflow/form/batch",query:{id:e}})}return(e,a)=>{const i=M,O=de,A=ee;return T(),Q("div",he,[t(fe,{model:l(k),"onUpdate:model":a[0]||(a[0]=m=>$(k)?k.value=m:null),onReset:l(s),onSearch:l(f)},null,8,["model","onReset","onSearch"]),t(A,{title:l(o)("page.workflowBatch.title"),bordered:!1,size:"small",class:"sm:flex-1-hidden card-wrapper","header-class":"view-card-header"},{"header-extra":p(()=>[t(i,{columns:l(w),"onUpdate:columns":a[1]||(a[1]=m=>$(w)?w.value=m:null),"disabled-delete":l(n).length===0,loading:l(B),"show-add":!1,onDelete:c,onRefresh:l(f)},null,8,["columns","disabled-delete","loading","onRefresh"])]),default:p(()=>[t(O,{"checked-row-keys":l(n),"onUpdate:checkedRowKeys":a[2]||(a[2]=m=>$(n)?n.value=m:null),columns:l(u),data:l(b),"flex-height":!l(g).isMobile,"scroll-x":962,loading:l(B),remote:"","row-key":m=>m.id,pagination:l(x),class:"sm:h-full"},null,8,["checked-row-keys","columns","data","flex-height","loading","row-key","pagination"])]),_:1},8,["title"])])}}});export{xe as default};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy