You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
5.9 KiB
JavaScript
2 lines
5.9 KiB
JavaScript
var m=(u,p,n)=>new Promise((h,y)=>{var d=i=>{try{f(n.next(i))}catch(l){y(l)}},b=i=>{try{f(n.throw(i))}catch(l){y(l)}},f=i=>i.done?h(i.value):Promise.resolve(i.value).then(d,b);f((n=n.apply(u,p)).next())});import{P as q}from"./index-CnbNoayZ.js";import{_ as z}from"./index-C9M9_65F.js";import{a as X}from"./index-f0QZpUsU.js";import{u as Y,_ as j}from"./useTable-CUkvZ0go.js";import{_ as S}from"./index-DVy1eUzr.js";import{u as J}from"./useRender-C6_44OXE.js";import{D as O}from"./dictEnum-DeC8h6ZR.js";import{bu as Q,bh as Z,bv as ee,u as te,I as R,_ as ae}from"./entry/index-C2Ijy48E-1723706691540.js";import{u as x}from"./index-fya05jI8.js";import{b as k,e as ne,f as oe,h as se}from"./index-DD-pEMqc.js";import{_ as ie}from"./SwitchVersionModal.vue_vue_type_script_setup_true_lang-AkwSnIB6.js";import{_ as le}from"./CancelModal.vue_vue_type_script_setup_true_lang-f8JLvYX3.js";import{ao as re,ap as T,y as ce,Y as de,X as V}from"./antd-BY-1PcYE.js";import{d as ue,f as v,r as me,o as pe,c as fe,aa as ge,_ as I,a8 as D,a9 as s,k as o,u as e,ad as he,ac as P,ak as ye,al as _e,G as w,$ as be,F as ve}from"./vue-aEZWZQSa.js";import"./useContentViewHeight-BBd42TOY.js";import"./useWindowSizeFn-CjdUjzGl.js";import"./onMountedOrActivated-BIJ0U1R1.js";import"./useForm-fILnWqWp.js";import"./FormItem.vue_vue_type_script_lang-CKJUw6EQ.js";import"./componentMap-zBHKqdNc.js";import"./RadioButtonGroup.vue_vue_type_script_setup_true_lang-CVQ-sEzT.js";import"./copyTextToClipboard-BBFF3Y3I.js";import"./style-apcQnL4e.js";import"./helper-D0Efh3UP.js";import"./BasicForm.vue_vue_type_style_index_0_lang-D499EpF5.js";import"./sortable.esm-CnNXHMH-.js";import"./useSortable-Bra4jKJL.js";import"./download-Cu3oizbN.js";import"./useLoading-C2GeNIUj.js";import"./index-JkNHdZh2.js";import"./dict-1X4Pwk-Z.js";import"./index-Dq1SzBPy.js";const{renderTag:Ie,renderDict:we}=J(),_=[{dataIndex:"processDefinitionName",title:"流程名称"},{dataIndex:"processDefinitionKey",title:"流程key"},{dataIndex:"processDefinitionVersion",title:"版本号",customRender({value:u}){return Ie(`V${u}.0`,"blue")}},{dataIndex:"businessStatus",title:"流程状态",customRender({value:u}){return we(u,O.WF_BUSINESS_STATUS)}},{dataIndex:"startTime",title:"启动时间"},{dataIndex:"endTime",title:"结束时间",ifShow:!1}],Ce=[{field:"name",label:"流程名称",component:"Input"},{field:"key",label:"流程key",component:"Input"}],Se=ue({name:"ProcessInstance",__name:"index",setup(u){const p=v(""),n=me({tree:[],selectId:[]}),h=v(!0);function y(){return m(this,null,function*(){yield l()})}const d=v("running");function b(){return m(this,null,function*(){const a=d.value==="running"?k:se;i({api:a}),_[_.length-1].ifShow=d.value==="finished",F(_),K([]),yield l()})}pe(()=>m(this,null,function*(){const a=yield X();let t=Q(a,{id:"id",pid:"parentId"});t=[{categoryName:"根目录",id:0,children:t}],Z(t,g=>{g.icon="flat-color-icons:folder"}),ee(t,"categoryName"," / "),n.tree=t,h.value=!1}));const[f,{setProps:i,reload:l,selected:N,multipleRemove:E,setColumns:F,setTableData:K}]=Y({rowSelection:{type:"checkbox"},title:"流程实例列表",showIndexColumn:!1,api:k,rowKey:"businessKey",useSearchForm:!0,formConfig:{schemas:Ce,baseColProps:{xs:24,sm:24,md:24,lg:6},labelWidth:80,resetFunc:()=>m(this,null,function*(){n.selectId=[],p.value=""})},columns:_,beforeFetch(a){return n.selectId.length===1&&(a.categoryCode=n.selectId[0]),a},actionColumn:{title:"操作",key:"action",fixed:"right"}}),B=te();function M(a){const t=a.wfNodeConfigVo.wfFormManageVo.router;B({path:t,query:{id:a.businessKey,type:"preview"}})}const[$,{openModal:A}]=x();function U(a){const{processDefinitionKey:t,processDefinitionId:g}=a;A(!0,{processDefinitionKey:t,processDefinitionId:g})}const[L,{openModal:W}]=x();function G(a){const{businessKey:t}=a;W(!0,t)}const C=fe(()=>d.value==="running"?ne:oe);function H(a){return m(this,null,function*(){yield C.value([a.businessKey]),yield l()})}return(a,t)=>{const g=ge("a-button");return I(),D(e(q),{dense:""},{default:s(()=>[o(e(re),null,{default:s(()=>[o(e(T),he({xs:24,sm:24,md:24,lg:4},{class:"h-[calc(100vh-80px)]"}),{default:s(()=>[o(e(ce),{active:!0,paragraph:{rows:8},loading:h.value},{default:s(()=>[n.tree.length?(I(),D(e(z),{key:0,fieldNames:{title:"categoryName",key:"categoryCode"},"tree-data":n.tree,showLine:{showLeafIcon:!1},search:!0,searchValue:p.value,"onUpdate:searchValue":t[0]||(t[0]=r=>p.value=r),defaultExpandAll:"",onSelect:y,selectedKeys:n.selectId,"onUpdate:selectedKeys":t[1]||(t[1]=r=>n.selectId=r)},null,8,["tree-data","searchValue","selectedKeys"])):P("",!0)]),_:1},8,["loading"])]),_:1},16),o(e(T),ye(_e({xs:24,sm:24,md:24,lg:20})),{default:s(()=>[o(e(j),{onRegister:e(f)},{toolbar:s(()=>[o(g,{class:"<sm:hidden",type:"primary",danger:"",onClick:t[2]||(t[2]=r=>e(E)(C.value)),disabled:!e(N)},{default:s(()=>[w("删除")]),_:1},8,["disabled"]),o(e(de),{"button-style":"solid",value:d.value,"onUpdate:value":t[3]||(t[3]=r=>d.value=r),onChange:b},{default:s(()=>[o(e(V),{value:"running"},{default:s(()=>[w("运行中")]),_:1}),o(e(V),{value:"finished"},{default:s(()=>[w("已完成")]),_:1})]),_:1},8,["value"])]),bodyCell:s(({column:r,record:c})=>[r&&c&&r.key==="action"?(I(),be(ve,{key:0},[o(e(S),{stopButtonPropagation:"",actions:[{label:"审批记录",icon:e(R).PREVIEW,onClick:M.bind(null,c)},{label:"删除",icon:e(R).DELETE,danger:!0,popConfirm:{placement:"left",title:`是否确认删除流程实例[${c.processDefinitionName}]`,confirm:H.bind(null,c)}}]},null,8,["actions"]),o(e(S),{stopButtonPropagation:"",actions:[{label:"切换版本",icon:"mi:switch",onClick:U.bind(null,c),ifShow:c.isSuspended!==null},{label:"作废",icon:"flat-color-icons:cancel",onClick:G.bind(null,c),ifShow:c.isSuspended!==null}]},null,8,["actions"])],64)):P("",!0)]),_:1},8,["onRegister"]),o(ie,{onRegister:e($),onReload:e(l)},null,8,["onRegister","onReload"]),o(le,{onRegister:e(L),onReload:e(l)},null,8,["onRegister","onReload"])]),_:1},16)]),_:1})]),_:1})}}}),ot=ae(Se,[["__scopeId","data-v-516a760a"]]);export{ot as default};
|