| 1 |
- var j=Object.defineProperty,z=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var x=(i,e,t)=>e in i?j(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,B=(i,e)=>{for(var t in e||(e={}))K.call(e,t)&&x(i,t,e[t]);if(D)for(var t of D(e))L.call(e,t)&&x(i,t,e[t]);return i},F=(i,e)=>z(i,G(e));var I=(i,e,t)=>new Promise((u,c)=>{var p=a=>{try{d(t.next(a))}catch(f){c(f)}},v=a=>{try{d(t.throw(a))}catch(f){c(f)}},d=a=>a.done?u(a.value):Promise.resolve(a.value).then(p,v);d((t=t.apply(i,e)).next())});import{a as P,r as k,ci as Q,f2 as S,aa as W,ae as X,O as $,a8 as q,o as m,e as H,i as T,x as n,Q as y,h as r,y as l,z as g,fX as h,af as b,w as J,G as Y}from"./index.ae52ebae.js";import{T as _}from"./index.4040b11d.js";import{B as Z}from"./TableImg.0cd3291c.js";import{T as tt}from"./BasicForm.d58d202f.js";import{u as et}from"./useTable.578ae310.js";import{u as ot}from"./index.3ccc18ac.js";import{c as st,s as rt,_ as it}from"./FormModal.d2aef216.js";import{f as at,r as nt}from"./sysDeptApi.db932b75.js";import"./index.e3129508.js";import"./eagerComputed.94e91cab.js";import"./css.bcd121de.js";import"./index.adbf62a5.js";import"./index.52c33256.js";import"./index.0321d0be.js";import"./Checkbox.919eb32a.js";import"./index.beed4ab5.js";import"./scrollTo.d4c332b7.js";import"./useForm.e55162bc.js";import"./index.11cb8430.js";import"./index.c4be8493.js";import"./index.ddcc0e35.js";import"./useSize.9b10dc05.js";import"./onMountedOrActivated.c176aad3.js";import"./useWindowSizeFn.d176b3a5.js";import"./useContentViewHeight.2a59a8a3.js";import"./ArrowLeftOutlined.0f7d1b9e.js";import"./index.a995b471.js";import"./index.14e14872.js";import"./index.0c29338b.js";import"./index.0fe57a5b.js";import"./_baseIteratee.432be787.js";import"./get.0b1c6ac7.js";import"./DeleteOutlined.707204c0.js";import"./index.87b4cc3a.js";import"./useRefs.fe3bdf15.js";import"./Form.1cc72784.js";import"./Col.605699c9.js";import"./useFlexGapSupport.3240d255.js";import"./index.c1d6a1f9.js";import"./sortable.esm.c20789c1.js";import"./RedoOutlined.80b8c01a.js";import"./FullscreenOutlined.b9fd5be6.js";import"./index.5d87e81e.js";import"./index.95f887db.js";import"./index.9e0f8a6b.js";/* empty css */import"./index.37fc506d.js";import"./index.5c0d538f.js";import"./uniqBy.7b5fdd96.js";import"./index.3eedf359.js";import"./index.3b88ad02.js";import"./useContextMenu.6088df26.js";import"./index.5e5e8ba1.js";const pe=P({__name:"index",props:{nodeId:{type:String}},emits:["refresh-tree"],setup(i,{expose:e,emit:t}){const u=i,c=k([]),p=k([]);Q(()=>I(this,null,function*(){c.value=yield S({dictCode:"sys_status"}),p.value=yield S({dictCode:"sys_org_type"})}));const{createMessage:v}=Y(),[d,{openModal:a}]=ot(),[f,{reload:w}]=et({title:"\u90E8\u95E8\u5217\u8868",api:at,rowKey:"id",columns:st,formConfig:{labelWidth:120,schemas:rt,autoSubmitOnEnter:!0,baseColProps:{xs:24,sm:12,md:12,lg:12,xl:8},resetButtonOptions:{preIcon:"ant-design:delete-outlined"},submitButtonOptions:{preIcon:"ant-design:search-outlined"}},showIndexColumn:!1,useSearchForm:!0,showTableSetting:!0,bordered:!0,actionColumn:{auth:["system:sysDept:edit","system:sysDept:remove"],width:80,title:"\u64CD\u4F5C",dataIndex:"action",slots:{customRender:"action"}},beforeFetch:V});function O(){const o={parentId:u.nodeId};a(!0,{record:o,isUpdate:!1})}function E(o){a(!0,{record:o,isUpdate:!0})}function M(o){return I(this,null,function*(){yield nt({ids:o.id}),v.success("\u5220\u9664\u6210\u529F\uFF01"),t("refresh-tree",o.parentId==="0"?void 0:o.parentId)})}function R({isUpdate:o,values:C}){t("refresh-tree",C.parentId)}function V(o){return F(B({},o),{parentId:u.nodeId?u.nodeId:"0"})}function N(){w()}return W(()=>u.nodeId,()=>{X(()=>{w()})}),e({refresh:N}),(o,C)=>{const A=$("a-button"),U=q("auth");return m(),H("div",null,[T(r(Z),{onRegister:r(f)},{orgType:n(({record:s})=>[s.orgType==="1"?(m(),y(r(_),{key:0,color:"success"},{default:n(()=>[l(g(r(h)(p.value,s.orgType)),1)]),_:2},1024)):b("",!0),s.orgType==="2"?(m(),y(r(_),{key:1,color:"warning"},{default:n(()=>[l(g(r(h)(p.value,s.orgType)),1)]),_:2},1024)):b("",!0),s.orgType==="3"?(m(),y(r(_),{key:2,color:"processing"},{default:n(()=>[l(g(r(h)(p.value,s.orgType)),1)]),_:2},1024)):b("",!0),s.orgType==="4"?(m(),y(r(_),{key:3,color:"processing"},{default:n(()=>[l(g(r(h)(p.value,s.orgType)),1)]),_:2},1024)):b("",!0)]),status:n(({record:s})=>[T(r(_),{color:s.status==="0"?"success":"error"},{default:n(()=>[l(g(r(h)(c.value,s.status)),1)]),_:2},1032,["color"])]),toolbar:n(()=>[J((m(),y(A,{type:"primary",onClick:O,preIcon:"ant-design:plus-outlined"},{default:n(()=>[l("\u65B0\u589E")]),_:1})),[[U,["system:sysDept:add"]]])]),action:n(({record:s})=>[T(r(tt),{actions:[{auth:["system:sysDept:edit"],icon:"clarity:note-edit-line",tooltip:"\u7F16\u8F91",onClick:E.bind(null,s)},{auth:["system:sysDept:remove"],icon:"ant-design:delete-outlined",tooltip:"\u5220\u9664",color:"error",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"left",confirm:M.bind(null,s)}}]},null,8,["actions"])]),_:1},8,["onRegister"]),T(it,{onRegister:r(d),onSuccess:R},null,8,["onRegister"])])}}});export{pe as default};
|