szld-libs 0.2.10 → 0.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21353,21 +21353,28 @@ function z2(p) {
21353
21353
  }
21354
21354
  }
21355
21355
  ];
21356
- return { handleChangePwd: G_(async () => new Promise((S, Y) => {
21357
- y.confirm({
21358
- title: (p == null ? void 0 : p.title) || "默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",
21356
+ return { handleChangePwd: G_(async (S, Y) => {
21357
+ await y.confirm({
21358
+ title: Y || "默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",
21359
21359
  icon: null,
21360
21360
  wrapClassName: "confirmWrapper",
21361
- content: /* @__PURE__ */ Ce(Aw, { items: _, formProps: { form: w, layout: "vertical", labelCol: { span: 24 }, wrapperCol: { span: 24 } } }),
21361
+ content: /* @__PURE__ */ Ce(Aw, { items: _, formProps: { form: w, preserve: !1, layout: "vertical", labelCol: { span: 24 }, wrapperCol: { span: 24 } } }),
21362
21362
  onOk() {
21363
21363
  return new Promise((H, j) => {
21364
21364
  w.validateFields().then((K) => {
21365
- S({ values: K, resolve: H, reject: j });
21365
+ S({
21366
+ values: K,
21367
+ resolve: H,
21368
+ reject: j
21369
+ });
21370
+ }).catch((K) => {
21371
+ j(K);
21366
21372
  });
21367
21373
  });
21368
- }
21374
+ },
21375
+ ...p == null ? void 0 : p.modalProps
21369
21376
  });
21370
- })) };
21377
+ }) };
21371
21378
  }
21372
21379
  export {
21373
21380
  GN as AuthButton,
@@ -187,4 +187,4 @@ Check the render method of \``+C+"`.")}throw new Error("Element type is invalid:
187
187
  Check the render method of %s.`,je(tn)||"Unknown"));var m=lu(s,f);m.payload={element:e},i=i===void 0?null:i,i!==null&&(typeof i!="function"&&S("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i),m.callback=i);var C=lo(u,m,f);return C!==null&&($n(C,u,f,s),om(C,u,f)),f}function Jm(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case ie:return t.child.stateNode;default:return t.child.stateNode}}function eN(e){switch(e.tag){case I:{var t=e.stateNode;if(pn(t)){var a=qy(t);cO(t,a)}break}case Be:{cu(function(){var u=ga(e,Oe);if(u!==null){var s=Gr();$n(u,e,Oe,s)}});var i=Oe;ZS(e,i);break}}}function sw(e,t){var a=e.memoizedState;a!==null&&a.dehydrated!==null&&(a.retryLane=oh(a.retryLane,t))}function ZS(e,t){sw(e,t);var a=e.alternate;a&&sw(a,t)}function tN(e){if(e.tag===Be){var t=Uu,a=ga(e,t);if(a!==null){var i=Gr();$n(a,e,t,i)}ZS(e,t)}}function nN(e){if(e.tag===Be){var t=ho(e),a=ga(e,t);if(a!==null){var i=Gr();$n(a,e,t,i)}ZS(e,t)}}function cw(e){var t=Wv(e);return t===null?null:t.stateNode}var fw=function(e){return null};function rN(e){return fw(e)}var dw=function(e){return!1};function aN(e){return dw(e)}var pw=null,vw=null,hw=null,mw=null,yw=null,gw=null,Sw=null,Cw=null,Ew=null;{var Tw=function(e,t,a){var i=t[a],u=En(e)?e.slice():qe({},e);return a+1===t.length?(En(u)?u.splice(i,1):delete u[i],u):(u[i]=Tw(e[i],t,a+1),u)},ww=function(e,t){return Tw(e,t,0)},Rw=function(e,t,a,i){var u=t[i],s=En(e)?e.slice():qe({},e);if(i+1===t.length){var f=a[i];s[f]=s[u],En(s)?s.splice(u,1):delete s[u]}else s[u]=Rw(e[u],t,a,i+1);return s},bw=function(e,t,a){if(t.length!==a.length){A("copyWithRename() expects paths of the same length");return}else for(var i=0;i<a.length-1;i++)if(t[i]!==a[i]){A("copyWithRename() expects paths to be the same except for the deepest key");return}return Rw(e,t,a,0)},xw=function(e,t,a,i){if(a>=t.length)return i;var u=t[a],s=En(e)?e.slice():qe({},e);return s[u]=xw(e[u],t,a+1,i),s},kw=function(e,t,a){return xw(e,t,0,a)},JS=function(e,t){for(var a=e.memoizedState;a!==null&&t>0;)a=a.next,t--;return a};pw=function(e,t,a,i){var u=JS(e,t);if(u!==null){var s=kw(u.memoizedState,a,i);u.memoizedState=s,u.baseState=s,e.memoizedProps=qe({},e.memoizedProps);var f=ga(e,Oe);f!==null&&$n(f,e,Oe,kt)}},vw=function(e,t,a){var i=JS(e,t);if(i!==null){var u=ww(i.memoizedState,a);i.memoizedState=u,i.baseState=u,e.memoizedProps=qe({},e.memoizedProps);var s=ga(e,Oe);s!==null&&$n(s,e,Oe,kt)}},hw=function(e,t,a,i){var u=JS(e,t);if(u!==null){var s=bw(u.memoizedState,a,i);u.memoizedState=s,u.baseState=s,e.memoizedProps=qe({},e.memoizedProps);var f=ga(e,Oe);f!==null&&$n(f,e,Oe,kt)}},mw=function(e,t,a){e.pendingProps=kw(e.memoizedProps,t,a),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=ga(e,Oe);i!==null&&$n(i,e,Oe,kt)},yw=function(e,t){e.pendingProps=ww(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var a=ga(e,Oe);a!==null&&$n(a,e,Oe,kt)},gw=function(e,t,a){e.pendingProps=bw(e.memoizedProps,t,a),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=ga(e,Oe);i!==null&&$n(i,e,Oe,kt)},Sw=function(e){var t=ga(e,Oe);t!==null&&$n(t,e,Oe,kt)},Cw=function(e){fw=e},Ew=function(e){dw=e}}function iN(e){var t=ca(e);return t===null?null:t.stateNode}function lN(e){return null}function uN(){return tn}function oN(e){var t=e.findFiberByHostInstance,a=v.ReactCurrentDispatcher;return yd({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:pw,overrideHookStateDeletePath:vw,overrideHookStateRenamePath:hw,overrideProps:mw,overridePropsDeletePath:yw,overridePropsRenamePath:gw,setErrorHandler:Cw,setSuspenseHandler:Ew,scheduleUpdate:Sw,currentDispatcherRef:a,findHostInstanceByFiber:iN,findFiberByHostInstance:t||lN,findHostInstancesForRefresh:HO,scheduleRefresh:AO,scheduleRoot:FO,setRefreshHandler:UO,getCurrentFiber:uN,reconcilerVersion:qS})}var Dw=typeof reportError=="function"?reportError:function(e){};function e1(e){this._internalRoot=e}ey.prototype.render=e1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?S("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):ty(arguments[1])?S("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&S("You passed a second argument to root.render(...) but it only accepts one argument.");var a=t.containerInfo;if(a.nodeType!==nn){var i=cw(t.current);i&&i.parentNode!==a&&S("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}Ip(e,t,null,null)},ey.prototype.unmount=e1.prototype.unmount=function(){typeof arguments[0]=="function"&&S("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;PT()&&S("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),cu(function(){Ip(null,e,null,null)}),kC(t)}};function sN(e,t){if(!ty(e))throw new Error("createRoot(...): Target container is not a DOM element.");_w(e);var a=!1,i=!1,u="",s=Dw;t!=null&&(t.hydrate?A("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Ai&&S(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
188
188
 
189
189
  let root = createRoot(domContainer);
190
- root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var f=uw(e,qh,null,a,i,u,s);Bh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Zd(h),new e1(f)}function ey(e){this._internalRoot=e}function cN(e){e&&mh(e)}ey.prototype.unstable_scheduleHydration=cN;function fN(e,t,a){if(!ty(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");_w(e),t===void 0&&S("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=a??null,u=a!=null&&a.hydratedSources||null,s=!1,f=!1,h="",m=Dw;a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onRecoverableError!==void 0&&(m=a.onRecoverableError));var C=ow(t,null,e,qh,i,s,f,h,m);if(Bh(C.current,e),Zd(e),u)for(var E=0;E<u.length;E++){var D=u[E];SD(C,D)}return new ey(C)}function ty(e){return!!(e&&(e.nodeType===Cr||e.nodeType===Na||e.nodeType===kl||!dt))}function Yp(e){return!!(e&&(e.nodeType===Cr||e.nodeType===Na||e.nodeType===kl||e.nodeType===nn&&e.nodeValue===" react-mount-point-unstable "))}function _w(e){e.nodeType===Cr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),sp(e)&&(e._reactRootContainer?S("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):S("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var dN=v.ReactCurrentOwner,Ow;Ow=function(e){if(e._reactRootContainer&&e.nodeType!==nn){var t=cw(e._reactRootContainer.current);t&&t.parentNode!==e&&S("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var a=!!e._reactRootContainer,i=t1(e),u=!!(i&&to(i));u&&!a&&S("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Cr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function t1(e){return e?e.nodeType===Na?e.documentElement:e.firstChild:null}function Nw(){}function pN(e,t,a,i,u){if(u){if(typeof i=="function"){var s=i;i=function(){var x=Jm(f);s.call(x)}}var f=ow(t,i,e,ro,null,!1,!1,"",Nw);e._reactRootContainer=f,Bh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Zd(h),cu(),f}else{for(var m;m=e.lastChild;)e.removeChild(m);if(typeof i=="function"){var C=i;i=function(){var x=Jm(E);C.call(x)}}var E=uw(e,ro,null,!1,!1,"",Nw);e._reactRootContainer=E,Bh(E.current,e);var D=e.nodeType===nn?e.parentNode:e;return Zd(D),cu(function(){Ip(t,E,a,i)}),E}}function vN(e,t){e!==null&&typeof e!="function"&&S("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function ny(e,t,a,i,u){Ow(a),vN(u===void 0?null:u,"render");var s=a._reactRootContainer,f;if(!s)f=pN(a,t,e,u,i);else{if(f=s,typeof u=="function"){var h=u;u=function(){var m=Jm(f);h.call(m)}}Ip(t,f,e,u)}return Jm(f)}function hN(e){{var t=dN.current;if(t!==null&&t.stateNode!==null){var a=t.stateNode._warnedAboutRefsInRender;a||S("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",bt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Cr?e:JO(e,"findDOMNode")}function mN(e,t,a){if(S("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Yp(t))throw new Error("Target container is not a DOM element.");{var i=sp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return ny(null,e,t,!0,a)}function yN(e,t,a){if(S("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Yp(t))throw new Error("Target container is not a DOM element.");{var i=sp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return ny(null,e,t,!1,a)}function gN(e,t,a,i){if(S("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Yp(a))throw new Error("Target container is not a DOM element.");if(e==null||!Vo(e))throw new Error("parentComponent must be a valid React Component");return ny(e,t,a,!1,i)}function SN(e){if(!Yp(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=sp(e)&&e._reactRootContainer===void 0;t&&S("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var a=t1(e),i=a&&!to(a);i&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return cu(function(){ny(null,null,e,!1,function(){e._reactRootContainer=null,kC(e)})}),!0}else{{var u=t1(e),s=!!(u&&to(u)),f=e.nodeType===Cr&&Yp(e.parentNode)&&!!e.parentNode._reactRootContainer;s&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",f?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}de(eN),ch(tN),ns(nN),zd(pa),dh(Jo),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&S("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Iv(Tx),Zs(MS,fO,cu);function CN(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ty(t))throw new Error("Target container is not a DOM element.");return ZO(e,t,null,a)}function EN(e,t,a,i){return gN(e,t,a,i)}var n1={usingClientEntryPoint:!1,Events:[to,ef,$h,Ks,Ho,MS]};function TN(e,t){return n1.usingClientEntryPoint||S('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),sN(e,t)}function wN(e,t,a){return n1.usingClientEntryPoint||S('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),fN(e,t,a)}function RN(e){return PT()&&S("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),cu(e)}var bN=oN({findFiberByHostInstance:ds,bundleType:1,version:qS,rendererPackageName:"react-dom"});if(!bN&&gn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var xN=window.location.protocol;/^(https?|file):$/.test(xN)}Zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=n1,Zr.createPortal=CN,Zr.createRoot=TN,Zr.findDOMNode=hN,Zr.flushSync=RN,Zr.hydrate=mN,Zr.hydrateRoot=wN,Zr.render=yN,Zr.unmountComponentAtNode=SN,Zr.unstable_batchedUpdates=MS,Zr.unstable_renderSubtreeIntoContainer=EN,Zr.version=qS,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Zr}(function(p){function y(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y)}catch{}}}process.env.NODE_ENV==="production"?(y(),p.exports=vb()):p.exports=hb()})(fb);const mb=p=>new Promise(y=>{const v=new FileReader;v.onloadend=w=>y(w.target.result),v.readAsDataURL(p)}),yb=p=>new Promise(y=>{const v=new Image;v.onload=()=>y(v),v.src=p}),gb=(p,y,v)=>new Promise(w=>p.toBlob(_=>w(_),y,v)),Sb=p=>{const w=p.width,_=p.height;let A=p.width,S=p.height;return(w>1400||_>1400)&&(w/_>1400/1400?(A=1400,S=Math.round(1400*(_/w))):(S=1400,A=Math.round(1400*(w/_)))),{width:A,height:S}},Cb=async(p,y="image/jpeg",v=.5,w=300)=>{const _=p.name;if(p.size/1024<w)return p;const A=document.createElement("canvas"),S=A.getContext("2d"),Y=await mb(p),H=await yb(Y),j=Sb(H);A.width=j.width,A.height=j.height,S.clearRect(0,0,j.width,j.height),S.drawImage(H,0,0,j.width,j.height);const K=await gb(A,y,v);return new File([K],_,{type:y})},Y1=[Os.jpeg,Os.jpg,Os.png],Q1=p=>{const{maxCount:y=1,listType:v="picture-card",fileList:w=[],maxSize:_=2,accept:A=Y1.join(","),uploadBtnName:S="上传",uploadHint:Y=null,compression:H}=p,[j,K]=at.useState(!1),[I,ne]=at.useState(""),ie=()=>v!=="text"?un("div",{style:{position:"relative"},children:[un("div",{children:[Se($R,{}),Se("div",{style:{marginTop:8},children:S})]}),Y]}):un(Gp,{children:[Se(Ye.Button,{icon:Se(qR,{}),children:S}),Y]}),ze=Ce=>new Promise((it,Be)=>{const wt=A.split(","),$e=nv(Ce.name)||"";A&&!wt.includes($e)&&(Ye.message.error(`只允许上传 ${A} 文件`),Be(!1)),Ce.size/1024/1024<_||(Ye.message.error(`文件必须小于${_}MB`),Be(!1)),H&&it(Cb(Ce,H.type,H.quality,H.limit)),it(Ce)}).catch(it=>Ye.Upload.LIST_IGNORE),et=Ce=>{p.onChange&&p.onChange(Ce)},Ze=Ce=>{p.onPreview?p.onPreview(Ce):Ot(Ce)},Ot=async Ce=>{let Ue=nv(Ce.name)||"";if(Ue||(Ue=nv(Ce.name||Ce.url)||""),Ue===Os.pdf)return Ye.Modal.info({title:"PDF",width:"60%",content:Se("iframe",{title:"PDF预览",src:Ce.url||Ce.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});Y1.includes(Ue)&&(!Ce.url&&!Ce.thumbUrl&&!Ce.preview&&(Ce.preview=await H1(Ce.originFileObj)),ne(Ce.url||Ce.thumbUrl||Ce.preview),K(!0))};return un(Gp,{children:[Se(Ye.Upload,{beforeUpload:ze,onChange:et,listType:v,...p,onPreview:Ze,children:w.length>=y?null:ie()}),Se(Ye.Image,{style:{display:"none"},preview:{visible:j,src:I,onVisibleChange:()=>{K(!1),ne("")}}})]})},rv={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},Eb={labelCol:{span:4},wrapperCol:{span:20}},W1=p=>{switch(p){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},Ry=p=>{const{items:y,rowProps:v,formProps:w,readonly:_=!1,hiddenTitle:A=!1}=p,S=(j,K)=>{var I,ne;if(K.btnType==="submit"){(I=w==null?void 0:w.form)==null||I.validateFields().then(ie=>{K.onClick&&K.onClick(ie)});return}if(K.btnType==="reset"){(ne=w==null?void 0:w.form)==null||ne.resetFields(),K.onClick&&K.onClick(j);return}K.btnType==="cancel"&&K.onClick&&K.onClick(j)},Y=j=>Array.isArray(j)?j:j&&j.fileList,H=j=>{var I;const K=w==null?void 0:w.initialValues;return j.dataIndex?((I=j.render)==null?void 0:I.call(j,K==null?void 0:K[j.dataIndex],K))||j.value||(K==null?void 0:K[j.dataIndex]):""};return Se(Ye.Form,{layout:"horizontal",form:w==null?void 0:w.form,...Eb,...w||{},children:Se(Ye.Row,{gutter:16,...v,children:y.filter(j=>!j.hidden).map((j,K)=>Se(Ye.Col,{...j.colProps||{span:24},children:Se(Ye.Form.Item,{...j.valueType==="upload"?{getValueFromEvent:Y}:{},label:A?"":j.title,name:j.valueType==="btns"?void 0:j.dataIndex,...j.formItemProps,children:j.readonly?Se("div",{children:H(j)}):j.readonly===void 0&&_?Se("div",{children:H(j)}):Se(G1,{onChange:I=>{var ne;return(ne=j==null?void 0:j.onChange)==null?void 0:ne.call(j,I)},valueType:j.valueType,onBtnClick:S,valueProps:j.valueProps})})},j.dataIndex||K))})})},G1=p=>{const{valueType:y,valueProps:v,value:w,onChange:_,onBtnClick:A,inputRef:S}=p,Y=at.useMemo(()=>{let H=Se(Ye.Input,{placeholder:"请输入",allowClear:!0,...v});switch(y){case"rate":H=Se(Ye.Rate,{...v});break;case"password":H=Se(Ye.Input.Password,{...v});break;case"modal":H=Se(Tb,{...v});break;case"checkbox":H=Se(Ye.Checkbox.Group,{...v});break;case"select":H=Se(Ye.Select,{placeholder:"请选择",allowClear:!0,...v});break;case"inputNumber":H=Se(Ye.InputNumber,{style:{width:"100%"},placeholder:"请输入",...v});break;case"textarea":H=Se(Ye.Input.TextArea,{placeholder:"请输入",allowClear:!0,...v});break;case"radio":H=Se(Ye.Radio.Group,{...v});break;case"switch":H=Se(Ye.Switch,{...v});break;case"datePicker":H=Se(Ye.DatePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"rangePicker":H=Se(Ye.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"timePicker":H=Se(Ye.TimePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"cascader":H=Se(Ye.Cascader,{allowClear:!0,...v});break;case"upload":H=Se(Q1,{...v});break;case"btns":H=Se(Ye.Space,{children:v==null?void 0:v.map(j=>at.createElement(Ye.Button,{type:j.btnType==="submit"?"primary":"default",...Ds.omit(j,["btnType"]),key:j.key||j.btnType,onClick:K=>{A==null||A(K,j)}},j.title||j.children))});break}return H},[y,v,_,w]);if(y==="custom"){const H=v;return at.cloneElement(H.children,{[W1(y||"input")]:w,onChange:_,ref:S})}return at.cloneElement(Y,{[W1(y||"input")]:w,onChange:_,ref:S})},Tb=p=>{const{placeholder:y,labelKey:v,onToggle:w,value:_,onClear:A,className:S,style:Y}=p;return un("div",{className:[rv.fieldModal,S].filter(H=>H).join(" "),style:Y,children:[Se("div",{className:rv.content,onClick:()=>w(!0),children:_?Se("span",{children:_[v]}):Se("span",{className:rv.placeholder,children:y})}),Se("span",{className:rv.suffix,onClick:A,children:_&&Se(FR,{})})]})},wb={search:"search-table-module_search_17add"};function Rb(p){const{tableProps:y={},searchProps:v}=p,{columns:w=[],minColumnWidth:_=200,...A}=y;return un(Gp,{children:[v&&Se(Ry,{hiddenTitle:!0,...v,items:v.items}),Se(Ye.Table,{columns:w.filter(S=>!S.hidden).map(S=>({...S,width:S.width||_})),scroll:{x:w.filter(S=>!S.hidden).reduce((S,Y)=>S+(typeof Y.width=="number"?Y.width:_),0)},...A,className:Df(wb.table,y==null?void 0:y.className),pagination:typeof(y==null?void 0:y.pagination)=="boolean"?y.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`,...y==null?void 0:y.pagination}})]})}const bb={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},q1=at.createContext(null),xb=({index:p,...y})=>{const[v]=Ye.Form.useForm();return Se(Ye.Form,{form:v,component:!1,children:Se(q1.Provider,{value:v,children:Se("tr",{...y})})})};function kb(p){const{title:y,editable:v,children:w,dataIndex:_,record:A,rules:S,onChange:Y,type:H="input",valueProps:j,initialValue:K,...I}=p,ne=at.useRef(null),ie=at.useContext(q1),ze=async()=>{try{const Ot=await ie.validateFields();Y({...A,...Ot})}catch{}},et=()=>Se(G1,{valueType:H,valueProps:{...j,onBlur:ze,onPressEnter:ze},inputRef:ne});let Ze=w;return v&&(Ze=Se(Ye.Form.Item,{style:{margin:0},initialValue:K||Ds.get(A,_),name:_,rules:S,children:et()})),Se("td",{children:Ze})}function Db(p){const{columns:y,onChange:v,...w}=p,_={body:{row:xb,cell:kb}},A=y==null?void 0:y.map(S=>S.editable?{...S,onCell:Y=>({...S,record:Y,onChange:v})}:S);return Se(Ye.Table,{...w,components:_,rowClassName:()=>bb.editableRow,columns:A})}const X1=p=>{const{auth:y=!0,...v}=p;return y?Se(Ye.Button,{...v}):null},_b=p=>{const{PId:y,auths:v,...w}=p,_=at.useMemo(()=>!!(v&&v.find(A=>A.PId===y)),[y,v]);return Se(X1,{...w,auth:_})},_n={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},Ob=p=>{const{data:y,current:v,rowKey:w,renderContent:_}=p,[A,S]=at.useState(!1),Y=at.useMemo(()=>p.currentIndex!==void 0?p.currentIndex:!v||y.length===0?0:y.findIndex(I=>I.PNId===v),[v,y]),H=at.useMemo(()=>Y>1?A?0:Y-1:0,[Y,A]),j=()=>{S(!0)};return un("ul",{className:_n.main,children:[Y>1&&!A&&un("li",{className:Df(_n.item,_n.itemDone),children:[Se("div",{className:_n.tail}),Se("div",{className:_n.node}),Se("div",{className:_n.content,children:un("div",{className:_n.collpase,children:[un("div",{children:["已收起",Se("span",{children:Y-1}),"个节点"]}),un("a",{className:_n.btn,onClick:j,children:["展开节点",Se(PR,{})]})]})})]}),y.slice(H).map((K,I)=>un("li",{className:Df(_n.item,Y===I+H?_n.itemActive:Y>I+H?_n.itemDone:_n.itemUnDo),children:[Se("div",{className:_n.tail}),Se("div",{className:_n.node}),un("div",{className:_n.content,children:[_?_(K,I,A?Y:Y-H):un(Gp,{children:[Se("div",{className:_n.title,children:K.PNName}),un("div",{className:_n.dateWrapper,children:[K.PlanFinishDate&&un("span",{children:["预计完成时间: ",K.PlanFinishDate]}),K.UpdateTime&&un("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",K.UpdateTime]})]}),K.Remark&&Se("div",{className:_n.remark,children:K.Remark})]}),A&&Y-1===I&&un("a",{className:_n.btn,onClick:()=>S(!1),children:["收起节点 ",Se(QR,{})]})]})]},typeof w=="string"?K[w]:w(K)))]})},Nb=p=>{const{current:y,data:v,rowKey:w,renderContent:_,currentIndex:A,...S}=p;return(()=>{Ye.Modal.info({icon:null,title:"流程节点",width:700,content:Se(Ob,{rowKey:w,renderContent:_,current:y,currentIndex:A,data:v}),closable:!0,footer:null,maskClosable:!0,...S})})(),null},Mb=(p,y)=>{const v=new URL(p),w=new URL(y);return v.protocol===w.protocol&&v.host===w.host&&v.port===w.port},Lb=p=>{const y=String(p).split("/");return y[y.length-1]},zb=p=>{var v;return(v=p.headers.get("content-disposition"))==null?void 0:v.split(";")[1].split("=")[1]},Ub=(p,y)=>{const v=y||Lb(p);if(Mb(p,window.location.href)){by(p,v);return}let w=y;fetch(p,{method:"get"}).then(_=>(w||(w=zb(_)),_.blob())).then(_=>{K1(_,w||v)}).catch(()=>{by(p,"")})},Ab=p=>{for(var y=p.split(","),v=y[0].match(/:(.*?);/)[1],w=window.atob(y[1]),_=w.length,A=new Uint8Array(_);_--;)A[_]=w.charCodeAt(_);return new Blob([A],{type:v})},K1=(p,y)=>{let v="";p instanceof Blob?v=window.URL.createObjectURL(p):v=window.URL.createObjectURL(Ab(p));const w=window.navigator;if(w.msSaveOrOpenBlob){w.msSaveOrOpenBlob(p,y);return}by(v,y),window.URL.revokeObjectURL(v)},by=(p,y)=>{let v=document.createElement("a");v.style.display="none",v.href=p,v.target="_blank",v.download=y,document.body.appendChild(v),v.click(),document.body.removeChild(v)},Fb=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:Ub,downloadBlob:K1},Symbol.toStringTag,{value:"Module"})),Z1={phone:{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号码"},telephone:{pattern:/^[\d -]+$/,message:"请输入正确的电话号码"},email:{pattern:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,message:"请输入正确的邮箱地址"},httpUrl:{pattern:/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/,message:"请输入合法的URL"},zipCode:{pattern:/^[0-9]{6}$/,message:"请输入正确的邮政编码"},specificKey:{pattern:/^[\w\u4E00-\u9FA5\uF900-\uFA2D()()]*$/,message:"可输入字母、汉字、数字或()"},inputTextarea:{pattern:/^[\w\u4E00-\u9FA5\uF900-\uFA2D-\u3002-\uff1f-\uff01-\uff0c-\u3001-\uff1b-\uff1a]*$/,message:"请输入字母、汉字或数字和中文常用字符:?!,、;。"},backendRestrict:{pattern:/^[^'"/\\]*$/,message:`不能输入特殊字符\\'/"`},onetoNinetyNine:{pattern:/^[1-9][0-9]{0,1}$/,message:"请输入1-99的整数"},passwordRule:{pattern:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z0-9]{8,12}$/,message:"密码应为字母大小写+数字8-12位组合"},passwordNewRule:{pattern:/^.*(?=.{8,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#¥%&*.()_+~/-]).*$/,message:"密码应为字母大小写+数字+常见字符!@#¥%&*.()_+~/- 8-12位组合"},pureNumber:{pattern:/^[1-9][0-9]*$/,message:"请输入整数类型"},onlyBlankRule:{pattern:/\S/,message:"输入内容不能只有空格"}},Hb=Object.freeze(Object.defineProperty({__proto__:null,default:Z1},Symbol.toStringTag,{value:"Module"}));class jb{constructor(y){Mw(this,"options",{id:"",canvasId:"verifyCanvas",width:100,height:30,type:"blend",code:""});this.options=y}GVerify(){this.options.numArr="0,1,2,3,4,5,6,7,8,9".split(","),this.options.letterArr=this.getAllLetter(),this._init(),this.refresh()}_init(){const y=document.getElementById(this.options.id),v=document.createElement("canvas");v.id=this.options.canvasId,v.width=Number(this.options.width),v.height=Number(this.options.height),v.style.cursor="pointer",v.innerHTML="您的浏览器版本不支持canvas",y&&y.appendChild(v),v.onclick=()=>{this.refresh()}}refresh(){this.options.code="";const y=document.getElementById(this.options.canvasId);let v,w=[];if(y.getContext)v=y.getContext("2d");else return;v.textBaseline="middle",v.fillStyle=this.randomColor(180,240),v.fillRect(0,0,this.options.width,this.options.height),this.options.type=="blend"?w=this.options.numArr.concat(this.options.letterArr):this.options.type=="number"?w=this.options.numArr:w=this.options.letterArr;for(let _=1;_<=4;_++){const A=w[this.randomNum(0,w.length)];this.options.code+=A,v.font="20px SimHei",v.fillStyle=this.randomColor(50,160),v.shadowBlur=this.randomNum(-3,3),v.shadowColor="rgba(0, 0, 0, 0.3)";const S=Number(this.options.width)/5*_,Y=Number(this.options.height)/2,H=this.randomNum(-30,30);v.translate(S,Y),v.rotate(H*Math.PI/180),v.fillText(A,0,0),v.rotate(-H*Math.PI/180),v.translate(-S,-Y)}for(let _=0;_<2;_++)v.strokeStyle=this.randomColor(40,180),v.beginPath(),v.moveTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height)/2)),v.lineTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height))),v.stroke();for(let _=0;_<Number(this.options.width)/10;_++)v.fillStyle=this.randomColor(0,255),v.beginPath(),v.arc(this.randomNum(0,this.options.width),this.randomNum(0,this.options.height),1,0,2*Math.PI),v.fill()}validate(y){const v=y.toLowerCase(),w=this.options.code.toLowerCase();return v==w}getAllLetter(){return"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z".split(",")}randomNum(y,v){return Math.floor(Math.random()*(v-y)+y)}randomColor(y,v){const w=this.randomNum(y,v),_=this.randomNum(y,v),A=this.randomNum(y,v);return"rgb("+w+","+_+","+A+")"}}const Pb=Object.freeze(Object.defineProperty({__proto__:null,getGVerify:jb},Symbol.toStringTag,{value:"Module"}));function Vb(p){const{modal:y,message:v}=Ye.App.useApp(),[w]=Ye.Form.useForm(),_=[{dataIndex:"Password",title:"新密码",valueType:"password",valueProps:{placeholder:"请输入新密码"},formItemProps:{rules:[{required:!0,message:"请输入新密码"},Z1.passwordNewRule]}},{dataIndex:"NewPassword",title:"确认密码",valueType:"password",valueProps:{placeholder:"请输入确认密码"},formItemProps:{rules:[{required:!0,message:"请输入确认密码"},({getFieldValue:S})=>({validator(Y,H){return!H||S("Password")===H?Promise.resolve():Promise.reject(new Error("两次密码输入不一致"))}})]}}];return{handleChangePwd:zw.useLockFn(async()=>new Promise((S,Y)=>{y.confirm({title:(p==null?void 0:p.title)||"默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",icon:null,wrapClassName:"confirmWrapper",content:Se(Ry,{items:_,formProps:{form:w,layout:"vertical",labelCol:{span:24},wrapperCol:{span:24}}}),onOk(){return new Promise((H,j)=>{w.validateFields().then(K=>{S({values:K,resolve:H,reject:j})})})}})}))}}gt.AuthButton=X1,gt.BackHeader=ZR,gt.CoralButton=_b,gt.CreateForm=Ry,gt.EditTable=Db,gt.FormRules=Hb,gt.SearchTable=Rb,gt.UploadFile=Q1,gt.download=Fb,gt.fileType=JR,gt.showWorkFlow=Nb,gt.useChangePwd=Vb,gt.utils=cb,gt.verfyCode=Pb,Object.defineProperty(gt,Symbol.toStringTag,{value:"Module"})});
190
+ root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var f=uw(e,qh,null,a,i,u,s);Bh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Zd(h),new e1(f)}function ey(e){this._internalRoot=e}function cN(e){e&&mh(e)}ey.prototype.unstable_scheduleHydration=cN;function fN(e,t,a){if(!ty(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");_w(e),t===void 0&&S("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=a??null,u=a!=null&&a.hydratedSources||null,s=!1,f=!1,h="",m=Dw;a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onRecoverableError!==void 0&&(m=a.onRecoverableError));var C=ow(t,null,e,qh,i,s,f,h,m);if(Bh(C.current,e),Zd(e),u)for(var E=0;E<u.length;E++){var D=u[E];SD(C,D)}return new ey(C)}function ty(e){return!!(e&&(e.nodeType===Cr||e.nodeType===Na||e.nodeType===kl||!dt))}function Yp(e){return!!(e&&(e.nodeType===Cr||e.nodeType===Na||e.nodeType===kl||e.nodeType===nn&&e.nodeValue===" react-mount-point-unstable "))}function _w(e){e.nodeType===Cr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),sp(e)&&(e._reactRootContainer?S("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):S("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var dN=v.ReactCurrentOwner,Ow;Ow=function(e){if(e._reactRootContainer&&e.nodeType!==nn){var t=cw(e._reactRootContainer.current);t&&t.parentNode!==e&&S("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var a=!!e._reactRootContainer,i=t1(e),u=!!(i&&to(i));u&&!a&&S("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Cr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function t1(e){return e?e.nodeType===Na?e.documentElement:e.firstChild:null}function Nw(){}function pN(e,t,a,i,u){if(u){if(typeof i=="function"){var s=i;i=function(){var x=Jm(f);s.call(x)}}var f=ow(t,i,e,ro,null,!1,!1,"",Nw);e._reactRootContainer=f,Bh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Zd(h),cu(),f}else{for(var m;m=e.lastChild;)e.removeChild(m);if(typeof i=="function"){var C=i;i=function(){var x=Jm(E);C.call(x)}}var E=uw(e,ro,null,!1,!1,"",Nw);e._reactRootContainer=E,Bh(E.current,e);var D=e.nodeType===nn?e.parentNode:e;return Zd(D),cu(function(){Ip(t,E,a,i)}),E}}function vN(e,t){e!==null&&typeof e!="function"&&S("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function ny(e,t,a,i,u){Ow(a),vN(u===void 0?null:u,"render");var s=a._reactRootContainer,f;if(!s)f=pN(a,t,e,u,i);else{if(f=s,typeof u=="function"){var h=u;u=function(){var m=Jm(f);h.call(m)}}Ip(t,f,e,u)}return Jm(f)}function hN(e){{var t=dN.current;if(t!==null&&t.stateNode!==null){var a=t.stateNode._warnedAboutRefsInRender;a||S("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",bt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Cr?e:JO(e,"findDOMNode")}function mN(e,t,a){if(S("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Yp(t))throw new Error("Target container is not a DOM element.");{var i=sp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return ny(null,e,t,!0,a)}function yN(e,t,a){if(S("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Yp(t))throw new Error("Target container is not a DOM element.");{var i=sp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return ny(null,e,t,!1,a)}function gN(e,t,a,i){if(S("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Yp(a))throw new Error("Target container is not a DOM element.");if(e==null||!Vo(e))throw new Error("parentComponent must be a valid React Component");return ny(e,t,a,!1,i)}function SN(e){if(!Yp(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=sp(e)&&e._reactRootContainer===void 0;t&&S("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var a=t1(e),i=a&&!to(a);i&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return cu(function(){ny(null,null,e,!1,function(){e._reactRootContainer=null,kC(e)})}),!0}else{{var u=t1(e),s=!!(u&&to(u)),f=e.nodeType===Cr&&Yp(e.parentNode)&&!!e.parentNode._reactRootContainer;s&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",f?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}de(eN),ch(tN),ns(nN),zd(pa),dh(Jo),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&S("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Iv(Tx),Zs(MS,fO,cu);function CN(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ty(t))throw new Error("Target container is not a DOM element.");return ZO(e,t,null,a)}function EN(e,t,a,i){return gN(e,t,a,i)}var n1={usingClientEntryPoint:!1,Events:[to,ef,$h,Ks,Ho,MS]};function TN(e,t){return n1.usingClientEntryPoint||S('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),sN(e,t)}function wN(e,t,a){return n1.usingClientEntryPoint||S('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),fN(e,t,a)}function RN(e){return PT()&&S("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),cu(e)}var bN=oN({findFiberByHostInstance:ds,bundleType:1,version:qS,rendererPackageName:"react-dom"});if(!bN&&gn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var xN=window.location.protocol;/^(https?|file):$/.test(xN)}Zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=n1,Zr.createPortal=CN,Zr.createRoot=TN,Zr.findDOMNode=hN,Zr.flushSync=RN,Zr.hydrate=mN,Zr.hydrateRoot=wN,Zr.render=yN,Zr.unmountComponentAtNode=SN,Zr.unstable_batchedUpdates=MS,Zr.unstable_renderSubtreeIntoContainer=EN,Zr.version=qS,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Zr}(function(p){function y(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y)}catch{}}}process.env.NODE_ENV==="production"?(y(),p.exports=vb()):p.exports=hb()})(fb);const mb=p=>new Promise(y=>{const v=new FileReader;v.onloadend=w=>y(w.target.result),v.readAsDataURL(p)}),yb=p=>new Promise(y=>{const v=new Image;v.onload=()=>y(v),v.src=p}),gb=(p,y,v)=>new Promise(w=>p.toBlob(_=>w(_),y,v)),Sb=p=>{const w=p.width,_=p.height;let A=p.width,S=p.height;return(w>1400||_>1400)&&(w/_>1400/1400?(A=1400,S=Math.round(1400*(_/w))):(S=1400,A=Math.round(1400*(w/_)))),{width:A,height:S}},Cb=async(p,y="image/jpeg",v=.5,w=300)=>{const _=p.name;if(p.size/1024<w)return p;const A=document.createElement("canvas"),S=A.getContext("2d"),Y=await mb(p),H=await yb(Y),j=Sb(H);A.width=j.width,A.height=j.height,S.clearRect(0,0,j.width,j.height),S.drawImage(H,0,0,j.width,j.height);const K=await gb(A,y,v);return new File([K],_,{type:y})},Y1=[Os.jpeg,Os.jpg,Os.png],Q1=p=>{const{maxCount:y=1,listType:v="picture-card",fileList:w=[],maxSize:_=2,accept:A=Y1.join(","),uploadBtnName:S="上传",uploadHint:Y=null,compression:H}=p,[j,K]=at.useState(!1),[I,ne]=at.useState(""),ie=()=>v!=="text"?un("div",{style:{position:"relative"},children:[un("div",{children:[Se($R,{}),Se("div",{style:{marginTop:8},children:S})]}),Y]}):un(Gp,{children:[Se(Ye.Button,{icon:Se(qR,{}),children:S}),Y]}),ze=Ce=>new Promise((it,Be)=>{const wt=A.split(","),$e=nv(Ce.name)||"";A&&!wt.includes($e)&&(Ye.message.error(`只允许上传 ${A} 文件`),Be(!1)),Ce.size/1024/1024<_||(Ye.message.error(`文件必须小于${_}MB`),Be(!1)),H&&it(Cb(Ce,H.type,H.quality,H.limit)),it(Ce)}).catch(it=>Ye.Upload.LIST_IGNORE),et=Ce=>{p.onChange&&p.onChange(Ce)},Ze=Ce=>{p.onPreview?p.onPreview(Ce):Ot(Ce)},Ot=async Ce=>{let Ue=nv(Ce.name)||"";if(Ue||(Ue=nv(Ce.name||Ce.url)||""),Ue===Os.pdf)return Ye.Modal.info({title:"PDF",width:"60%",content:Se("iframe",{title:"PDF预览",src:Ce.url||Ce.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});Y1.includes(Ue)&&(!Ce.url&&!Ce.thumbUrl&&!Ce.preview&&(Ce.preview=await H1(Ce.originFileObj)),ne(Ce.url||Ce.thumbUrl||Ce.preview),K(!0))};return un(Gp,{children:[Se(Ye.Upload,{beforeUpload:ze,onChange:et,listType:v,...p,onPreview:Ze,children:w.length>=y?null:ie()}),Se(Ye.Image,{style:{display:"none"},preview:{visible:j,src:I,onVisibleChange:()=>{K(!1),ne("")}}})]})},rv={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},Eb={labelCol:{span:4},wrapperCol:{span:20}},W1=p=>{switch(p){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},Ry=p=>{const{items:y,rowProps:v,formProps:w,readonly:_=!1,hiddenTitle:A=!1}=p,S=(j,K)=>{var I,ne;if(K.btnType==="submit"){(I=w==null?void 0:w.form)==null||I.validateFields().then(ie=>{K.onClick&&K.onClick(ie)});return}if(K.btnType==="reset"){(ne=w==null?void 0:w.form)==null||ne.resetFields(),K.onClick&&K.onClick(j);return}K.btnType==="cancel"&&K.onClick&&K.onClick(j)},Y=j=>Array.isArray(j)?j:j&&j.fileList,H=j=>{var I;const K=w==null?void 0:w.initialValues;return j.dataIndex?((I=j.render)==null?void 0:I.call(j,K==null?void 0:K[j.dataIndex],K))||j.value||(K==null?void 0:K[j.dataIndex]):""};return Se(Ye.Form,{layout:"horizontal",form:w==null?void 0:w.form,...Eb,...w||{},children:Se(Ye.Row,{gutter:16,...v,children:y.filter(j=>!j.hidden).map((j,K)=>Se(Ye.Col,{...j.colProps||{span:24},children:Se(Ye.Form.Item,{...j.valueType==="upload"?{getValueFromEvent:Y}:{},label:A?"":j.title,name:j.valueType==="btns"?void 0:j.dataIndex,...j.formItemProps,children:j.readonly?Se("div",{children:H(j)}):j.readonly===void 0&&_?Se("div",{children:H(j)}):Se(G1,{onChange:I=>{var ne;return(ne=j==null?void 0:j.onChange)==null?void 0:ne.call(j,I)},valueType:j.valueType,onBtnClick:S,valueProps:j.valueProps})})},j.dataIndex||K))})})},G1=p=>{const{valueType:y,valueProps:v,value:w,onChange:_,onBtnClick:A,inputRef:S}=p,Y=at.useMemo(()=>{let H=Se(Ye.Input,{placeholder:"请输入",allowClear:!0,...v});switch(y){case"rate":H=Se(Ye.Rate,{...v});break;case"password":H=Se(Ye.Input.Password,{...v});break;case"modal":H=Se(Tb,{...v});break;case"checkbox":H=Se(Ye.Checkbox.Group,{...v});break;case"select":H=Se(Ye.Select,{placeholder:"请选择",allowClear:!0,...v});break;case"inputNumber":H=Se(Ye.InputNumber,{style:{width:"100%"},placeholder:"请输入",...v});break;case"textarea":H=Se(Ye.Input.TextArea,{placeholder:"请输入",allowClear:!0,...v});break;case"radio":H=Se(Ye.Radio.Group,{...v});break;case"switch":H=Se(Ye.Switch,{...v});break;case"datePicker":H=Se(Ye.DatePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"rangePicker":H=Se(Ye.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"timePicker":H=Se(Ye.TimePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"cascader":H=Se(Ye.Cascader,{allowClear:!0,...v});break;case"upload":H=Se(Q1,{...v});break;case"btns":H=Se(Ye.Space,{children:v==null?void 0:v.map(j=>at.createElement(Ye.Button,{type:j.btnType==="submit"?"primary":"default",...Ds.omit(j,["btnType"]),key:j.key||j.btnType,onClick:K=>{A==null||A(K,j)}},j.title||j.children))});break}return H},[y,v,_,w]);if(y==="custom"){const H=v;return at.cloneElement(H.children,{[W1(y||"input")]:w,onChange:_,ref:S})}return at.cloneElement(Y,{[W1(y||"input")]:w,onChange:_,ref:S})},Tb=p=>{const{placeholder:y,labelKey:v,onToggle:w,value:_,onClear:A,className:S,style:Y}=p;return un("div",{className:[rv.fieldModal,S].filter(H=>H).join(" "),style:Y,children:[Se("div",{className:rv.content,onClick:()=>w(!0),children:_?Se("span",{children:_[v]}):Se("span",{className:rv.placeholder,children:y})}),Se("span",{className:rv.suffix,onClick:A,children:_&&Se(FR,{})})]})},wb={search:"search-table-module_search_17add"};function Rb(p){const{tableProps:y={},searchProps:v}=p,{columns:w=[],minColumnWidth:_=200,...A}=y;return un(Gp,{children:[v&&Se(Ry,{hiddenTitle:!0,...v,items:v.items}),Se(Ye.Table,{columns:w.filter(S=>!S.hidden).map(S=>({...S,width:S.width||_})),scroll:{x:w.filter(S=>!S.hidden).reduce((S,Y)=>S+(typeof Y.width=="number"?Y.width:_),0)},...A,className:Df(wb.table,y==null?void 0:y.className),pagination:typeof(y==null?void 0:y.pagination)=="boolean"?y.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`,...y==null?void 0:y.pagination}})]})}const bb={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},q1=at.createContext(null),xb=({index:p,...y})=>{const[v]=Ye.Form.useForm();return Se(Ye.Form,{form:v,component:!1,children:Se(q1.Provider,{value:v,children:Se("tr",{...y})})})};function kb(p){const{title:y,editable:v,children:w,dataIndex:_,record:A,rules:S,onChange:Y,type:H="input",valueProps:j,initialValue:K,...I}=p,ne=at.useRef(null),ie=at.useContext(q1),ze=async()=>{try{const Ot=await ie.validateFields();Y({...A,...Ot})}catch{}},et=()=>Se(G1,{valueType:H,valueProps:{...j,onBlur:ze,onPressEnter:ze},inputRef:ne});let Ze=w;return v&&(Ze=Se(Ye.Form.Item,{style:{margin:0},initialValue:K||Ds.get(A,_),name:_,rules:S,children:et()})),Se("td",{children:Ze})}function Db(p){const{columns:y,onChange:v,...w}=p,_={body:{row:xb,cell:kb}},A=y==null?void 0:y.map(S=>S.editable?{...S,onCell:Y=>({...S,record:Y,onChange:v})}:S);return Se(Ye.Table,{...w,components:_,rowClassName:()=>bb.editableRow,columns:A})}const X1=p=>{const{auth:y=!0,...v}=p;return y?Se(Ye.Button,{...v}):null},_b=p=>{const{PId:y,auths:v,...w}=p,_=at.useMemo(()=>!!(v&&v.find(A=>A.PId===y)),[y,v]);return Se(X1,{...w,auth:_})},_n={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},Ob=p=>{const{data:y,current:v,rowKey:w,renderContent:_}=p,[A,S]=at.useState(!1),Y=at.useMemo(()=>p.currentIndex!==void 0?p.currentIndex:!v||y.length===0?0:y.findIndex(I=>I.PNId===v),[v,y]),H=at.useMemo(()=>Y>1?A?0:Y-1:0,[Y,A]),j=()=>{S(!0)};return un("ul",{className:_n.main,children:[Y>1&&!A&&un("li",{className:Df(_n.item,_n.itemDone),children:[Se("div",{className:_n.tail}),Se("div",{className:_n.node}),Se("div",{className:_n.content,children:un("div",{className:_n.collpase,children:[un("div",{children:["已收起",Se("span",{children:Y-1}),"个节点"]}),un("a",{className:_n.btn,onClick:j,children:["展开节点",Se(PR,{})]})]})})]}),y.slice(H).map((K,I)=>un("li",{className:Df(_n.item,Y===I+H?_n.itemActive:Y>I+H?_n.itemDone:_n.itemUnDo),children:[Se("div",{className:_n.tail}),Se("div",{className:_n.node}),un("div",{className:_n.content,children:[_?_(K,I,A?Y:Y-H):un(Gp,{children:[Se("div",{className:_n.title,children:K.PNName}),un("div",{className:_n.dateWrapper,children:[K.PlanFinishDate&&un("span",{children:["预计完成时间: ",K.PlanFinishDate]}),K.UpdateTime&&un("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",K.UpdateTime]})]}),K.Remark&&Se("div",{className:_n.remark,children:K.Remark})]}),A&&Y-1===I&&un("a",{className:_n.btn,onClick:()=>S(!1),children:["收起节点 ",Se(QR,{})]})]})]},typeof w=="string"?K[w]:w(K)))]})},Nb=p=>{const{current:y,data:v,rowKey:w,renderContent:_,currentIndex:A,...S}=p;return(()=>{Ye.Modal.info({icon:null,title:"流程节点",width:700,content:Se(Ob,{rowKey:w,renderContent:_,current:y,currentIndex:A,data:v}),closable:!0,footer:null,maskClosable:!0,...S})})(),null},Mb=(p,y)=>{const v=new URL(p),w=new URL(y);return v.protocol===w.protocol&&v.host===w.host&&v.port===w.port},Lb=p=>{const y=String(p).split("/");return y[y.length-1]},zb=p=>{var v;return(v=p.headers.get("content-disposition"))==null?void 0:v.split(";")[1].split("=")[1]},Ub=(p,y)=>{const v=y||Lb(p);if(Mb(p,window.location.href)){by(p,v);return}let w=y;fetch(p,{method:"get"}).then(_=>(w||(w=zb(_)),_.blob())).then(_=>{K1(_,w||v)}).catch(()=>{by(p,"")})},Ab=p=>{for(var y=p.split(","),v=y[0].match(/:(.*?);/)[1],w=window.atob(y[1]),_=w.length,A=new Uint8Array(_);_--;)A[_]=w.charCodeAt(_);return new Blob([A],{type:v})},K1=(p,y)=>{let v="";p instanceof Blob?v=window.URL.createObjectURL(p):v=window.URL.createObjectURL(Ab(p));const w=window.navigator;if(w.msSaveOrOpenBlob){w.msSaveOrOpenBlob(p,y);return}by(v,y),window.URL.revokeObjectURL(v)},by=(p,y)=>{let v=document.createElement("a");v.style.display="none",v.href=p,v.target="_blank",v.download=y,document.body.appendChild(v),v.click(),document.body.removeChild(v)},Fb=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:Ub,downloadBlob:K1},Symbol.toStringTag,{value:"Module"})),Z1={phone:{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号码"},telephone:{pattern:/^[\d -]+$/,message:"请输入正确的电话号码"},email:{pattern:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,message:"请输入正确的邮箱地址"},httpUrl:{pattern:/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/,message:"请输入合法的URL"},zipCode:{pattern:/^[0-9]{6}$/,message:"请输入正确的邮政编码"},specificKey:{pattern:/^[\w\u4E00-\u9FA5\uF900-\uFA2D()()]*$/,message:"可输入字母、汉字、数字或()"},inputTextarea:{pattern:/^[\w\u4E00-\u9FA5\uF900-\uFA2D-\u3002-\uff1f-\uff01-\uff0c-\u3001-\uff1b-\uff1a]*$/,message:"请输入字母、汉字或数字和中文常用字符:?!,、;。"},backendRestrict:{pattern:/^[^'"/\\]*$/,message:`不能输入特殊字符\\'/"`},onetoNinetyNine:{pattern:/^[1-9][0-9]{0,1}$/,message:"请输入1-99的整数"},passwordRule:{pattern:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z0-9]{8,12}$/,message:"密码应为字母大小写+数字8-12位组合"},passwordNewRule:{pattern:/^.*(?=.{8,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#¥%&*.()_+~/-]).*$/,message:"密码应为字母大小写+数字+常见字符!@#¥%&*.()_+~/- 8-12位组合"},pureNumber:{pattern:/^[1-9][0-9]*$/,message:"请输入整数类型"},onlyBlankRule:{pattern:/\S/,message:"输入内容不能只有空格"}},Hb=Object.freeze(Object.defineProperty({__proto__:null,default:Z1},Symbol.toStringTag,{value:"Module"}));class jb{constructor(y){Mw(this,"options",{id:"",canvasId:"verifyCanvas",width:100,height:30,type:"blend",code:""});this.options=y}GVerify(){this.options.numArr="0,1,2,3,4,5,6,7,8,9".split(","),this.options.letterArr=this.getAllLetter(),this._init(),this.refresh()}_init(){const y=document.getElementById(this.options.id),v=document.createElement("canvas");v.id=this.options.canvasId,v.width=Number(this.options.width),v.height=Number(this.options.height),v.style.cursor="pointer",v.innerHTML="您的浏览器版本不支持canvas",y&&y.appendChild(v),v.onclick=()=>{this.refresh()}}refresh(){this.options.code="";const y=document.getElementById(this.options.canvasId);let v,w=[];if(y.getContext)v=y.getContext("2d");else return;v.textBaseline="middle",v.fillStyle=this.randomColor(180,240),v.fillRect(0,0,this.options.width,this.options.height),this.options.type=="blend"?w=this.options.numArr.concat(this.options.letterArr):this.options.type=="number"?w=this.options.numArr:w=this.options.letterArr;for(let _=1;_<=4;_++){const A=w[this.randomNum(0,w.length)];this.options.code+=A,v.font="20px SimHei",v.fillStyle=this.randomColor(50,160),v.shadowBlur=this.randomNum(-3,3),v.shadowColor="rgba(0, 0, 0, 0.3)";const S=Number(this.options.width)/5*_,Y=Number(this.options.height)/2,H=this.randomNum(-30,30);v.translate(S,Y),v.rotate(H*Math.PI/180),v.fillText(A,0,0),v.rotate(-H*Math.PI/180),v.translate(-S,-Y)}for(let _=0;_<2;_++)v.strokeStyle=this.randomColor(40,180),v.beginPath(),v.moveTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height)/2)),v.lineTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height))),v.stroke();for(let _=0;_<Number(this.options.width)/10;_++)v.fillStyle=this.randomColor(0,255),v.beginPath(),v.arc(this.randomNum(0,this.options.width),this.randomNum(0,this.options.height),1,0,2*Math.PI),v.fill()}validate(y){const v=y.toLowerCase(),w=this.options.code.toLowerCase();return v==w}getAllLetter(){return"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z".split(",")}randomNum(y,v){return Math.floor(Math.random()*(v-y)+y)}randomColor(y,v){const w=this.randomNum(y,v),_=this.randomNum(y,v),A=this.randomNum(y,v);return"rgb("+w+","+_+","+A+")"}}const Pb=Object.freeze(Object.defineProperty({__proto__:null,getGVerify:jb},Symbol.toStringTag,{value:"Module"}));function Vb(p){const{modal:y,message:v}=Ye.App.useApp(),[w]=Ye.Form.useForm(),_=[{dataIndex:"Password",title:"新密码",valueType:"password",valueProps:{placeholder:"请输入新密码"},formItemProps:{rules:[{required:!0,message:"请输入新密码"},Z1.passwordNewRule]}},{dataIndex:"NewPassword",title:"确认密码",valueType:"password",valueProps:{placeholder:"请输入确认密码"},formItemProps:{rules:[{required:!0,message:"请输入确认密码"},({getFieldValue:S})=>({validator(Y,H){return!H||S("Password")===H?Promise.resolve():Promise.reject(new Error("两次密码输入不一致"))}})]}}];return{handleChangePwd:zw.useLockFn(async(S,Y)=>{await y.confirm({title:Y||"默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",icon:null,wrapClassName:"confirmWrapper",content:Se(Ry,{items:_,formProps:{form:w,preserve:!1,layout:"vertical",labelCol:{span:24},wrapperCol:{span:24}}}),onOk(){return new Promise((H,j)=>{w.validateFields().then(K=>{S({values:K,resolve:H,reject:j})}).catch(K=>{j(K)})})},...p==null?void 0:p.modalProps})})}}gt.AuthButton=X1,gt.BackHeader=ZR,gt.CoralButton=_b,gt.CreateForm=Ry,gt.EditTable=Db,gt.FormRules=Hb,gt.SearchTable=Rb,gt.UploadFile=Q1,gt.download=Fb,gt.fileType=JR,gt.showWorkFlow=Nb,gt.useChangePwd=Vb,gt.utils=cb,gt.verfyCode=Pb,Object.defineProperty(gt,Symbol.toStringTag,{value:"Module"})});
@@ -1,12 +1,13 @@
1
+ import { ModalProps } from "antd";
1
2
  interface ChangePwdResolveProps {
2
3
  values: any;
3
4
  resolve: (value: any) => void;
4
5
  reject: (reason?: any) => void;
5
6
  }
6
7
  interface ChangePwdHookProps {
7
- title: string;
8
+ modalProps?: ModalProps;
8
9
  }
9
10
  export default function useChangePwd(props?: ChangePwdHookProps): {
10
- handleChangePwd: () => Promise<ChangePwdResolveProps | undefined>;
11
+ handleChangePwd: (func: (params: ChangePwdResolveProps) => void, title?: string | undefined) => Promise<void | undefined>;
11
12
  };
12
13
  export {};
@@ -37,21 +37,26 @@ function useChangePwd(props) {
37
37
  }
38
38
  }
39
39
  ];
40
- const handleChangePwd = useLockFn(async () => {
41
- return new Promise((resolve, reject) => {
42
- modal.confirm({
43
- title: (props == null ? void 0 : props.title) || "默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",
44
- icon: null,
45
- wrapClassName: "confirmWrapper",
46
- content: /* @__PURE__ */ jsx(CreateForm, { items, formProps: { form, layout: "vertical", labelCol: { span: 24 }, wrapperCol: { span: 24 } } }),
47
- onOk() {
48
- return new Promise((resolve2, reject2) => {
49
- form.validateFields().then((values) => {
50
- resolve({ values, resolve: resolve2, reject: reject2 });
40
+ const handleChangePwd = useLockFn(async (func, title) => {
41
+ await modal.confirm({
42
+ title: title || "默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",
43
+ icon: null,
44
+ wrapClassName: "confirmWrapper",
45
+ content: /* @__PURE__ */ jsx(CreateForm, { items, formProps: { form, preserve: false, layout: "vertical", labelCol: { span: 24 }, wrapperCol: { span: 24 } } }),
46
+ onOk() {
47
+ return new Promise((resolve, reject) => {
48
+ form.validateFields().then((values) => {
49
+ func({
50
+ values,
51
+ resolve,
52
+ reject
51
53
  });
54
+ }).catch((error) => {
55
+ reject(error);
52
56
  });
53
- }
54
- });
57
+ });
58
+ },
59
+ ...props == null ? void 0 : props.modalProps
55
60
  });
56
61
  });
57
62
  return { handleChangePwd };
@@ -1,12 +1,13 @@
1
+ import { ModalProps } from "antd";
1
2
  interface ChangePwdResolveProps {
2
3
  values: any;
3
4
  resolve: (value: any) => void;
4
5
  reject: (reason?: any) => void;
5
6
  }
6
7
  interface ChangePwdHookProps {
7
- title: string;
8
+ modalProps?: ModalProps;
8
9
  }
9
10
  export default function useChangePwd(props?: ChangePwdHookProps): {
10
- handleChangePwd: () => Promise<ChangePwdResolveProps | undefined>;
11
+ handleChangePwd: (func: (params: ChangePwdResolveProps) => void, title?: string | undefined) => Promise<void | undefined>;
11
12
  };
12
13
  export {};
@@ -38,21 +38,26 @@ function useChangePwd(props) {
38
38
  }
39
39
  }
40
40
  ];
41
- const handleChangePwd = ahooks.useLockFn(async () => {
42
- return new Promise((resolve, reject) => {
43
- modal.confirm({
44
- title: (props == null ? void 0 : props.title) || "默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",
45
- icon: null,
46
- wrapClassName: "confirmWrapper",
47
- content: /* @__PURE__ */ jsxRuntime.jsx(CreateForm, { items, formProps: { form, layout: "vertical", labelCol: { span: 24 }, wrapperCol: { span: 24 } } }),
48
- onOk() {
49
- return new Promise((resolve2, reject2) => {
50
- form.validateFields().then((values) => {
51
- resolve({ values, resolve: resolve2, reject: reject2 });
41
+ const handleChangePwd = ahooks.useLockFn(async (func, title) => {
42
+ await modal.confirm({
43
+ title: title || "默认账户及口令(密码),用户登录时需修改默认口令(密码),否则无法登录系统",
44
+ icon: null,
45
+ wrapClassName: "confirmWrapper",
46
+ content: /* @__PURE__ */ jsxRuntime.jsx(CreateForm, { items, formProps: { form, preserve: false, layout: "vertical", labelCol: { span: 24 }, wrapperCol: { span: 24 } } }),
47
+ onOk() {
48
+ return new Promise((resolve, reject) => {
49
+ form.validateFields().then((values) => {
50
+ func({
51
+ values,
52
+ resolve,
53
+ reject
52
54
  });
55
+ }).catch((error) => {
56
+ reject(error);
53
57
  });
54
- }
55
- });
58
+ });
59
+ },
60
+ ...props == null ? void 0 : props.modalProps
56
61
  });
57
62
  });
58
63
  return { handleChangePwd };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.2.10",
4
+ "version": "0.2.12",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",