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
4.8 KiB
JavaScript

var u=(l,d,s)=>new Promise((y,g)=>{var h=n=>{try{c(s.next(n))}catch(f){g(f)}},p=n=>{try{c(s.throw(n))}catch(f){g(f)}},c=n=>n.done?y(n.value):Promise.resolve(n.value).then(h,p);c((s=s.apply(l,d)).next())});import{P as D}from"./index-CnbNoayZ.js";import{_ as E}from"./index-C9M9_65F.js";import{a as R}from"./index-f0QZpUsU.js";import{i as T,c as V,e as N}from"./index-DD-pEMqc.js";import{u as P,_ as F}from"./useTable-CUkvZ0go.js";import{_ as w}from"./index-DVy1eUzr.js";import{u as K}from"./useRender-C6_44OXE.js";import{D as B}from"./dictEnum-DeC8h6ZR.js";import{bu as $,bh as A,bv as W,u as L,I as b,_ as U}from"./entry/index-C2Ijy48E-1723706691540.js";import{ao as M,ap as S,y as q}from"./antd-BY-1PcYE.js";import{d as z,f as I,r as G,o as H,_,a8 as k,a9 as m,k as r,u as a,ad as j,ac as x,ak as J,al as O,$ as Q,F as X}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"./index-fya05jI8.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";const{renderDict:Y}=K(),Z=[{dataIndex:"processDefinitionName",title:"流程名称"},{dataIndex:"processDefinitionKey",title:"流程key"},{dataIndex:"processDefinitionVersion",title:"版本号",customRender({value:l}){return`V${l}.0`}},{dataIndex:"businessStatus",title:"流程状态",customRender({value:l}){return Y(l,B.WF_BUSINESS_STATUS)}},{dataIndex:"startTime",title:"启动时间"}],ee=[{field:"name",label:"流程名称",component:"Input"}],te=z({__name:"myDocument",setup(l){const d=I(""),s=G({tree:[],selectId:[]}),y=I(!0);function g(){return u(this,null,function*(){yield p()})}H(()=>u(this,null,function*(){const e=yield R();let t=$(e,{id:"id",pid:"parentId"});t=[{categoryName:"根目录",id:0,children:t}],A(t,i=>{i.icon="flat-color-icons:folder"}),W(t,"categoryName"," / "),s.tree=t,y.value=!1}));const[h,{reload:p}]=P({rowSelection:{type:"checkbox"},title:"我发起的流程列表",showIndexColumn:!1,api:T,rowKey:"id",useSearchForm:!0,formConfig:{schemas:ee,baseColProps:{xs:24,sm:24,md:24,lg:6},labelWidth:80,resetFunc:()=>u(this,null,function*(){s.selectId=[],d.value=""})},columns:Z,beforeFetch(e){return s.selectId.length===1&&(e.categoryCode=s.selectId[0]),e},actionColumn:{width:220,title:"操作",key:"action",fixed:"right"}}),c=L();function n(e){const t=e.wfNodeConfigVo.wfFormManageVo.router;c({path:t,query:{id:e.businessKey,type:"preview"}})}function f(e){return u(this,null,function*(){yield V(e.businessKey),yield p()})}function C(e){const t=e.wfNodeConfigVo.wfFormManageVo.router;c({path:t,query:{id:e.businessKey,type:"update"}})}function v(e){return u(this,null,function*(){yield N([e.businessKey]),yield p()})}return(e,t)=>(_(),k(a(D),{dense:""},{default:m(()=>[r(a(M),null,{default:m(()=>[r(a(S),j({xs:24,sm:24,md:24,lg:4},{class:"h-[calc(100vh-80px)]"}),{default:m(()=>[r(a(q),{active:!0,paragraph:{rows:8},loading:y.value},{default:m(()=>[s.tree.length?(_(),k(a(E),{key:0,fieldNames:{title:"categoryName",key:"categoryCode"},"tree-data":s.tree,showLine:{showLeafIcon:!1},search:!0,searchValue:d.value,"onUpdate:searchValue":t[0]||(t[0]=i=>d.value=i),defaultExpandAll:"",onSelect:g,selectedKeys:s.selectId,"onUpdate:selectedKeys":t[1]||(t[1]=i=>s.selectId=i)},null,8,["tree-data","searchValue","selectedKeys"])):x("",!0)]),_:1},8,["loading"])]),_:1},16),r(a(S),J(O({xs:24,sm:24,md:24,lg:20})),{default:m(()=>[r(a(F),{onRegister:a(h)},{bodyCell:m(({column:i,record:o})=>[i.key==="action"?(_(),Q(X,{key:0},[r(a(w),{stopButtonPropagation:"",actions:[{label:"记录",icon:a(b).PREVIEW,onClick:n.bind(null,o)},{label:"重新提交",icon:a(b).EDIT,onClick:C.bind(null,o),ifShow:o.businessStatus==="draft"||o.businessStatus==="cancel"||o.businessStatus==="back"}]},null,8,["actions"]),r(a(w),{stopButtonPropagation:"",actions:[{label:"删除",icon:a(b).PREVIEW,danger:!0,popConfirm:{title:"是否确认删除",placement:"left",confirm:v.bind(null,o)},ifShow:o.businessStatus==="draft"||o.businessStatus==="cancel"||o.businessStatus==="back"},{label:"撤销",icon:a(b).DELETE,danger:!0,popConfirm:{placement:"left",title:`是否确认撤销[${o.processDefinitionName}]流程?`,confirm:f.bind(null,o)},ifShow:o.businessStatus==="waiting"}]},null,8,["actions"])],64)):x("",!0)]),_:1},8,["onRegister"])]),_:1},16)]),_:1})]),_:1}))}}),Ne=U(te,[["__scopeId","data-v-a982fe70"]]);export{Ne as default};