form-imagining 0.0.92-beta4 → 0.0.92-beta5
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.
- package/dist/App-CeSaKLzl.js +32 -0
- package/dist/Area-CvB4PPd0.js +4 -0
- package/dist/Bar-3vaSNJF6.js +4 -0
- package/dist/ChartsArea-CLnQWPFG.js +4 -0
- package/dist/ChartsBar-BSpK0WrN.js +4 -0
- package/dist/ChartsPie-BCMC_TQh.js +4 -0
- package/dist/CheckBoxModel-B-fU61UK.js +4 -0
- package/dist/Col-C5R7ir2_.js +4 -0
- package/dist/Collapse-DBGWO5sC.js +4 -0
- package/dist/CommonText copy-BJC-BTtR.js +189 -0
- package/dist/Demo-DQfgc_0o.js +72 -0
- package/dist/Demo-IMeHQvoY.js +201 -0
- package/dist/FView-hCIVd2Bc.js +4 -0
- package/dist/FX-Dg1QqBMe.js +4 -0
- package/dist/FormGridCopy-gVFc4ISN.js +168 -0
- package/dist/FormImagining-DGb-tBuT.js +9 -0
- package/dist/GenerateForm-BpHT1kIn.js +4 -0
- package/dist/GenerateReport-DJV2n8T1.js +4 -0
- package/dist/HelloWorld-BeS_FY55.js +9 -0
- package/dist/Input-/345/210/240/351/231/244-iZ0UOxSz.js +87 -0
- package/dist/Label-/345/210/240/351/231/244-B9WO_2kh.js +92 -0
- package/dist/LabelModel-BalajX3r.js +4 -0
- package/dist/Login-CVFFGrLb.js +9 -0
- package/dist/Pie-Od-rmtRo.js +4 -0
- package/dist/PropertyIndex-NiWR7JoE.js +4 -0
- package/dist/RView-zILs-avv.js +4 -0
- package/dist/SqlModule-LeQGza9o.js +4 -0
- package/dist/SvgIconCopy-NqR1csRF.js +39 -0
- package/dist/TableBtnModal-pXtJj_ZC.js +4 -0
- package/dist/TextModel-2IvLfIoB.js +9 -0
- package/dist/childForm-CUsGbk-1.js +4 -0
- package/dist/cssMode-NDdT9_g5.js +1577 -0
- package/dist/form-imagining.js +1 -1
- package/dist/form-imagining.umd.cjs +1 -1
- package/dist/formTest-P85ae8De.js +19 -0
- package/dist/freemarker2-9ypbfZHs.js +995 -0
- package/dist/handlebars-Cxfu7gar.js +425 -0
- package/dist/html-DP9XyZbv.js +314 -0
- package/dist/htmlMode-CKz5V0OF.js +1587 -0
- package/dist/index - /345/211/257/346/234/254-B0-qx_nb.js" +531 -0
- package/dist/index-CbfHFHO6.js +36 -0
- package/dist/index-DxnKYckT.js +11 -0
- package/dist/index-J_GpH1wa.js +3323 -0
- package/dist/index-O-BlCY8c.js +300188 -0
- package/dist/javascript-OR2qFYsA.js +76 -0
- package/dist/jsonMode-D1DqmrHE.js +2002 -0
- package/dist/liquid-D9sB7tRb.js +246 -0
- package/dist/mdx-BbSD2bfh.js +171 -0
- package/dist/python-B6Zu3nrJ.js +307 -0
- package/dist/razor-BJsTmanz.js +556 -0
- package/dist/tableSelectDemo-C9CWgeB1.js +134 -0
- package/dist/tableSelectDemo2-6Zu-JFZi.js +108 -0
- package/dist/tsMode-D4p57ONV.js +895 -0
- package/dist/typescript-DmPfNCOF.js +349 -0
- package/dist/xml-Bd-8bZR7.js +101 -0
- package/dist/yaml-wsdJKVuM.js +212 -0
- package/package.json +1 -1
package/dist/form-imagining.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a7 as s, al as t, aa as o, ac as n, ad as r, ae as l, af as d, ai as f, an as i, aw as m, ax as u, ay as p, az as I, aA as g, aD as F, aK as v } from "./index-
|
|
1
|
+
import { a7 as s, al as t, aa as o, ac as n, ad as r, ae as l, af as d, ai as f, an as i, aw as m, ax as u, ay as p, az as I, aA as g, aD as F, aK as v } from "./index-O-BlCY8c.js";
|
|
2
2
|
export {
|
|
3
3
|
s as createScopedBus,
|
|
4
4
|
t as default,
|
|
@@ -483,7 +483,7 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
|
|
|
483
483
|
`]:{color:W.colorTextDisabled}}}}}},genListStyle=W=>{const{componentCls:C,antCls:H,iconCls:U,fontSize:K,lineHeight:X}=W,Z=`${C}-list-item`,Q=`${Z}-actions`,ee=`${Z}-action`,te=Math.round(K*X);return{[`${C}-wrapper`]:{[`${C}-list`]:_extends$1(_extends$1({},clearFix()),{lineHeight:W.lineHeight,[Z]:{position:"relative",height:W.lineHeight*K,marginTop:W.marginXS,fontSize:K,display:"flex",alignItems:"center",transition:`background-color ${W.motionDurationSlow}`,"&:hover":{backgroundColor:W.controlItemBgHover},[`${Z}-name`]:_extends$1(_extends$1({},textEllipsis),{padding:`0 ${W.paddingXS}px`,lineHeight:X,flex:"auto",transition:`all ${W.motionDurationSlow}`}),[Q]:{[ee]:{opacity:0},[`${ee}${H}-btn-sm`]:{height:te,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
484
484
|
${ee}:focus,
|
|
485
485
|
&.picture ${ee}
|
|
486
|
-
`]:{opacity:1},[U]:{color:W.colorTextDescription,transition:`all ${W.motionDurationSlow}`},[`&:hover ${U}`]:{color:W.colorText}},[`${C}-icon ${U}`]:{color:W.colorTextDescription,fontSize:K},[`${Z}-progress`]:{position:"absolute",bottom:-W.uploadProgressOffset,width:"100%",paddingInlineStart:K+W.paddingXS,fontSize:K,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Z}:hover ${ee}`]:{opacity:1,color:W.colorText},[`${Z}-error`]:{color:W.colorError,[`${Z}-name, ${C}-icon ${U}`]:{color:W.colorError},[Q]:{[`${U}, ${U}:hover`]:{color:W.colorError},[ee]:{opacity:1}}},[`${C}-list-item-container`]:{transition:`opacity ${W.motionDurationSlow}, height ${W.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},uploadAnimateInlineIn=new Keyframe("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),uploadAnimateInlineOut=new Keyframe("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),genMotionStyle=W=>{const{componentCls:C}=W,H=`${C}-animate-inline`;return[{[`${C}-wrapper`]:{[`${H}-appear, ${H}-enter, ${H}-leave`]:{animationDuration:W.motionDurationSlow,animationTimingFunction:W.motionEaseInOutCirc,animationFillMode:"forwards"},[`${H}-appear, ${H}-enter`]:{animationName:uploadAnimateInlineIn},[`${H}-leave`]:{animationName:uploadAnimateInlineOut}}},uploadAnimateInlineIn,uploadAnimateInlineOut]},genPictureStyle=W=>{const{componentCls:C,iconCls:H,uploadThumbnailSize:U,uploadProgressOffset:K}=W,X=`${C}-list`,Z=`${X}-item`;return{[`${C}-wrapper`]:{[`${X}${X}-picture, ${X}${X}-picture-card`]:{[Z]:{position:"relative",height:U+W.lineWidth*2+W.paddingXS*2,padding:W.paddingXS,border:`${W.lineWidth}px ${W.lineType} ${W.colorBorder}`,borderRadius:W.borderRadiusLG,"&:hover":{background:"transparent"},[`${Z}-thumbnail`]:_extends$1(_extends$1({},textEllipsis),{width:U,height:U,lineHeight:`${U+W.paddingSM}px`,textAlign:"center",flex:"none",[H]:{fontSize:W.fontSizeHeading2,color:W.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Z}-progress`]:{bottom:K,width:`calc(100% - ${W.paddingSM*2}px)`,marginTop:0,paddingInlineStart:U+W.paddingXS}},[`${Z}-error`]:{borderColor:W.colorError,[`${Z}-thumbnail ${H}`]:{"svg path[fill='#e6f7ff']":{fill:W.colorErrorBg},"svg path[fill='#1890ff']":{fill:W.colorError}}},[`${Z}-uploading`]:{borderStyle:"dashed",[`${Z}-name`]:{marginBottom:K}}}}}},genPictureCardStyle=W=>{const{componentCls:C,iconCls:H,fontSizeLG:U,colorTextLightSolid:K}=W,X=`${C}-list`,Z=`${X}-item`,Q=W.uploadPicCardSize;return{[`${C}-wrapper${C}-picture-card-wrapper`]:_extends$1(_extends$1({},clearFix()),{display:"inline-block",width:"100%",[`${C}${C}-select`]:{width:Q,height:Q,marginInlineEnd:W.marginXS,marginBottom:W.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:W.colorFillAlter,border:`${W.lineWidth}px dashed ${W.colorBorder}`,borderRadius:W.borderRadiusLG,cursor:"pointer",transition:`border-color ${W.motionDurationSlow}`,[`> ${C}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${C}-disabled):hover`]:{borderColor:W.colorPrimary}},[`${X}${X}-picture-card`]:{[`${X}-item-container`]:{display:"inline-block",width:Q,height:Q,marginBlock:`0 ${W.marginXS}px`,marginInline:`0 ${W.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[Z]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${W.paddingXS*2}px)`,height:`calc(100% - ${W.paddingXS*2}px)`,backgroundColor:W.colorBgMask,opacity:0,transition:`all ${W.motionDurationSlow}`,content:'" "'}},[`${Z}:hover`]:{[`&::before, ${Z}-actions`]:{opacity:1}},[`${Z}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${W.motionDurationSlow}`,[`${H}-eye, ${H}-download, ${H}-delete`]:{zIndex:10,width:U,margin:`0 ${W.marginXXS}px`,fontSize:U,cursor:"pointer",transition:`all ${W.motionDurationSlow}`}},[`${Z}-actions, ${Z}-actions:hover`]:{[`${H}-eye, ${H}-download, ${H}-delete`]:{color:new TinyColor(K).setAlpha(.65).toRgbString(),"&:hover":{color:K}}},[`${Z}-thumbnail, ${Z}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Z}-name`]:{display:"none",textAlign:"center"},[`${Z}-file + ${Z}-name`]:{position:"absolute",bottom:W.margin,display:"block",width:`calc(100% - ${W.paddingXS*2}px)`},[`${Z}-uploading`]:{[`&${Z}`]:{backgroundColor:W.colorFillAlter},[`&::before, ${H}-eye, ${H}-download, ${H}-delete`]:{display:"none"}},[`${Z}-progress`]:{bottom:W.marginXL,width:`calc(100% - ${W.paddingXS*2}px)`,paddingInlineStart:0}}})}},genRtlStyle=W=>{const{componentCls:C}=W;return{[`${C}-rtl`]:{direction:"rtl"}}},genBaseStyle=W=>{const{componentCls:C,colorTextDisabled:H}=W;return{[`${C}-wrapper`]:_extends$1(_extends$1({},resetComponent(W)),{[C]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${C}-select`]:{display:"inline-block"},[`${C}-disabled`]:{color:H,cursor:"not-allowed"}})}},useStyle$1=genComponentStyleHook("Upload",W=>{const{fontSizeHeading3:C,fontSize:H,lineHeight:U,lineWidth:K,controlHeightLG:X}=W,Z=Math.round(H*U),Q=merge$1(W,{uploadThumbnailSize:C*2,uploadProgressOffset:Z/2+K,uploadPicCardSize:X*2.55});return[genBaseStyle(Q),genDraggerStyle(Q),genPictureStyle(Q),genPictureCardStyle(Q),genListStyle(Q),genMotionStyle(Q),genRtlStyle(Q),genCollapseMotion(Q)]});var __awaiter$1=function(W,C,H,U){function K(X){return X instanceof H?X:new H(function(Z){Z(X)})}return new(H||(H=Promise))(function(X,Z){function Q(ne){try{te(U.next(ne))}catch(ie){Z(ie)}}function ee(ne){try{te(U.throw(ne))}catch(ie){Z(ie)}}function te(ne){ne.done?X(ne.value):K(ne.value).then(Q,ee)}te((U=U.apply(W,C||[])).next())})},__rest$3=function(W,C){var H={};for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&C.indexOf(U)<0&&(H[U]=W[U]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(W);K<U.length;K++)C.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(W,U[K])&&(H[U[K]]=W[U[K]]);return H};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,Upload$1=vue.defineComponent({compatConfig:{MODE:3},name:"AUpload",inheritAttrs:!1,props:initDefaultProps(uploadProps(),{type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",supportServerRender:!0}),setup(W,C){let{slots:H,attrs:U,expose:K}=C;const X=useInjectFormItemContext(),{prefixCls:Z,direction:Q,disabled:ee}=useConfigInject("upload",W),[te,ne]=useStyle$1(Z),ie=useInjectDisabled(),re=vue.computed(()=>{var xe;return(xe=ee.value)!==null&&xe!==void 0?xe:ie.value}),[oe,ae]=useMergedState(W.defaultFileList||[],{value:vue.toRef(W,"fileList"),postState:xe=>{const we=Date.now();return(xe??[]).map((Te,Le)=>(!Te.uid&&!Object.isFrozen(Te)&&(Te.uid=`__AUTO__${we}_${Le}__`),Te))}}),se=vue.ref("drop"),le=vue.ref(null);vue.onMounted(()=>{devWarning(W.fileList!==void 0||U.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),devWarning(W.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),devWarning(W.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const ce=(xe,we,Te)=>{var Le,Ae;let Ne=[...we];W.maxCount===1?Ne=Ne.slice(-1):W.maxCount&&(Ne=Ne.slice(0,W.maxCount)),ae(Ne);const Pe={file:xe,fileList:Ne};Te&&(Pe.event=Te),(Le=W["onUpdate:fileList"])===null||Le===void 0||Le.call(W,Pe.fileList),(Ae=W.onChange)===null||Ae===void 0||Ae.call(W,Pe),X.onFieldChange()},ue=(xe,we)=>__awaiter$1(this,void 0,void 0,function*(){const{beforeUpload:Te,transformFile:Le}=W;let Ae=xe;if(Te){const Ne=yield Te(xe,we);if(Ne===!1)return!1;if(delete xe[LIST_IGNORE],Ne===LIST_IGNORE)return Object.defineProperty(xe,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof Ne=="object"&&Ne&&(Ae=Ne)}return Le&&(Ae=yield Le(Ae)),Ae}),de=xe=>{const we=xe.filter(Ae=>!Ae.file[LIST_IGNORE]);if(!we.length)return;const Te=we.map(Ae=>file2Obj(Ae.file));let Le=[...oe.value];Te.forEach(Ae=>{Le=updateFileList(Ae,Le)}),Te.forEach((Ae,Ne)=>{let Pe=Ae;if(we[Ne].parsedFile)Ae.status="uploading";else{const{originFileObj:Oe}=Ae;let Me;try{Me=new File([Oe],Oe.name,{type:Oe.type})}catch{Me=new Blob([Oe],{type:Oe.type}),Me.name=Oe.name,Me.lastModifiedDate=new Date,Me.lastModified=new Date().getTime()}Me.uid=Ae.uid,Pe=Me}ce(Pe,Le)})},fe=(xe,we,Te)=>{try{typeof xe=="string"&&(xe=JSON.parse(xe))}catch{}if(!getFileItem(we,oe.value))return;const Le=file2Obj(we);Le.status="done",Le.percent=100,Le.response=xe,Le.xhr=Te;const Ae=updateFileList(Le,oe.value);ce(Le,Ae)},pe=(xe,we)=>{if(!getFileItem(we,oe.value))return;const Te=file2Obj(we);Te.status="uploading",Te.percent=xe.percent;const Le=updateFileList(Te,oe.value);ce(Te,Le,xe)},ge=(xe,we,Te)=>{if(!getFileItem(Te,oe.value))return;const Le=file2Obj(Te);Le.error=xe,Le.response=we,Le.status="error";const Ae=updateFileList(Le,oe.value);ce(Le,Ae)},me=xe=>{let we;const Te=W.onRemove||W.remove;Promise.resolve(typeof Te=="function"?Te(xe):Te).then(Le=>{var Ae,Ne;if(Le===!1)return;const Pe=removeFileItem(xe,oe.value);Pe&&(we=_extends$1(_extends$1({},xe),{status:"removed"}),(Ae=oe.value)===null||Ae===void 0||Ae.forEach(Oe=>{const Me=we.uid!==void 0?"uid":"name";Oe[Me]===we[Me]&&!Object.isFrozen(Oe)&&(Oe.status="removed")}),(Ne=le.value)===null||Ne===void 0||Ne.abort(we),ce(we,Pe))})},ye=xe=>{var we;se.value=xe.type,xe.type==="drop"&&((we=W.onDrop)===null||we===void 0||we.call(W,xe))};K({onBatchStart:de,onSuccess:fe,onProgress:pe,onError:ge,fileList:oe,upload:le});const[_e]=useLocaleReceiver("Upload",localeValues$1.Upload,vue.computed(()=>W.locale)),Ce=(xe,we)=>{const{removeIcon:Te,previewIcon:Le,downloadIcon:Ae,previewFile:Ne,onPreview:Pe,onDownload:Oe,isImageUrl:Me,progress:Be,itemRender:Re,iconRender:He,showUploadList:Ue}=W,{showDownloadIcon:Ke,showPreviewIcon:Ge,showRemoveIcon:Ze}=typeof Ue=="boolean"?{}:Ue;return Ue?vue.createVNode(UploadList,{prefixCls:Z.value,listType:W.listType,items:oe.value,previewFile:Ne,onPreview:Pe,onDownload:Oe,onRemove:me,showRemoveIcon:!re.value&&Ze,showPreviewIcon:Ge,showDownloadIcon:Ke,removeIcon:Te,previewIcon:Le,downloadIcon:Ae,iconRender:He,locale:_e.value,isImageUrl:Me,progress:Be,itemRender:Re,appendActionVisible:we,appendAction:xe},_extends$1({},H)):xe==null?void 0:xe()};return()=>{var xe,we,Te;const{listType:Le,type:Ae}=W,{class:Ne,style:Pe}=U,Oe=__rest$3(U,["class","style"]),Me=_extends$1(_extends$1(_extends$1({onBatchStart:de,onError:ge,onProgress:pe,onSuccess:fe},Oe),W),{id:(xe=W.id)!==null&&xe!==void 0?xe:X.id.value,prefixCls:Z.value,beforeUpload:ue,onChange:void 0,disabled:re.value});delete Me.remove,(!H.default||re.value)&&delete Me.id;const Be={[`${Z.value}-rtl`]:Q.value==="rtl"};if(Ae==="drag"){const Ke=classNames(Z.value,{[`${Z.value}-drag`]:!0,[`${Z.value}-drag-uploading`]:oe.value.some(Ge=>Ge.status==="uploading"),[`${Z.value}-drag-hover`]:se.value==="dragover",[`${Z.value}-disabled`]:re.value,[`${Z.value}-rtl`]:Q.value==="rtl"},U.class,ne.value);return te(vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},U),{},{class:classNames(`${Z.value}-wrapper`,Be,Ne,ne.value)}),[vue.createVNode("div",{class:Ke,onDrop:ye,onDragover:ye,onDragleave:ye,style:U.style},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Me),{},{ref:le,class:`${Z.value}-btn`}),_objectSpread2$1({default:()=>[vue.createVNode("div",{class:`${Z.value}-drag-container`},[(we=H.default)===null||we===void 0?void 0:we.call(H)])]},H))]),Ce()]))}const Re=classNames(Z.value,{[`${Z.value}-select`]:!0,[`${Z.value}-select-${Le}`]:!0,[`${Z.value}-disabled`]:re.value,[`${Z.value}-rtl`]:Q.value==="rtl"}),He=flattenChildren((Te=H.default)===null||Te===void 0?void 0:Te.call(H)),Ue=Ke=>vue.createVNode("div",{class:Re,style:Ke},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Me),{},{ref:le}),H)]);return te(Le==="picture-card"?vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},U),{},{class:classNames(`${Z.value}-wrapper`,`${Z.value}-picture-card-wrapper`,Be,U.class,ne.value)}),[Ce(Ue,!!(He&&He.length))]):vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},U),{},{class:classNames(`${Z.value}-wrapper`,Be,U.class,ne.value)}),[Ue(He&&He.length?void 0:{display:"none"}),Ce()]))}}});var __rest$2=function(W,C){var H={};for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&C.indexOf(U)<0&&(H[U]=W[U]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(W);K<U.length;K++)C.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(W,U[K])&&(H[U[K]]=W[U[K]]);return H};const Dragger=vue.defineComponent({compatConfig:{MODE:3},name:"AUploadDragger",inheritAttrs:!1,props:uploadProps(),setup(W,C){let{slots:H,attrs:U}=C;return()=>{const{height:K}=W,X=__rest$2(W,["height"]),{style:Z}=U,Q=__rest$2(U,["style"]),ee=_extends$1(_extends$1(_extends$1({},X),Q),{type:"drag",style:_extends$1(_extends$1({},Z),{height:typeof K=="number"?`${K}px`:K})});return vue.createVNode(Upload$1,ee,H)}}}),Upload=_extends$1(Upload$1,{Dragger,LIST_IGNORE,install(W){return W.component(Upload$1.name,Upload$1),W.component(Dragger.name,Dragger),W}}),flexWrapValues=["wrap","nowrap","wrap-reverse"],justifyContentValues=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],alignItemsValues=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],genClsWrap=(W,C)=>{const H={};return flexWrapValues.forEach(U=>{H[`${W}-wrap-${U}`]=C.wrap===U}),H},genClsAlign=(W,C)=>{const H={};return alignItemsValues.forEach(U=>{H[`${W}-align-${U}`]=C.align===U}),H[`${W}-align-stretch`]=!C.align&&!!C.vertical,H},genClsJustify=(W,C)=>{const H={};return justifyContentValues.forEach(U=>{H[`${W}-justify-${U}`]=C.justify===U}),H};function createFlexClassNames(W,C){return classNames(_extends$1(_extends$1(_extends$1({},genClsWrap(W,C)),genClsAlign(W,C)),genClsJustify(W,C)))}const genFlexStyle=W=>{const{componentCls:C}=W;return{[C]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},genFlexGapStyle=W=>{const{componentCls:C}=W;return{[C]:{"&-gap-small":{gap:W.flexGapSM},"&-gap-middle":{gap:W.flexGap},"&-gap-large":{gap:W.flexGapLG}}}},genFlexWrapStyle=W=>{const{componentCls:C}=W,H={};return flexWrapValues.forEach(U=>{H[`${C}-wrap-${U}`]={flexWrap:U}}),H},genAlignItemsStyle=W=>{const{componentCls:C}=W,H={};return alignItemsValues.forEach(U=>{H[`${C}-align-${U}`]={alignItems:U}}),H},genJustifyContentStyle=W=>{const{componentCls:C}=W,H={};return justifyContentValues.forEach(U=>{H[`${C}-justify-${U}`]={justifyContent:U}}),H},useStyle=genComponentStyleHook("Flex",W=>{const C=merge$1(W,{flexGapSM:W.paddingXS,flexGap:W.padding,flexGapLG:W.paddingLG});return[genFlexStyle(C),genFlexGapStyle(C),genFlexWrapStyle(C),genAlignItemsStyle(C),genJustifyContentStyle(C)]});function isPresetSize(W){return["small","middle","large"].includes(W)}const flexProps=()=>({prefixCls:stringType(),vertical:booleanType(),wrap:stringType(),justify:stringType(),align:stringType(),flex:someType([Number,String]),gap:someType([Number,String]),component:anyType()});var __rest$1=function(W,C){var H={};for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&C.indexOf(U)<0&&(H[U]=W[U]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(W);K<U.length;K++)C.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(W,U[K])&&(H[U[K]]=W[U[K]]);return H};const AFlex=vue.defineComponent({name:"AFlex",inheritAttrs:!1,props:flexProps(),setup(W,C){let{slots:H,attrs:U}=C;const{flex:K,direction:X}=useConfigContextInject(),{prefixCls:Z}=useConfigInject("flex",W),[Q,ee]=useStyle(Z),te=vue.computed(()=>{var ne;return[Z.value,ee.value,createFlexClassNames(Z.value,W),{[`${Z.value}-rtl`]:X.value==="rtl",[`${Z.value}-gap-${W.gap}`]:isPresetSize(W.gap),[`${Z.value}-vertical`]:(ne=W.vertical)!==null&&ne!==void 0?ne:K==null?void 0:K.value.vertical}]});return()=>{var ne;const{flex:ie,gap:re,component:oe="div"}=W,ae=__rest$1(W,["flex","gap","component"]),se={};return ie&&(se.flex=ie),re&&!isPresetSize(re)&&(se.gap=`${re}px`),Q(vue.createVNode(oe,_objectSpread2$1({class:[U.class,te.value],style:[U.style,se]},omit$1(ae,["justify","wrap","align","vertical"])),{default:()=>[(ne=H.default)===null||ne===void 0?void 0:ne.call(H)]}))}}}),Flex=withInstall(AFlex);class RequestHttp{constructor(C){Hi(this,"axiosInstance");Hi(this,"options");Hi(this,"source");this.options=C,this.axiosInstance=axios.create(C),this.setupInterceptors();const H=axios.CancelToken;this.source=H.source()}createAxios(C){this.axiosInstance=axios.create(C)}setupInterceptors(){this.axiosInstance.interceptors.request.use(C=>(C=this.beforeRequest(C),this.requestInterceptors(C)),C=>Promise.reject(C)),this.axiosInstance.interceptors.response.use(C=>{var H;if(C.status==200){const U=(H=C.data)==null?void 0:H.code;return U===401||U===424?this.handleTokenExpired(C):(this.checkStatus(U,!0),Promise.resolve(C))}else return this.handleErrorData(C.data),Promise.reject(C)},C=>{var U;const H=(U=C==null?void 0:C.response)==null?void 0:U.status;return H===401||H===424?this.handleTokenExpired(C.response):(this.handleErrorData(C),Promise.reject(C))})}async handleTokenExpired(C){const H=C==null?void 0:C.config,U="__fi_isRetryRequest__";if(!H||H[U])return this.checkStatus(401,!0),Promise.reject(C);const K=typeof window<"u"?window.__bdcRefreshToken__:void 0;if(typeof K!="function")return this.checkStatus(401,!0),Promise.reject(C);const X=await K();return X?(useUserStoreWithOut().setToken(X),H[U]=!0,H.headers&&(H.headers.Authorization=X),this.axiosInstance.request(H)):(this.checkStatus(401,!0),Promise.reject(C))}beforeRequest(C){var K;const H=C.params||{},U=C.data||!1;return((K=C.method)==null?void 0:K.toUpperCase())==RequestEnum.GET?isString$5(H)&&(C.url=C.url+H,C.params=void 0):isString$5(H)?(C.data=H,C.params=void 0):C.data?C.data=U:C.data=H,C}sortAscii(C){let H=new Array,U=0;for(let Z in C)C[Z]==null&&C[Z]!=null||(H[U]=Z,U++);H=Array.from(new Set(H));let K=H.sort(),X="";for(let Z in K)X+=K[Z];return X}signParams(C){let H=this.sortAscii(C);return encryptByMd5(H)}isArrayLike(C){for(let H in C)if(H=="0")return!0;return!1}requestInterceptors(C){var H,U;if((H=C.requestOptions)!=null&&H.withToken){const X=useUserStoreWithOut().getToken;C&&C.headers&&(C.headers.Authorization||(C.headers.Authorization=X))}if(((U=C.requestOptions)==null?void 0:U.withTimeout)!==void 0&&(C.requestOptions.withTimeout||(C.timeout=0)),C&&C.headers&&C.requestOptions){C.requestOptions.xAuthToken!=null&&Reflect.set(C.headers,"x-auth-token",C.requestOptions.xAuthToken);let K=C.url,X={};K&&K.indexOf("?")>-1&&(X=this.urlParamsToObject(K));let Z={};Z=Object.assign(Z,C.params),X&&Object.keys(X).length>0&&(Z=Object.assign(Z,X)),C.data&&Object.keys(C.data).length>0&&(Z=Object.assign(Z,C.data));let Q="";Array.isArray(Z)||this.isArrayLike(Z)||!Z||Object.keys(Z).length===0?Q=encryptByMd5("noParams"):Q=this.signParams(Z),C.headers.xSign=Q}return C}urlParamsToObject(C){for(var H={},U=C.slice(C.indexOf("?")+1).split("&"),K=0;K<U.length;K++){var X=U[K].split("="),Z=decodeURIComponent(X[0]),Q=decodeURIComponent(X[1]||"");Z!==""&&(H.hasOwnProperty(Z)?Array.isArray(H[Z])?H[Z].push(Q):H[Z]=[H[Z],Q]:H[Z]=Q)}return H}handleErrorData(C){var U;C.code=="ECONNABORTED"&&this.source.cancel("连接超时!");let H=C=="noURL"?"请检查请求URL是否填写":this.checkStatus((U=C.response)==null?void 0:U.status);api$1.error({message:"axios提示",description:H,duration:3})}checkStatus(C,H){let U="";switch(C){case 400:U="请求错误(400),请重新申请";break;case 401:{U="未授权,请重新登陆";break}case 424:{this.source.cancel("认证已过期!");break}case 500:{U="服务器错误(500)";break}case 402:return U;default:U="网络连接出错"}return H&&(C==401||C==424)&&api$1.error({message:"axios提示",description:U,duration:3}),U}goLogin(){}request(C,H){let U=cloneDeep(C);const{requestOptions:K}=this.options;return U.requestOptions=H,new Promise((X,Z)=>{this.axiosInstance.request(U).then(Q=>{try{const{data:ee}=Q;ee.data==null?X(ee):X(ee.data);return}catch(ee){Z(ee)}}).catch(Q=>{Z(Q)})})}get(C,H){return this.request({...C,method:RequestEnum.GET},H)}post(C,H){return this.request({...C,method:RequestEnum.POST},H)}}function createAxios(){return new RequestHttp({timeout:10*1e3,headers:{"Content-Type":ContentTypeEnum.JSON}})}let currentHttp=createAxios();function setDefHttp(W){W&&(currentHttp=W)}const defHttp=new Proxy({},{get(W,C){const H=currentHttp[C];return typeof H=="function"?H.bind(currentHttp):H}}),getDictItemsByCode=W=>{let U=useUserStore().getAllDicts.find(K=>K.value==W);return U?U.children:[]},getTreeDictItemsByCode=W=>{let U=useUserStore().getAllCategory.find(K=>K.value==W);return U?U.children:[]};function formatMultipleSelectValue(W){if(typeof W=="string")return W?W.includes(",")?W.split(","):[W]:void 0}function formatMultipleTreeSelectValue(W,C,H,U){if(typeof W=="string"){H=H||",";let K=[];C?K=getTreeDictItemsByCode(C):U&&(K=U||[]);let X=W?W.includes(H)?W.split(H):[W]:void 0;if(X)return X.map(Z=>{var Q;return{label:(Q=findNode(K,Z))==null?void 0:Q.label,value:Z}})}}function formatMultipleCascaderValue(W,C,H){if(!W)return;let U=[];C?U=getTreeDictItemsByCode(C):H&&(U=H||[]);let K=[];if(Array.isArray(W))K=W;else if(typeof W=="string")try{const Z=JSON.parse(W);Array.isArray(Z)&&(K=Z)}catch{console.warn("Cascader value JSON parse failed:",W);return}const X=Z=>{let Q=U;for(const ee of Z){const te=Q==null?void 0:Q.find(ne=>ne.value==ee);if(!te)return!1;Q=te.children}return!0};return K.filter(Z=>Array.isArray(Z)&&X(Z))}const getValidateRuleByCode=W=>{let U=useUserStore().getValidateRuleList.find(K=>K.ruleCode==W);return U||null},getApiRuleByCode=W=>{let U=useUserStore().getApiRuleList.find(K=>K.ruleCode==W);return U||null};function findNode(W,C,H="value"){for(let U=0;U<W.length;U++){let K=W[U];if(K[H]===C)return K;if(K.children&&K.children.length>0){let X=findNode(K.children,C,H);if(X)return X}}return null}const getCasDictItemsByCode=W=>{let C=casDicts.find(H=>H.value==W);return C?C.children:[]};function getDateType(W,C){let H="YYYY-MM-DD";switch(W){case"year":H="YYYY";break;case"month":H="YYYY-MM";break;case"dateTime":H="YYYY-MM-DD HH:mm:ss";break;case"date":default:C=="rangepicker"&&(H="YYYY-MM-DD HH:mm:ss");break}return H}function useVNodes(){return vue.defineComponent({props:{vnodes:{type:Object,required:!0}},render(){return this.vnodes}})}function isJsonData(W){if(typeof W=="object"&&W!==null)return!0;if(typeof W=="string")try{var C=JSON.parse(W);return!!(C&&typeof C=="object")}catch{return!1}else return!1}function setContentListToLowerCase(W){return W.map(C=>(C.type=="collapse"?C.content=setContentListToLowerCase(C.content):C.type=="grid"?C.columns=setContentListToLowerCase(C.columns):C.type=="col"?C.list=setContentListToLowerCase(C.list):C.type=="tabs"?C.panes=C.panes.map(H=>(H.content=setContentListToLowerCase(H.content),H)):C.type=="table"&&(C.tableColumns=dealTableColumn(C.options.showAction,C.tableColumns),C.tableColumns=C.tableColumns.map(H=>(H.dataIndex=H.dataIndex.toLowerCase(),H)),C.action=dealTableAction(C.isedit,C.action)),C.model&&(C.type=="table"?C.model=C.model:C.model=getLowerCaseStr(C.model)),C.writeField&&(C.writeField=C.writeField.map(H=>getLowerCaseStr(H))),C))}function setRandomKeyToContentList(W){return W.map(C=>(C.id=guid$1(),C.key=guid$1(),C.type=="collapse"?C.content=setRandomKeyToContentList(C.content):C.type=="grid"?C.columns=setRandomKeyToContentList(C.columns):C.type=="col"?C.list=setRandomKeyToContentList(C.list):C.type=="tabs"?C.panes=C.panes.map(H=>(H.content=setRandomKeyToContentList(H.content),H)):C.type=="table"?C.tableColumns=C.tableColumns.map(H=>(H.dataIndex!="action"&&(H.id="column-"+guid$1(),H.key="column-"+guid$1()),H)):C.type=="paragraph"&&(C.content=setRandomKeyToContentList(C.content)),C))}function findTargetItemById(W,C){for(const H of W){if(H.id===C)return H;if(H.type==="collapse"&&Array.isArray(H.content)){const U=findTargetItemById(H.content,C);if(U)return U}else if(H.type==="grid"&&Array.isArray(H.columns)){const U=findTargetItemById(H.columns,C);if(U)return U}else if(H.type==="col"&&Array.isArray(H.list)){const U=findTargetItemById(H.list,C);if(U)return U}else if(H.type==="tabs"&&Array.isArray(H.panes))for(const U of H.panes){const K=findTargetItemById(U.content,C);if(K)return K}else if(H.type==="table"&&Array.isArray(H.tableColumns)){const U=H.tableColumns.find(K=>K.id===C);if(U)return U}else if(H.type==="paragraph"&&Array.isArray(H.content)){const U=findTargetItemById(H.content,C);if(U)return U}}return null}function dealTableColumn(W,C){let H=JSON.parse(JSON.stringify(C)),U=H.find(K=>K.key=="action");return H=H.filter(K=>K.key!=="action"),H=H.map(K=>{var X;return(X=K.options)!=null&&X.hidden?K.fixed="right":delete K.fixed,K}),W&&H.push(U||{id:"action",key:"action",title:"操作",dataIndex:"action",width:"auto",fixed:"right",align:"left",options:{hidden:!1}}),H}function dealTableAction(W,C){let H=JSON.parse(JSON.stringify(C||[]));if(H=H.map(U=>(!U.isedit&&U.title.includes("删除")&&(U.confirm=!0),U)),W&&!C.find(U=>U.isedit)){let U=[{title:"保存",oper:"saveRow",isedit:!0},{title:"取消",oper:"cancelRow",isedit:!0},{title:"编辑",oper:"editRow",isedit:!0}],K=[{title:"删除",oper:"delRow",isedit:!0}];H=[...U,...C,...K]}return H}function getLowerCaseStr(W){if(W.includes("$"))return W;if(W.includes(".")){let C=W.split("."),H=[];for(let U=0;U<C.length;U++)U!==0?H.push(C[U].toLowerCase()):H.push(C[U]);W=H.join(".")}else W=W.toLowerCase();return W}function getLabelByDictCode(W,C){var H;return((H=getDictItemsByCode(W).filter(U=>U.dictCode==C)[0])==null?void 0:H.dictName)||""}function getLabelByTreeDictCode(W,C){let H=findNode(getTreeDictItemsByCode(W),C);return(H==null?void 0:H.dictName)||(H==null?void 0:H.label)||""}async function validateRules(rulesArr,value,record){let msg="",rules=[...rulesArr],findRequired=rules.find(W=>W.required);if(findRequired&&validateRequired(value))return msg=findRequired.message,msg;let flag=!!value,findValidator=rules.find(W=>W.validator);if(findValidator&&(flag=!0),flag)for(let i=0;i<rules.length;i++){let validateCode=rules[i].validateCode;if(validateCode){let findRule=getValidateRuleByCode(validateCode);findRule&&(rules[i].pattern=new RegExp(eval(findRule.content)),rules[i].message=findRule.message)}let pattern=rules[i].pattern;if(pattern&&!pattern.test(value)){msg=rules[i].message;break}if(rules[i].apiCode){let findRule=getApiRuleByCode(rules[i].apiCode);if(findRule){let fn=eval(`async (value, record) => {
|
|
486
|
+
`]:{opacity:1},[U]:{color:W.colorTextDescription,transition:`all ${W.motionDurationSlow}`},[`&:hover ${U}`]:{color:W.colorText}},[`${C}-icon ${U}`]:{color:W.colorTextDescription,fontSize:K},[`${Z}-progress`]:{position:"absolute",bottom:-W.uploadProgressOffset,width:"100%",paddingInlineStart:K+W.paddingXS,fontSize:K,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Z}:hover ${ee}`]:{opacity:1,color:W.colorText},[`${Z}-error`]:{color:W.colorError,[`${Z}-name, ${C}-icon ${U}`]:{color:W.colorError},[Q]:{[`${U}, ${U}:hover`]:{color:W.colorError},[ee]:{opacity:1}}},[`${C}-list-item-container`]:{transition:`opacity ${W.motionDurationSlow}, height ${W.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},uploadAnimateInlineIn=new Keyframe("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),uploadAnimateInlineOut=new Keyframe("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),genMotionStyle=W=>{const{componentCls:C}=W,H=`${C}-animate-inline`;return[{[`${C}-wrapper`]:{[`${H}-appear, ${H}-enter, ${H}-leave`]:{animationDuration:W.motionDurationSlow,animationTimingFunction:W.motionEaseInOutCirc,animationFillMode:"forwards"},[`${H}-appear, ${H}-enter`]:{animationName:uploadAnimateInlineIn},[`${H}-leave`]:{animationName:uploadAnimateInlineOut}}},uploadAnimateInlineIn,uploadAnimateInlineOut]},genPictureStyle=W=>{const{componentCls:C,iconCls:H,uploadThumbnailSize:U,uploadProgressOffset:K}=W,X=`${C}-list`,Z=`${X}-item`;return{[`${C}-wrapper`]:{[`${X}${X}-picture, ${X}${X}-picture-card`]:{[Z]:{position:"relative",height:U+W.lineWidth*2+W.paddingXS*2,padding:W.paddingXS,border:`${W.lineWidth}px ${W.lineType} ${W.colorBorder}`,borderRadius:W.borderRadiusLG,"&:hover":{background:"transparent"},[`${Z}-thumbnail`]:_extends$1(_extends$1({},textEllipsis),{width:U,height:U,lineHeight:`${U+W.paddingSM}px`,textAlign:"center",flex:"none",[H]:{fontSize:W.fontSizeHeading2,color:W.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Z}-progress`]:{bottom:K,width:`calc(100% - ${W.paddingSM*2}px)`,marginTop:0,paddingInlineStart:U+W.paddingXS}},[`${Z}-error`]:{borderColor:W.colorError,[`${Z}-thumbnail ${H}`]:{"svg path[fill='#e6f7ff']":{fill:W.colorErrorBg},"svg path[fill='#1890ff']":{fill:W.colorError}}},[`${Z}-uploading`]:{borderStyle:"dashed",[`${Z}-name`]:{marginBottom:K}}}}}},genPictureCardStyle=W=>{const{componentCls:C,iconCls:H,fontSizeLG:U,colorTextLightSolid:K}=W,X=`${C}-list`,Z=`${X}-item`,Q=W.uploadPicCardSize;return{[`${C}-wrapper${C}-picture-card-wrapper`]:_extends$1(_extends$1({},clearFix()),{display:"inline-block",width:"100%",[`${C}${C}-select`]:{width:Q,height:Q,marginInlineEnd:W.marginXS,marginBottom:W.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:W.colorFillAlter,border:`${W.lineWidth}px dashed ${W.colorBorder}`,borderRadius:W.borderRadiusLG,cursor:"pointer",transition:`border-color ${W.motionDurationSlow}`,[`> ${C}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${C}-disabled):hover`]:{borderColor:W.colorPrimary}},[`${X}${X}-picture-card`]:{[`${X}-item-container`]:{display:"inline-block",width:Q,height:Q,marginBlock:`0 ${W.marginXS}px`,marginInline:`0 ${W.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[Z]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${W.paddingXS*2}px)`,height:`calc(100% - ${W.paddingXS*2}px)`,backgroundColor:W.colorBgMask,opacity:0,transition:`all ${W.motionDurationSlow}`,content:'" "'}},[`${Z}:hover`]:{[`&::before, ${Z}-actions`]:{opacity:1}},[`${Z}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${W.motionDurationSlow}`,[`${H}-eye, ${H}-download, ${H}-delete`]:{zIndex:10,width:U,margin:`0 ${W.marginXXS}px`,fontSize:U,cursor:"pointer",transition:`all ${W.motionDurationSlow}`}},[`${Z}-actions, ${Z}-actions:hover`]:{[`${H}-eye, ${H}-download, ${H}-delete`]:{color:new TinyColor(K).setAlpha(.65).toRgbString(),"&:hover":{color:K}}},[`${Z}-thumbnail, ${Z}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Z}-name`]:{display:"none",textAlign:"center"},[`${Z}-file + ${Z}-name`]:{position:"absolute",bottom:W.margin,display:"block",width:`calc(100% - ${W.paddingXS*2}px)`},[`${Z}-uploading`]:{[`&${Z}`]:{backgroundColor:W.colorFillAlter},[`&::before, ${H}-eye, ${H}-download, ${H}-delete`]:{display:"none"}},[`${Z}-progress`]:{bottom:W.marginXL,width:`calc(100% - ${W.paddingXS*2}px)`,paddingInlineStart:0}}})}},genRtlStyle=W=>{const{componentCls:C}=W;return{[`${C}-rtl`]:{direction:"rtl"}}},genBaseStyle=W=>{const{componentCls:C,colorTextDisabled:H}=W;return{[`${C}-wrapper`]:_extends$1(_extends$1({},resetComponent(W)),{[C]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${C}-select`]:{display:"inline-block"},[`${C}-disabled`]:{color:H,cursor:"not-allowed"}})}},useStyle$1=genComponentStyleHook("Upload",W=>{const{fontSizeHeading3:C,fontSize:H,lineHeight:U,lineWidth:K,controlHeightLG:X}=W,Z=Math.round(H*U),Q=merge$1(W,{uploadThumbnailSize:C*2,uploadProgressOffset:Z/2+K,uploadPicCardSize:X*2.55});return[genBaseStyle(Q),genDraggerStyle(Q),genPictureStyle(Q),genPictureCardStyle(Q),genListStyle(Q),genMotionStyle(Q),genRtlStyle(Q),genCollapseMotion(Q)]});var __awaiter$1=function(W,C,H,U){function K(X){return X instanceof H?X:new H(function(Z){Z(X)})}return new(H||(H=Promise))(function(X,Z){function Q(ne){try{te(U.next(ne))}catch(ie){Z(ie)}}function ee(ne){try{te(U.throw(ne))}catch(ie){Z(ie)}}function te(ne){ne.done?X(ne.value):K(ne.value).then(Q,ee)}te((U=U.apply(W,C||[])).next())})},__rest$3=function(W,C){var H={};for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&C.indexOf(U)<0&&(H[U]=W[U]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(W);K<U.length;K++)C.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(W,U[K])&&(H[U[K]]=W[U[K]]);return H};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,Upload$1=vue.defineComponent({compatConfig:{MODE:3},name:"AUpload",inheritAttrs:!1,props:initDefaultProps(uploadProps(),{type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",supportServerRender:!0}),setup(W,C){let{slots:H,attrs:U,expose:K}=C;const X=useInjectFormItemContext(),{prefixCls:Z,direction:Q,disabled:ee}=useConfigInject("upload",W),[te,ne]=useStyle$1(Z),ie=useInjectDisabled(),re=vue.computed(()=>{var xe;return(xe=ee.value)!==null&&xe!==void 0?xe:ie.value}),[oe,ae]=useMergedState(W.defaultFileList||[],{value:vue.toRef(W,"fileList"),postState:xe=>{const we=Date.now();return(xe??[]).map((Te,Le)=>(!Te.uid&&!Object.isFrozen(Te)&&(Te.uid=`__AUTO__${we}_${Le}__`),Te))}}),se=vue.ref("drop"),le=vue.ref(null);vue.onMounted(()=>{devWarning(W.fileList!==void 0||U.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),devWarning(W.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),devWarning(W.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const ce=(xe,we,Te)=>{var Le,Ae;let Ne=[...we];W.maxCount===1?Ne=Ne.slice(-1):W.maxCount&&(Ne=Ne.slice(0,W.maxCount)),ae(Ne);const Pe={file:xe,fileList:Ne};Te&&(Pe.event=Te),(Le=W["onUpdate:fileList"])===null||Le===void 0||Le.call(W,Pe.fileList),(Ae=W.onChange)===null||Ae===void 0||Ae.call(W,Pe),X.onFieldChange()},ue=(xe,we)=>__awaiter$1(this,void 0,void 0,function*(){const{beforeUpload:Te,transformFile:Le}=W;let Ae=xe;if(Te){const Ne=yield Te(xe,we);if(Ne===!1)return!1;if(delete xe[LIST_IGNORE],Ne===LIST_IGNORE)return Object.defineProperty(xe,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof Ne=="object"&&Ne&&(Ae=Ne)}return Le&&(Ae=yield Le(Ae)),Ae}),de=xe=>{const we=xe.filter(Ae=>!Ae.file[LIST_IGNORE]);if(!we.length)return;const Te=we.map(Ae=>file2Obj(Ae.file));let Le=[...oe.value];Te.forEach(Ae=>{Le=updateFileList(Ae,Le)}),Te.forEach((Ae,Ne)=>{let Pe=Ae;if(we[Ne].parsedFile)Ae.status="uploading";else{const{originFileObj:Oe}=Ae;let Me;try{Me=new File([Oe],Oe.name,{type:Oe.type})}catch{Me=new Blob([Oe],{type:Oe.type}),Me.name=Oe.name,Me.lastModifiedDate=new Date,Me.lastModified=new Date().getTime()}Me.uid=Ae.uid,Pe=Me}ce(Pe,Le)})},fe=(xe,we,Te)=>{try{typeof xe=="string"&&(xe=JSON.parse(xe))}catch{}if(!getFileItem(we,oe.value))return;const Le=file2Obj(we);Le.status="done",Le.percent=100,Le.response=xe,Le.xhr=Te;const Ae=updateFileList(Le,oe.value);ce(Le,Ae)},pe=(xe,we)=>{if(!getFileItem(we,oe.value))return;const Te=file2Obj(we);Te.status="uploading",Te.percent=xe.percent;const Le=updateFileList(Te,oe.value);ce(Te,Le,xe)},ge=(xe,we,Te)=>{if(!getFileItem(Te,oe.value))return;const Le=file2Obj(Te);Le.error=xe,Le.response=we,Le.status="error";const Ae=updateFileList(Le,oe.value);ce(Le,Ae)},me=xe=>{let we;const Te=W.onRemove||W.remove;Promise.resolve(typeof Te=="function"?Te(xe):Te).then(Le=>{var Ae,Ne;if(Le===!1)return;const Pe=removeFileItem(xe,oe.value);Pe&&(we=_extends$1(_extends$1({},xe),{status:"removed"}),(Ae=oe.value)===null||Ae===void 0||Ae.forEach(Oe=>{const Me=we.uid!==void 0?"uid":"name";Oe[Me]===we[Me]&&!Object.isFrozen(Oe)&&(Oe.status="removed")}),(Ne=le.value)===null||Ne===void 0||Ne.abort(we),ce(we,Pe))})},ye=xe=>{var we;se.value=xe.type,xe.type==="drop"&&((we=W.onDrop)===null||we===void 0||we.call(W,xe))};K({onBatchStart:de,onSuccess:fe,onProgress:pe,onError:ge,fileList:oe,upload:le});const[_e]=useLocaleReceiver("Upload",localeValues$1.Upload,vue.computed(()=>W.locale)),Ce=(xe,we)=>{const{removeIcon:Te,previewIcon:Le,downloadIcon:Ae,previewFile:Ne,onPreview:Pe,onDownload:Oe,isImageUrl:Me,progress:Be,itemRender:Re,iconRender:He,showUploadList:Ue}=W,{showDownloadIcon:Ke,showPreviewIcon:Ge,showRemoveIcon:Ze}=typeof Ue=="boolean"?{}:Ue;return Ue?vue.createVNode(UploadList,{prefixCls:Z.value,listType:W.listType,items:oe.value,previewFile:Ne,onPreview:Pe,onDownload:Oe,onRemove:me,showRemoveIcon:!re.value&&Ze,showPreviewIcon:Ge,showDownloadIcon:Ke,removeIcon:Te,previewIcon:Le,downloadIcon:Ae,iconRender:He,locale:_e.value,isImageUrl:Me,progress:Be,itemRender:Re,appendActionVisible:we,appendAction:xe},_extends$1({},H)):xe==null?void 0:xe()};return()=>{var xe,we,Te;const{listType:Le,type:Ae}=W,{class:Ne,style:Pe}=U,Oe=__rest$3(U,["class","style"]),Me=_extends$1(_extends$1(_extends$1({onBatchStart:de,onError:ge,onProgress:pe,onSuccess:fe},Oe),W),{id:(xe=W.id)!==null&&xe!==void 0?xe:X.id.value,prefixCls:Z.value,beforeUpload:ue,onChange:void 0,disabled:re.value});delete Me.remove,(!H.default||re.value)&&delete Me.id;const Be={[`${Z.value}-rtl`]:Q.value==="rtl"};if(Ae==="drag"){const Ke=classNames(Z.value,{[`${Z.value}-drag`]:!0,[`${Z.value}-drag-uploading`]:oe.value.some(Ge=>Ge.status==="uploading"),[`${Z.value}-drag-hover`]:se.value==="dragover",[`${Z.value}-disabled`]:re.value,[`${Z.value}-rtl`]:Q.value==="rtl"},U.class,ne.value);return te(vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},U),{},{class:classNames(`${Z.value}-wrapper`,Be,Ne,ne.value)}),[vue.createVNode("div",{class:Ke,onDrop:ye,onDragover:ye,onDragleave:ye,style:U.style},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Me),{},{ref:le,class:`${Z.value}-btn`}),_objectSpread2$1({default:()=>[vue.createVNode("div",{class:`${Z.value}-drag-container`},[(we=H.default)===null||we===void 0?void 0:we.call(H)])]},H))]),Ce()]))}const Re=classNames(Z.value,{[`${Z.value}-select`]:!0,[`${Z.value}-select-${Le}`]:!0,[`${Z.value}-disabled`]:re.value,[`${Z.value}-rtl`]:Q.value==="rtl"}),He=flattenChildren((Te=H.default)===null||Te===void 0?void 0:Te.call(H)),Ue=Ke=>vue.createVNode("div",{class:Re,style:Ke},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Me),{},{ref:le}),H)]);return te(Le==="picture-card"?vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},U),{},{class:classNames(`${Z.value}-wrapper`,`${Z.value}-picture-card-wrapper`,Be,U.class,ne.value)}),[Ce(Ue,!!(He&&He.length))]):vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},U),{},{class:classNames(`${Z.value}-wrapper`,Be,U.class,ne.value)}),[Ue(He&&He.length?void 0:{display:"none"}),Ce()]))}}});var __rest$2=function(W,C){var H={};for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&C.indexOf(U)<0&&(H[U]=W[U]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(W);K<U.length;K++)C.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(W,U[K])&&(H[U[K]]=W[U[K]]);return H};const Dragger=vue.defineComponent({compatConfig:{MODE:3},name:"AUploadDragger",inheritAttrs:!1,props:uploadProps(),setup(W,C){let{slots:H,attrs:U}=C;return()=>{const{height:K}=W,X=__rest$2(W,["height"]),{style:Z}=U,Q=__rest$2(U,["style"]),ee=_extends$1(_extends$1(_extends$1({},X),Q),{type:"drag",style:_extends$1(_extends$1({},Z),{height:typeof K=="number"?`${K}px`:K})});return vue.createVNode(Upload$1,ee,H)}}}),Upload=_extends$1(Upload$1,{Dragger,LIST_IGNORE,install(W){return W.component(Upload$1.name,Upload$1),W.component(Dragger.name,Dragger),W}}),flexWrapValues=["wrap","nowrap","wrap-reverse"],justifyContentValues=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],alignItemsValues=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],genClsWrap=(W,C)=>{const H={};return flexWrapValues.forEach(U=>{H[`${W}-wrap-${U}`]=C.wrap===U}),H},genClsAlign=(W,C)=>{const H={};return alignItemsValues.forEach(U=>{H[`${W}-align-${U}`]=C.align===U}),H[`${W}-align-stretch`]=!C.align&&!!C.vertical,H},genClsJustify=(W,C)=>{const H={};return justifyContentValues.forEach(U=>{H[`${W}-justify-${U}`]=C.justify===U}),H};function createFlexClassNames(W,C){return classNames(_extends$1(_extends$1(_extends$1({},genClsWrap(W,C)),genClsAlign(W,C)),genClsJustify(W,C)))}const genFlexStyle=W=>{const{componentCls:C}=W;return{[C]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},genFlexGapStyle=W=>{const{componentCls:C}=W;return{[C]:{"&-gap-small":{gap:W.flexGapSM},"&-gap-middle":{gap:W.flexGap},"&-gap-large":{gap:W.flexGapLG}}}},genFlexWrapStyle=W=>{const{componentCls:C}=W,H={};return flexWrapValues.forEach(U=>{H[`${C}-wrap-${U}`]={flexWrap:U}}),H},genAlignItemsStyle=W=>{const{componentCls:C}=W,H={};return alignItemsValues.forEach(U=>{H[`${C}-align-${U}`]={alignItems:U}}),H},genJustifyContentStyle=W=>{const{componentCls:C}=W,H={};return justifyContentValues.forEach(U=>{H[`${C}-justify-${U}`]={justifyContent:U}}),H},useStyle=genComponentStyleHook("Flex",W=>{const C=merge$1(W,{flexGapSM:W.paddingXS,flexGap:W.padding,flexGapLG:W.paddingLG});return[genFlexStyle(C),genFlexGapStyle(C),genFlexWrapStyle(C),genAlignItemsStyle(C),genJustifyContentStyle(C)]});function isPresetSize(W){return["small","middle","large"].includes(W)}const flexProps=()=>({prefixCls:stringType(),vertical:booleanType(),wrap:stringType(),justify:stringType(),align:stringType(),flex:someType([Number,String]),gap:someType([Number,String]),component:anyType()});var __rest$1=function(W,C){var H={};for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&C.indexOf(U)<0&&(H[U]=W[U]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(W);K<U.length;K++)C.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(W,U[K])&&(H[U[K]]=W[U[K]]);return H};const AFlex=vue.defineComponent({name:"AFlex",inheritAttrs:!1,props:flexProps(),setup(W,C){let{slots:H,attrs:U}=C;const{flex:K,direction:X}=useConfigContextInject(),{prefixCls:Z}=useConfigInject("flex",W),[Q,ee]=useStyle(Z),te=vue.computed(()=>{var ne;return[Z.value,ee.value,createFlexClassNames(Z.value,W),{[`${Z.value}-rtl`]:X.value==="rtl",[`${Z.value}-gap-${W.gap}`]:isPresetSize(W.gap),[`${Z.value}-vertical`]:(ne=W.vertical)!==null&&ne!==void 0?ne:K==null?void 0:K.value.vertical}]});return()=>{var ne;const{flex:ie,gap:re,component:oe="div"}=W,ae=__rest$1(W,["flex","gap","component"]),se={};return ie&&(se.flex=ie),re&&!isPresetSize(re)&&(se.gap=`${re}px`),Q(vue.createVNode(oe,_objectSpread2$1({class:[U.class,te.value],style:[U.style,se]},omit$1(ae,["justify","wrap","align","vertical"])),{default:()=>[(ne=H.default)===null||ne===void 0?void 0:ne.call(H)]}))}}}),Flex=withInstall(AFlex);class RequestHttp{constructor(C){Hi(this,"axiosInstance");Hi(this,"options");Hi(this,"source");this.options=C,this.axiosInstance=axios.create(C),this.setupInterceptors();const H=axios.CancelToken;this.source=H.source()}createAxios(C){this.axiosInstance=axios.create(C)}setupInterceptors(){this.axiosInstance.interceptors.request.use(C=>(C=this.beforeRequest(C),this.requestInterceptors(C)),C=>Promise.reject(C)),this.axiosInstance.interceptors.response.use(C=>{var H;if(C.status==200){const U=(H=C.data)==null?void 0:H.code;return U===401||U===424?this.handleTokenExpired(C):(this.checkStatus(U,!0),Promise.resolve(C))}else return this.handleErrorData(C.data),Promise.reject(C)},C=>{var U;const H=(U=C==null?void 0:C.response)==null?void 0:U.status;return H===401||H===424?this.handleTokenExpired(C.response):(this.handleErrorData(C),Promise.reject(C))})}async handleTokenExpired(C){const H=C==null?void 0:C.config,U="__fi_isRetryRequest__";if(!H||H[U])return this.checkStatus(401,!0),Promise.reject(C);const K=typeof window<"u"?window.__bdcRefreshToken__:void 0;if(typeof K!="function")return this.checkStatus(401,!0),Promise.reject(C);const X=await K();return X?(useUserStoreWithOut().setToken(X),H[U]=!0,H.headers&&(H.headers.Authorization=X),this.axiosInstance.request(H)):(this.checkStatus(401,!0),Promise.reject(C))}beforeRequest(C){var K;const H=C.params||{},U=C.data||!1;return((K=C.method)==null?void 0:K.toUpperCase())==RequestEnum.GET?isString$5(H)&&(C.url=C.url+H,C.params=void 0):isString$5(H)?(C.data=H,C.params=void 0):C.data?C.data=U:C.data=H,C}sortAscii(C){let H=new Array,U=0;for(let Z in C)C[Z]==null&&C[Z]!=null||(H[U]=Z,U++);H=Array.from(new Set(H));let K=H.sort(),X="";for(let Z in K)X+=K[Z];return X}signParams(C){let H=this.sortAscii(C);return encryptByMd5(H)}isArrayLike(C){for(let H in C)if(H=="0")return!0;return!1}requestInterceptors(C){var H,U;if((H=C.requestOptions)!=null&&H.withToken){const K=getTokenKey(),X=K&&typeof K=="string"?K:useUserStoreWithOut().getToken;C&&C.headers&&(C.headers.Authorization||(C.headers.Authorization=X))}if(((U=C.requestOptions)==null?void 0:U.withTimeout)!==void 0&&(C.requestOptions.withTimeout||(C.timeout=0)),C&&C.headers&&C.requestOptions){C.requestOptions.xAuthToken!=null&&Reflect.set(C.headers,"x-auth-token",C.requestOptions.xAuthToken);let K=C.url,X={};K&&K.indexOf("?")>-1&&(X=this.urlParamsToObject(K));let Z={};Z=Object.assign(Z,C.params),X&&Object.keys(X).length>0&&(Z=Object.assign(Z,X)),C.data&&Object.keys(C.data).length>0&&(Z=Object.assign(Z,C.data));let Q="";Array.isArray(Z)||this.isArrayLike(Z)||!Z||Object.keys(Z).length===0?Q=encryptByMd5("noParams"):Q=this.signParams(Z),C.headers.xSign=Q}return C}urlParamsToObject(C){for(var H={},U=C.slice(C.indexOf("?")+1).split("&"),K=0;K<U.length;K++){var X=U[K].split("="),Z=decodeURIComponent(X[0]),Q=decodeURIComponent(X[1]||"");Z!==""&&(H.hasOwnProperty(Z)?Array.isArray(H[Z])?H[Z].push(Q):H[Z]=[H[Z],Q]:H[Z]=Q)}return H}handleErrorData(C){var U;C.code=="ECONNABORTED"&&this.source.cancel("连接超时!");let H=C=="noURL"?"请检查请求URL是否填写":this.checkStatus((U=C.response)==null?void 0:U.status);api$1.error({message:"axios提示",description:H,duration:3})}checkStatus(C,H){let U="";switch(C){case 400:U="请求错误(400),请重新申请";break;case 401:{U="未授权,请重新登陆";break}case 424:{this.source.cancel("认证已过期!");break}case 500:{U="服务器错误(500)";break}case 402:return U;default:U="网络连接出错"}return H&&(C==401||C==424)&&api$1.error({message:"axios提示",description:U,duration:3}),U}goLogin(){}request(C,H){let U=cloneDeep(C);const{requestOptions:K}=this.options;return U.requestOptions=H,new Promise((X,Z)=>{this.axiosInstance.request(U).then(Q=>{try{const{data:ee}=Q;ee.data==null?X(ee):X(ee.data);return}catch(ee){Z(ee)}}).catch(Q=>{Z(Q)})})}get(C,H){return this.request({...C,method:RequestEnum.GET},H)}post(C,H){return this.request({...C,method:RequestEnum.POST},H)}}function createAxios(){return new RequestHttp({timeout:10*1e3,headers:{"Content-Type":ContentTypeEnum.JSON}})}let currentHttp=createAxios();function setDefHttp(W){W&&(currentHttp=W)}const defHttp=new Proxy({},{get(W,C){const H=currentHttp[C];return typeof H=="function"?H.bind(currentHttp):H}}),getDictItemsByCode=W=>{let U=useUserStore().getAllDicts.find(K=>K.value==W);return U?U.children:[]},getTreeDictItemsByCode=W=>{let U=useUserStore().getAllCategory.find(K=>K.value==W);return U?U.children:[]};function formatMultipleSelectValue(W){if(typeof W=="string")return W?W.includes(",")?W.split(","):[W]:void 0}function formatMultipleTreeSelectValue(W,C,H,U){if(typeof W=="string"){H=H||",";let K=[];C?K=getTreeDictItemsByCode(C):U&&(K=U||[]);let X=W?W.includes(H)?W.split(H):[W]:void 0;if(X)return X.map(Z=>{var Q;return{label:(Q=findNode(K,Z))==null?void 0:Q.label,value:Z}})}}function formatMultipleCascaderValue(W,C,H){if(!W)return;let U=[];C?U=getTreeDictItemsByCode(C):H&&(U=H||[]);let K=[];if(Array.isArray(W))K=W;else if(typeof W=="string")try{const Z=JSON.parse(W);Array.isArray(Z)&&(K=Z)}catch{console.warn("Cascader value JSON parse failed:",W);return}const X=Z=>{let Q=U;for(const ee of Z){const te=Q==null?void 0:Q.find(ne=>ne.value==ee);if(!te)return!1;Q=te.children}return!0};return K.filter(Z=>Array.isArray(Z)&&X(Z))}const getValidateRuleByCode=W=>{let U=useUserStore().getValidateRuleList.find(K=>K.ruleCode==W);return U||null},getApiRuleByCode=W=>{let U=useUserStore().getApiRuleList.find(K=>K.ruleCode==W);return U||null};function findNode(W,C,H="value"){for(let U=0;U<W.length;U++){let K=W[U];if(K[H]===C)return K;if(K.children&&K.children.length>0){let X=findNode(K.children,C,H);if(X)return X}}return null}const getCasDictItemsByCode=W=>{let C=casDicts.find(H=>H.value==W);return C?C.children:[]};function getDateType(W,C){let H="YYYY-MM-DD";switch(W){case"year":H="YYYY";break;case"month":H="YYYY-MM";break;case"dateTime":H="YYYY-MM-DD HH:mm:ss";break;case"date":default:C=="rangepicker"&&(H="YYYY-MM-DD HH:mm:ss");break}return H}function useVNodes(){return vue.defineComponent({props:{vnodes:{type:Object,required:!0}},render(){return this.vnodes}})}function isJsonData(W){if(typeof W=="object"&&W!==null)return!0;if(typeof W=="string")try{var C=JSON.parse(W);return!!(C&&typeof C=="object")}catch{return!1}else return!1}function setContentListToLowerCase(W){return W.map(C=>(C.type=="collapse"?C.content=setContentListToLowerCase(C.content):C.type=="grid"?C.columns=setContentListToLowerCase(C.columns):C.type=="col"?C.list=setContentListToLowerCase(C.list):C.type=="tabs"?C.panes=C.panes.map(H=>(H.content=setContentListToLowerCase(H.content),H)):C.type=="table"&&(C.tableColumns=dealTableColumn(C.options.showAction,C.tableColumns),C.tableColumns=C.tableColumns.map(H=>(H.dataIndex=H.dataIndex.toLowerCase(),H)),C.action=dealTableAction(C.isedit,C.action)),C.model&&(C.type=="table"?C.model=C.model:C.model=getLowerCaseStr(C.model)),C.writeField&&(C.writeField=C.writeField.map(H=>getLowerCaseStr(H))),C))}function setRandomKeyToContentList(W){return W.map(C=>(C.id=guid$1(),C.key=guid$1(),C.type=="collapse"?C.content=setRandomKeyToContentList(C.content):C.type=="grid"?C.columns=setRandomKeyToContentList(C.columns):C.type=="col"?C.list=setRandomKeyToContentList(C.list):C.type=="tabs"?C.panes=C.panes.map(H=>(H.content=setRandomKeyToContentList(H.content),H)):C.type=="table"?C.tableColumns=C.tableColumns.map(H=>(H.dataIndex!="action"&&(H.id="column-"+guid$1(),H.key="column-"+guid$1()),H)):C.type=="paragraph"&&(C.content=setRandomKeyToContentList(C.content)),C))}function findTargetItemById(W,C){for(const H of W){if(H.id===C)return H;if(H.type==="collapse"&&Array.isArray(H.content)){const U=findTargetItemById(H.content,C);if(U)return U}else if(H.type==="grid"&&Array.isArray(H.columns)){const U=findTargetItemById(H.columns,C);if(U)return U}else if(H.type==="col"&&Array.isArray(H.list)){const U=findTargetItemById(H.list,C);if(U)return U}else if(H.type==="tabs"&&Array.isArray(H.panes))for(const U of H.panes){const K=findTargetItemById(U.content,C);if(K)return K}else if(H.type==="table"&&Array.isArray(H.tableColumns)){const U=H.tableColumns.find(K=>K.id===C);if(U)return U}else if(H.type==="paragraph"&&Array.isArray(H.content)){const U=findTargetItemById(H.content,C);if(U)return U}}return null}function dealTableColumn(W,C){let H=JSON.parse(JSON.stringify(C)),U=H.find(K=>K.key=="action");return H=H.filter(K=>K.key!=="action"),H=H.map(K=>{var X;return(X=K.options)!=null&&X.hidden?K.fixed="right":delete K.fixed,K}),W&&H.push(U||{id:"action",key:"action",title:"操作",dataIndex:"action",width:"auto",fixed:"right",align:"left",options:{hidden:!1}}),H}function dealTableAction(W,C){let H=JSON.parse(JSON.stringify(C||[]));if(H=H.map(U=>(!U.isedit&&U.title.includes("删除")&&(U.confirm=!0),U)),W&&!C.find(U=>U.isedit)){let U=[{title:"保存",oper:"saveRow",isedit:!0},{title:"取消",oper:"cancelRow",isedit:!0},{title:"编辑",oper:"editRow",isedit:!0}],K=[{title:"删除",oper:"delRow",isedit:!0}];H=[...U,...C,...K]}return H}function getLowerCaseStr(W){if(W.includes("$"))return W;if(W.includes(".")){let C=W.split("."),H=[];for(let U=0;U<C.length;U++)U!==0?H.push(C[U].toLowerCase()):H.push(C[U]);W=H.join(".")}else W=W.toLowerCase();return W}function getLabelByDictCode(W,C){var H;return((H=getDictItemsByCode(W).filter(U=>U.dictCode==C)[0])==null?void 0:H.dictName)||""}function getLabelByTreeDictCode(W,C){let H=findNode(getTreeDictItemsByCode(W),C);return(H==null?void 0:H.dictName)||(H==null?void 0:H.label)||""}async function validateRules(rulesArr,value,record){let msg="",rules=[...rulesArr],findRequired=rules.find(W=>W.required);if(findRequired&&validateRequired(value))return msg=findRequired.message,msg;let flag=!!value,findValidator=rules.find(W=>W.validator);if(findValidator&&(flag=!0),flag)for(let i=0;i<rules.length;i++){let validateCode=rules[i].validateCode;if(validateCode){let findRule=getValidateRuleByCode(validateCode);findRule&&(rules[i].pattern=new RegExp(eval(findRule.content)),rules[i].message=findRule.message)}let pattern=rules[i].pattern;if(pattern&&!pattern.test(value)){msg=rules[i].message;break}if(rules[i].apiCode){let findRule=getApiRuleByCode(rules[i].apiCode);if(findRule){let fn=eval(`async (value, record) => {
|
|
487
487
|
${findRule.content}
|
|
488
488
|
}`);msg=await fn(value,record);break}}if(rules[i].validator){msg=rules[i].validator(value,record);break}}return msg}async function setInputStatus(W,C){let H=await validateRules(W.rules,C[W.dataIndex],C);H?(C[W.dataIndex+"Status"]="error",C[W.dataIndex+"StatusMsg"]=H):(C[W.dataIndex+"Status"]="",C[W.dataIndex+"StatusMsg"]="")}function getZjzlRuleCode(W){let C;switch(W){case"1":C="idCard";break;case"2":C="HMTIdCard";break;case"3":C="passport";break;case"4":C="householdRegister";break;case"5":C="officerCertificate";break;case"6":C="organizationCode";break;case"7":C="businessLicense";break;case"8":C="socialCode";break;case"9":C="foreignerIdCard";break;case"99":C="otherId";break}return C}function getRowSpan(W,C,H){let U=1;for(let K=C+1;K<W.length&&W[K][H]===W[C][H];K++)U++;return C>0&&W[C-1][H]===W[C][H]?0:U}function compareObjects(W,C){let H={};for(const U in W)W[U]!==C[U]&&(H[U]=C[U]);return H}function loadStyle(W,C){let H=document.createElement("style");H.type="text/css",H.setAttribute("data-tag",C||"");try{H.appendChild(document.createTextNode(W))}catch{H.styleSheet.cssText=W}C&&!document.querySelector(`style[data-tag="${C}"]`)&&document.getElementsByTagName("head")[0].appendChild(H),C||document.getElementsByTagName("head")[0].appendChild(H)}function parseDisabledAttr(W){if(W=W.trim(),W==="disabled")return!0;const C=W.match(/^:disabled\s*=\s*["']?(.*?)["']?$/);if(C){const H=C[1].trim();return H==="true"?!0:H==="false"?!1:H}return!1}function filterSelectableTreeData(W){return W.map(C=>{const H=C.children&&C.children.length>0;return{...C,selectable:!H,checkable:!H,children:H?filterSelectableTreeData(C.children):void 0}})}const _hoisted_1$1z={class:"widget-view-content",style:{"text-align":"left"}},_hoisted_2$H={class:"move"},_hoisted_3$z={key:0,class:"widget-view-drag"},_hoisted_4$u={key:0},_hoisted_5$l={key:0},_hoisted_6$h={key:1,style:{display:"flex","align-items":"center"}},_hoisted_7$c=["src"],_hoisted_8$9={class:"item-model"},_hoisted_9$7={key:18,class:"item-action"},_sfc_main$1s=vue.defineComponent({__name:"FormInput",props:{list:{type:Array,default:[]},data:{type:Object,default:null},index:{type:String},activeIndex:{type:String},PfontSize:{type:String}},setup(W){const C=useFormStore(),{formData:H}=C,U=W;function K(te){if(U.list&&U.list.length>0){let ne=U.list.findIndex(ie=>ie.id==te.id);ne>-1&&U.list.splice(ne,1)}}function X(te){const ne=JSON.parse(JSON.stringify(te));if(U.list&&U.list.length>0){let ie=U.list.findIndex(re=>re.id==te.id);ie>-1&&(ne.id=guid$1(),ne.key=guid$1(),U.list.splice(ie+1,0,ne))}}let Z=vue.computed(()=>Q(U.data));function Q(te){return vue.defineComponent({template:ee(te),components:{InfoCircleOutlined},setup(){return{}}})}function ee(te){if(te){let ne="",ie=`width:${te.width}`,re=te.placeholder==null?"":`placeholder="${te.placeholder}"`,oe=te.tooltip==null||te.tooltip==""?"":`
|
|
489
489
|
<template #suffixIcon>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as c, ref as t, onMounted as s, unref as r, openBlock as u, createBlock as m, createCommentVNode as d } from "vue";
|
|
2
|
+
import { aG as l, F as f } from "./index-O-BlCY8c.js";
|
|
3
|
+
const v = /* @__PURE__ */ c({
|
|
4
|
+
__name: "formTest",
|
|
5
|
+
setup(i) {
|
|
6
|
+
var o;
|
|
7
|
+
const n = l();
|
|
8
|
+
let a = t((o = n.params) == null ? void 0 : o.code.toString()).value.toString(), e = t(!1);
|
|
9
|
+
return s(() => {
|
|
10
|
+
e.value = !0;
|
|
11
|
+
}), (_, g) => r(e) ? (u(), m(f, {
|
|
12
|
+
key: 0,
|
|
13
|
+
id: r(a)
|
|
14
|
+
}, null, 8, ["id"])) : d("", !0);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
v as default
|
|
19
|
+
};
|