2 lines
4.7 KiB
JavaScript
2 lines
4.7 KiB
JavaScript
var P=Object.defineProperty,T=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var I=(i,o,t)=>o in i?P(i,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[o]=t,R=(i,o)=>{for(var t in o||(o={}))$.call(o,t)&&I(i,t,o[t]);if(D)for(var t of D(o))q.call(o,t)&&I(i,t,o[t]);return i},A=(i,o)=>T(i,U(o));var h=(i,o,t)=>new Promise((v,m)=>{var d=e=>{try{g(t.next(e))}catch(n){m(n)}},C=e=>{try{g(t.throw(e))}catch(n){m(n)}},g=e=>e.done?v(e.value):Promise.resolve(e.value).then(d,C);g((t=t.apply(i,o)).next())});import{au as z,bD as J,ay as k,an as w,bI as O,d as L,c4 as Z,a9 as H}from"./bootstrap-CRjSNGHY.js";import{C as K,u as Q}from"./category-draggable-model-B9d19l7u.js";import{b as W,e as X}from"./index-1RBggtF-.js";import{g as Y}from"./index-DiHWGjIU.js";import{_ as ee}from"./form.vue_vue_type_script_setup_true_lang-DajsaAaz.js";import{_ as ae}from"./page.vue_vue_type_script_setup_true_lang-3ywDTU7g.js";import{m as te,b9 as p,bC as oe,b7 as se,w as le,aU as ie,be as re,ab as M,b2 as f,bJ as r,j as l,bL as ne,u as s,ae as S,ad as B,I as ue,bb as de,aR as ce,ai as b,bZ as N}from"../jse/index-index-CMeVxoEG.js";import{u as me}from"./use-modal-BABce5hC.js";import"./index-BrGhbdKk.js";import"./vxe-table-uq8U2E1u.js";import"./dict-tag.vue_vue_type_script_setup_true_lang-BB6x-AyV.js";import"./rename-form.vue_vue_type_script_setup_true_lang-D6lQO9wD.js";import"./data-Czlaka67.js";import"./rangePickerProps-BPpM6dzr.js";import"./biz-system-enum-BAorzMA8.js";import"./dict-enum-CaHgMaDZ.js";import"./detail.vue_vue_type_script_setup_true_lang-D0IDbi5u.js";import"./index-BBo0EC9G.js";import"./helpers-BLW8QKLp.js";import"./index-DLZyKviJ.js";import"./use-vxe-grid-BMVG5Iiw.js";import"./biz-bpm-enum-DQJBn5Qr.js";import"./AlertBuilder-BVlldnPG.js";import"./circle-check-big-DP26Iidw.js";import"./x-CpZ5_sBZ.js";const pe={key:0},fe={class:"flex items-center justify-center"},ve={class:"flex items-center gap-1"},ge={class:"flex items-center gap-1"},ye={key:1,class:"flex h-full items-center justify-between"},be={class:"px-3",ref:"categoryGroupRef"},Je=te({__name:"index",setup(i){const[o,t]=me({connectedComponent:ee,destroyOnClose:!0}),v=p(!1),m=p(!1),d=p([]),C=p([]),g=oe("categoryGroupRef"),e=p(null),n=p(!1),x=se({name:""});le(()=>n.value,u=>{e.value&&(u?e.value.option("disabled",!1):e.value.option("disabled",!0))});function y(){return h(this,null,function*(){v.value=!0;try{const u=yield Y(x.name),a=yield W();d.value=a.map(_=>A(R({},_),{modelList:u.filter(c=>c.categoryName===_.name)})),e.value=null}finally{v.value=!1}})}ie(()=>{y()});function V(){Z.push({name:"BpmModelCreate"})}function j(u){u==="handleCategoryAdd"?t.open():u==="handleCategorySort"&&(C.value=N(d.value),n.value=!0,e.value?e.value.option("disabled",!1):e.value=Q(g,d,{disabled:!1}))}function F(){d.value=N(C.value),n.value=!1,e.value&&e.value.option("disabled",!0)}function G(){return h(this,null,function*(){m.value=!0;try{const u=d.value.map(a=>a.id);yield X(u),H.success("分类排序成功")}finally{m.value=!1}n.value=!1,yield y(),e.value&&e.value.option("disabled",!0)})}return(u,a)=>{const _=re("spinning");return f(),M(s(ae),{"auto-content-height":""},{default:r(()=>[l(s(o),{onSuccess:y}),ne((f(),M(s(z),{"body-style":{padding:"10px"},class:"mb-4",title:"流程模型"},{extra:r(()=>[n.value?(f(),B("div",ye,[l(s(k),{onClick:F,class:"mr-3"},{default:r(()=>[...a[5]||(a[5]=[b(" 取 消 ",-1)])]),_:1}),l(s(k),{type:"primary",loading:m.value,onClick:G},{default:r(()=>[...a[6]||(a[6]=[b(" 保存排序 ",-1)])]),_:1},8,["loading"])])):(f(),B("div",pe,[l(s(J),{value:x.name,"onUpdate:value":a[0]||(a[0]=c=>x.name=c),placeholder:"搜索流程","allow-clear":"",onPressEnter:y,class:"!w-60"},null,8,["value"]),l(s(k),{class:"ml-2",type:"primary",onClick:V},{default:r(()=>[l(s(w),{icon:"lucide:plus"}),a[2]||(a[2]=b(" 新建模型 ",-1))]),_:1}),l(s(O),{class:"ml-2",placement:"bottomRight",arrow:""},{overlay:r(()=>[l(s(L),{onClick:a[1]||(a[1]=c=>j(c.key))},{default:r(()=>[l(s(L).Item,{key:"handleCategoryAdd"},{default:r(()=>[S("div",ve,[l(s(w),{icon:"lucide:plus"}),a[3]||(a[3]=b(" 新建分类 ",-1))])]),_:1}),l(s(L).Item,{key:"handleCategorySort"},{default:r(()=>[S("div",ge,[l(s(w),{icon:"lucide:align-start-vertical"}),a[4]||(a[4]=b(" 分类排序 ",-1))])]),_:1})]),_:1})]),default:r(()=>[l(s(k),null,{icon:r(()=>[S("div",fe,[l(s(w),{icon:"lucide:settings"})])]),_:1})]),_:1})]))]),default:r(()=>[S("div",be,[(f(!0),B(ue,null,de(d.value,(c,E)=>(f(),M(K,{class:ce(n.value?"cursor-move":""),key:c.id,"category-info":c,"is-category-sorting":n.value,"is-first":E===0,onSuccess:y},null,8,["class","category-info","is-category-sorting","is-first"]))),128))],512)]),_:1})),[[_,v.value]])]),_:1})}}});export{Je as default};
|