1import{a as e,j as t}from"./[email protected]";import{W as o}from"./[email protected]__bb2e4b735352d08cd7fbf58c5306bfd7.C1J70OqZ.js";import{tableColumns as s,searchList as c,createList as r}from"./model.B-54JzYl.js";import{g as a,a as i,d as n,u as p,c as m}from"./role.BkiG-a1P.js";import{A as d,I as _,a as b,E as f}from"./index.BrKVwV46.js";import{c as j,B as l}from"./BaseContent.BPPiN9ev.js";import{U as u}from"./UpdateBtn.Bt_5CjqS.js";import{D as g,B as y}from"./BasePagination.DCBCX8w0.js";import{B as x}from"./BaseCard.DIP64UGE.js";import{B as h}from"./BaseSearch.bhJFi6Y0.js";import{B as k}from"./BaseTable.CykhXY_G.js";import{B as w}from"./BaseForm.VU6lpoRc.js";import{u as S}from"./[email protected]_i18nex_3267a20e19cd946fb843101e52cdbba4.jaS7GrFS.js";import{s as v,F as C,B,f as z,S as N}from"./[email protected][email protected][email protected][email protected]";import"./[email protected][email protected]";import"./[email protected]";import"./[email protected]";import"./AuthorizeSelect.BHHjPi4M.js";import"./MenuAuthorize.DKSBtsvQ.js";import"./@[email protected][email protected]";import"./@[email protected]_rea_2540207723693330d697ee54f28f92c9.WAeBKyn7.js";import"./@[email protected]";import"./@[email protected]";import"./[email protected]";import"./@[email protected]";import"./@[email protected]";import"./[email protected][email protected][email protected][email protected]";import"./[email protected]";import"./[email protected]";import"./[email protected]";import"./[email protected]_@types_react_d5af0dd94b0ee34692ed6f6d362e008c.eJFHjw1Z.js";import"./[email protected]";import"./[email protected]_react-d_baab528766f60cc2302fdb247715e15d.3nh8-BRl.js";import"./[email protected]";import"./[email protected]";import"./@[email protected]_r_c9cb2b7a7cb0793c12005ddfac5763f8.vtwJ1Fv8.js";import"./@[email protected]_r_39d8c4b197f541c8c42d43536a2b7ff2.BzDRMfiV.js";import"./[email protected]_q3uNA6.js";import"./@[email protected]";import"./@[email protected]";import"./[email protected]";import"./@[email protected]";import"./@[email protected]";import"./@[email protected]_.js";import"./@[email protected]";import"./@[email protected]";import"./@[email protected]";import"./@[email protected]";import"./@[email protected]";import"./@[email protected]";import"./[email protected][email protected]_.js";import"./[email protected]";import"./[email protected]";import"./[email protected]";import"./@[email protected][email protected]";import"./@[email protected]";import"./@[email protected]";import"./@[email protected]_fp.js";import"./@[email protected]";import"./[email protected][email protected]";import"./@ant-design_cssinjs-utils@2_1cf984ef0570c151229c54aca9e59f58.Dv5SmuVq.js";import"./@rc-component_resize-observ_bb3affc154b7e00871829432c356cea3.COFattHw.js";import"./[email protected]";import"./@[email protected]";import"./@[email protected]";import"./@[email protected]_rea_ee8cbee3130aacb8d1267910f779e301.Cga-_zEz.js";import"./@[email protected]__5cb28bd61bb270bbfeae2def527d6530.CFuVoC_I.js";import"./[email protected]";import"./[email protected]";import"./@rc-component_pagination@1._e3ab09bb8bb884e2b9ec23bf7fc2e19c.CS0f6AHT.js";import"./@[email protected]_050fda0969e69d52b9b0b2fb217a1bc9.YmJMfNw7.js";import"./@[email protected]_766f604215423df1100d912c9c357147.DOuP0IZq.js";import"./@[email protected]__b821f7c07cf0b85c056a8c917cc4f2e8.DGWmWosI.js";import"./@[email protected]._3f6e261be6347cd44469d22cc0aaf666.scMClM6c.js";import"./@rc-component_notification@_1cdc218814e15e072466cf500683ac4c.DpwGEK5z.js";import"./@rc-component_color-picker@_11e6c9cd4b14751b4926abbd56d68616.D4d3oO2G.js";import"./@[email protected]._2ff1d2bfdc161ad158aa4b5bc1e2c835.C2TmlVgX.js";import"./@[email protected]__c328fc58fafb6e8e99300926d36a7edd.CAtjay2B.js";import"./@[email protected]_re_0eefd5a30521b3e4c71411a0dc74ac78.Bd0vgQBb.js";import"./@[email protected]";import"./@[email protected]__f2ba413934ab4c8e9d5b3d1aee9f01bb.Bcv4uTVK.js";import"./@rc-component_virtual-list@_bdae2fd72dd7d934a19b848e7baa2dc4.DcCqGHYW.js";import"./@[email protected]_ae4a888d1621c4506800a097a75a46f1.CcKDHM3T.js";import"./@[email protected]._10a31a0bc65d94f368a74c6c42119dd8.BP4ufCbN.js";import"./@[email protected]_re_a393575b937801b51ab86f309f4c125e.U5pQMH8y.js";import"./@[email protected]._b04ba2832033242e66ff6ab02db01123.CBrYnZ8F.js";import"./@[email protected]_re_1a9d52bab4f3d078d50a5e00a34d7aca.CatVCL0e.js";import"./@[email protected]_e2d8478b6ef5b3586562c62ad90a8283.1zWVP3jr.js";import"./[email protected]";import"./[email protected]";import"./[email protected]";import"./@[email protected]_7b4b2ec2fd285e2781090a8c03770b58.C_h3eBL2.js";import"./@[email protected]_re_a19807b2bed2d6eb7f97ef78daa2ea7f.BSsg9K5G.js";import"./@[email protected]_27a72cdc31ca14c130ad9aced2e33c8e.KquNj2Lx.js";import"./@rc-component_input-number@_c4572a45d6cd7b5737790c711dd453b9.BXEPVoho.js";import"./@[email protected]";import"./@[email protected]_r_6c401e8817d81830183337bec7ddd219.BT_t9plf.js";import"./@[email protected]__98bbe8bd1766e13d4163bf50daa0c491.wgc6g9dw.js";import"./@[email protected]__bea39f7b0b5107ed333fdcc578f0c4d0.BxxwANkA.js";import"./@[email protected]_r_b47fcbdea030226382d74cd46d04efe4.CVIYA74W.js";import"./@[email protected]._abfc54c9f7d99c302b34e88b3741b629.CIHOdIQw.js";import"./@[email protected]._b67ece7bdc4415d5734b021cf3c645bb.BK-Kvyai.js";import"./@[email protected]__e569b5a3cf1cf86abf8bf268a6f13f97.Dq3H1PMC.js";import"./@[email protected]_re_67b3dda043bc45b68686eba2801e3125.CHHC04gf.js";import"./@[email protected]_r_f330360365f5c144a953a2e7cc8f5758.L7Iju6UD.js";import"./@[email protected]__4beb483a1cbb03260b996eed5cbfeade.DLDPm1xH.js";import"./@[email protected]__5ed06d265599b1c93676808b1b611f55.03BUt_Rn.js";import"./@[email protected]_0f5b05d270b3b0729358ad8eaffe5789.BgjA8WPo.js";import"./@[email protected]_re_6755d380d209376a5ac86ce806ff2361.Dww0_2t1.js";import"./@rc-component_tree-select@1_56f31f7a12b2da4d0149613f3f869709.DticZxoJ.js";import"./@[email protected]__f409274a03f44b3197cf7a6186adcbc9.BtrQEPr1.js";import"./@rc-component_mutate-observ_a72358b3f7d6c9d3afae3f428b826cf9.DGtMiEIh.js";import"./403.DAXhvvoZ.js";import"./helper.BisuQDml.js";import"./BaseTimeRangePicker.B_IGkfE8.js";import"./[email protected]_react_83f814f62f35b295016a7a46b519c984.D2JIbKFZ.js";import"./[email protected]_react_2b288172cd67f63aac1d0f768afb5c15.lXBXBwNY.js";import"./[email protected]";import"./is.BeBpkxAQ.js";import"./@[email protected]_react-d_5267d117c62d2ab34c67d0cbd0c54f4c.CzzVa6WB.js";import"./@[email protected][email protected]";import"./@[email protected][email protected]";import"./@[email protected]_@d_25f428351a733d1822cb5ea3781676f3.BRrHZUAc.js";const A={status:1};function F(){const{t:F}=S(),P=e.useRef(null),[q,D]=e.useState(!1),[M,E]=e.useState(!1),[L,R]=e.useState(!1),[T,U]=e.useState(!1),[I,K]=e.useState(d(F)),[O,H]=e.useState(""),[J,Q]=e.useState(A),[W,G]=e.useState({}),[V,X]=e.useState(_.page),[Y,Z]=e.useState(_.pageSize),[$,ee]=e.useState(0),[te,oe]=e.useState([]),[se,ce]=v.useMessage(),[re]=C.useForm(),{permissions:ae,roles:ie}=b(),ne="/authority/role",pe={page:j(ne,ae),create:j("".concat(ne,"/create"),ae),update:j("".concat(ne,"/update"),ae),delete:j("".concat(ne,"/delete"),ae)},me=e.useCallback(async()=>{const e={...W,page:V,pageSize:Y};try{R(!0);const t=await a(e),{code:o,data:s}=t;if(200!==Number(o))return;const{items:c,total:r}=s;ee(r||0),oe(c||[])}finally{D(!1),R(!1)}},[V,Y,W]);e.useEffect(()=>{q&&me()},[me,q]),e.useEffect(()=>{pe.page&&me()},[pe.page]),o(()=>{me()},[]);const de=async e=>{try{E(!0),K(f(F,e)),H(e),U(!0);const{code:t,data:o}=await i(e);if(200!==Number(t))return;Q(o)}finally{U(!1)}},_e=async e=>{try{E(!0),K(d(F)),H(""),U(!0);const{code:t,data:o}=await i(e);if(200!==Number(t))return;const{id:s,createdAt:c,updatedAt:r,...a}=o;Q(a)}finally{U(!1)}},be=()=>{E(!1)},fe=async e=>{try{R(!0);const{code:t,message:o}=await n(e);200===Number(t)&&(se.success(o||F("public.successfullyDeleted")),me())}finally{R(!1)}},je=e.useCallback((e,t)=>{X(e),Z(t),D(!0)},[]),le=e.useCallback((e,o)=>t.jsxs("div",{className:"flex flex-wrap gap-5px",children:[!0===pe.update&&t.jsx(u,{onClick:()=>de(o.id)}
1),!0===pe.create&&t.jsx(B,{type:"primary",className:"small-btn",onClick:()=>_e(o.id),children:F("public.copy")}),!0===pe.delete&&t.jsx(g,{name:o.name,handleDelete:()=>fe(o.id)})]}),[pe.update,pe.create,pe.delete,de,_e,fe,F]),ue=e.useMemo(()=>s(F,le),[F,le]);return t.jsxs(l,{isPermission:pe.page,children:[ce,t.jsx(x,{children:t.jsx(h,{list:c(F),data:W,isLoading:L,handleFinish:e=>{X(1),G(e),D(!0)}})}),t.jsxs(x,{className:"mt-10px",children:[t.jsx(k,{isLoading:L,isCreate:pe.create,columns:ue,dataSource:te,getPage:me,onCreate:()=>{E(!0),K(d(F)),H(""),Q(A)}}),t.jsx(y,{disabled:L,current:V,pageSize:Y,total:$,onChange:je})]}),t.jsx(z,{width:600,title:I,maskClosable:!1,open:M,onClose:be,footer:t.jsxs("div",{className:"flex justify-end gap-10px",children:[t.jsx(B,{onClick:be,children:F("public.cancel")}),t.jsx(B,{type:"primary",onClick:()=>{var e;null==(e=null==P?void 0:P.current)||e.submit()},children:F("public.confirm")})]}),children:t.jsx(N,{spinning:T,children:t.jsx(w,{form:re,ref:P,list:r(F,null==ie?void 0:ie.join(",")),data:J,labelCol:{span:4},wrapperCol:{span:19},handleFinish:async e=>{try{U(!0);const t=()=>O?p(O,e):m(e),{code:o,message:s}=await t();if(200!==Number(o))return;se.success(s||F("public.successfulOperation")),E(!1),me()}finally{U(!1)}}})})})]})}export{F as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.