2 lines
6.8 KiB
JavaScript
2 lines
6.8 KiB
JavaScript
![]() |
import{a as A,b as G,N as O}from"./search-form-CKlPFgxd.js";import{d as U,a0 as T,a1 as I,c as M,o as C,ad as j,h as o,ae as q,av as K,$ as t,r as D,q as E,w as h,f as l,c1 as H,L as Z,bl as J,b as Q,ag as W,G as X,B as $,aw as Y,Z as P,ax as ee,a3 as ae,ah as te,ai as oe}from"./index-CW-HgCkC.js";import{f as le,a as ne,b as se,c as re,d as ce}from"./workflow-B0zDTn3x.js";import{_ as ue,u as ie,a as me}from"./table-pZMqSpSu.js";import{_ as pe}from"./select-group.vue_vue_type_script_setup_true_lang-QkZyy-_Q.js";import{_ as de}from"./datetime-range.vue_vue_type_script_setup_true_lang-DJx4jqU-.js";import{_ as fe}from"./AutoComplete-Clfayd_L.js";import{b as he}from"./Grid-DNunwvuN.js";import"./CollapseItem-_OeQO-9P.js";import"./group-Bv7in7Sf.js";const we=U({name:"TaskBatchStatus",__name:"task-batch-status",props:T({disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const w=c,p=I(c,"modelValue");return(_,d)=>{const s=j;return C(),M(s,{value:p.value,"onUpdate:value":d[0]||(d[0]=u=>p.value=u),placeholder:o(t)("common.taskBatchStatus.form"),options:o(q)(o(K)),disabled:w.disabled,clearable:w.clearable},null,8,["value","placeholder","options","disabled","clearable"])}}}),ke=U({name:"WorkflowBatchSearch",__name:"workflow-batch-search",props:{model:{required:!0},modelModifiers:{}},emits:T(["reset","search"],["update:model"]),setup(c,{emit:w}){const p=D(!1),_=w,d=D([]),s=I(c,"model"),u=D(s.value.workflowName);function v(){u.value="",_("reset")}function B(){_("search")}async function k(){const r=await le({keywords:u.value,groupName:s.value.groupName});d.value=r.data}function y(r){s.value.workflowId=r}E(()=>u.value,r=>{r.length!==0?k():p.value=!1});function x(r){return r.map(n=>({value:n.id,label:n.workflowName}))}function b(r){return[r.label,`(${r.value})`]}return(r,n)=>{const g=ue,N=fe,R=A;return C(),M(R,{"btn-span":"12 s:24 m:10 l:12 xl:16",model:s.value,onSearch:B,onReset:v},{default:h(()=>[l(g,{span:"24 s:12 m:8",label:o(t)("page.workflowBatch.groupName"),path:"groupName",class:"pr-24px"},{default:h(()=>[l(pe,{value:s.value.groupName,"onUpdate:value":n[0]||(n[0]=i=>s.value.groupName=i),clearable:""},null,8,["value"])]),_:1},8,["label"]),l(g,{span:"24 s:12 m:8",label:o(t)("page.workflowBatch.workflowName"),"label-width":100,path:"workflowName",class:"pr-24px"},{default:h(()=>[l(N,{value:u.value,"onUpdate:value":n[1]||(n[1]=i=>u.value=i),placeholder:o(t)("page.workflowBatch.form.workflowName"),options:x(d.value),"empty-visible":p.value,clearable:"",filterable:"","render-label":b,onSelect:y},null,8,["value","placeholder","options","empty-visible"])]),_:1},8,["label"]),l(g,{span:"24 s:12 m:8",label:o(t)("page.workflowBatch.taskBatchStatus"),path:"taskBatchStatus",class:"pr-24px"},{default:h(()=>[l(we,{value:s.value.taskBatchStatus,"onUpdate:value":n[2]||(n[2]=i=>s.value.taskBatchStatus=i),clearable:""},null,8,["value"])]),_:1},8,["label"]),l(g,{span:"24 s:24 m:14 l:12 xl:8",label:o(t)("page.common.createTime"),path:"datetimeRange",class:"pr-24px"},{default:h(()=>[l(de,{value:s.value.datetimeRange,"onUpdate:value":n[3]||(n[3]=i=>s.value.datetimeRange=i)},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),ge={class:"min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"};function S(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!oe(c)}const We=U({name:"workflow_batch",__name:"index",setup(c){const w=H(),p=Z(),_=history.state.workflowId,d=history.state.workflowName,s=history.state.taskBatchStatus,{columns:u,columnChecks:v,data:B,getData:k,loading:y,mobilePagination:x,searchParams:b,resetSearchParams:r}=ie({apiFn:se,apiParams:{page:1,size:10,workflowId:null,workflowName:null,groupName:null,taskBatchStatus:null,datetimeRange:J()},searchParams:{workflowId:_,workflowName:d,taskBatchStatus:s},columns:()=>[{type:"selection"},{key:"id",title:t("common.index"),align:"center",width:120,render:e=>{function a(){F(e.id)}return l($,{text:!0,tag:"a",type:"primary",onClick:a,class:"ws-norm
|