dfs-page-config 0.5.52 → 0.5.53
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/dfs-page-config.js
CHANGED
|
@@ -54117,8 +54117,8 @@ const _hoisted_1$l = { style: { border: "1px solid #ccc" } }, _sfc_main$m = /* @
|
|
|
54117
54117
|
// 根据 hideTable 属性决定是否隐藏表格
|
|
54118
54118
|
...tAe.hideUpload ? ["uploadImage", "insertImage", "uploadVideo", "insertVideo", "group-image", "group-video"] : []
|
|
54119
54119
|
],
|
|
54120
|
-
...tAe.toolbarConfig
|
|
54121
|
-
modalAppendToBody:
|
|
54120
|
+
...tAe.toolbarConfig
|
|
54121
|
+
// modalAppendToBody: true
|
|
54122
54122
|
}), AAe = reactive({
|
|
54123
54123
|
placeholder: tAe.placeholder,
|
|
54124
54124
|
readOnly: tAe.readOnly,
|
|
@@ -54202,7 +54202,7 @@ const _hoisted_1$l = { style: { border: "1px solid #ccc" } }, _sfc_main$m = /* @
|
|
|
54202
54202
|
}, null, 8, ["style", "modelValue", "defaultConfig", "mode", "read-only"])
|
|
54203
54203
|
]));
|
|
54204
54204
|
}
|
|
54205
|
-
}),
|
|
54205
|
+
}), WangEditor_vue_vue_type_style_index_0_scoped_21b25462_lang = "", WangEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["__scopeId", "data-v-21b25462"]]), elInputNumber = "", _sfc_main$l = defineComponent({
|
|
54206
54206
|
props: {
|
|
54207
54207
|
option: Object,
|
|
54208
54208
|
formComp: Object,
|
|
@@ -256,7 +256,7 @@ Can not construct a instance`)}return Ff.setEditorConfig=function(kh){kh===void
|
|
|
256
256
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
257
257
|
PERFORMANCE OF THIS SOFTWARE.
|
|
258
258
|
***************************************************************************** */function Jve(Ff){var kh=Ff.menus,x_=Ff.renderElems,tAe=Ff.renderStyle,aAe=Ff.elemsToHtml,fAe=Ff.styleToHtml,hAe=Ff.preParseHtml,vAe=Ff.parseElemsHtml,AAe=Ff.parseStyleHtml,mAe=Ff.editorPlugin;kh&&kh.forEach(function(yAe){return Zve.registerMenu(yAe)}),x_&&x_.forEach(function(yAe){return Zve.registerRenderElem(yAe)}),tAe&&Zve.registerRenderStyle(tAe),aAe&&aAe.forEach(function(yAe){return Zve.registerElemToHtml(yAe)}),fAe&&Zve.registerStyleToHtml(fAe),hAe&&hAe.forEach(function(yAe){return Zve.registerPreParseHtml(yAe)}),vAe&&vAe.forEach(function(yAe){return Zve.registerParseElemHtml(yAe)}),AAe&&Zve.registerParseStyleHtml(AAe),mAe&&Zve.registerPlugin(mAe)}Yq.forEach(function(Ff){return Jve(Ff)}),Jve(g0),Jve(J3),Jve(Doe),Jve(wde),Jve(Gve);var Qve='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',eye={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize"]}},tye={hoverbarKeys:Xve(Xve({},eye),{text:{menuKeys:["headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};Zve.setEditorConfig(Xve(Xve({},tye),{decorate:Yve}));var nye={hoverbarKeys:eye};Zve.setSimpleEditorConfig(Xve(Xve({},nye),{decorate:Yve}));var rye={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:HP("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:HP("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:HP("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:HP("editor.image"),iconSvg:Qve,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:HP("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen"]};Zve.setToolbarConfig(rye);var oye={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:HP("editor.image"),iconSvg:Qve,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function iye(Ff){Ff===void 0&&(Ff={});var kh=Ff.selector,x_=kh===void 0?"":kh,tAe=Ff.content,aAe=tAe===void 0?[]:tAe,fAe=Ff.html,hAe=Ff.config,vAe=hAe===void 0?{}:hAe,AAe=Ff.mode,mAe=(AAe===void 0?"default":AAe)==="simple"?Zve.simpleEditorConfig:Zve.editorConfig,yAe=Xve(Xve({},mAe.hoverbarKeys||{}),vAe.hoverbarKeys||{});return I_({selector:x_,config:Xve(Xve(Xve({},mAe),vAe),{hoverbarKeys:yAe}),content:aAe,html:fAe,plugins:Zve.plugins})}function aye(Ff){var kh=Ff.selector,x_=Ff.editor,tAe=Ff.config,aAe=tAe===void 0?{}:tAe,fAe=Ff.mode,hAe=fAe===void 0?"default":fAe;if(!kh)throw new Error("Cannot find 'selector' when create toolbar");var vAe=hAe==="simple"?Zve.simpleToolbarConfig:Zve.toolbarConfig,AAe=function(mAe,yAe){if(mAe==null)throw new Error("Cannot create toolbar, because editor is null");var bAe=yAe.selector,EAe=yAe.config,SAe=EAe===void 0?{}:EAe;if(function(OAe,TAe){return LF(OAe,"data-w-e-toolbar",TAe)}(mAe,bAe))throw new Error("Repeated create toolbar by selector '"+bAe+"'");var DAe=oA({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},SAe||{}),xAe=new $_(bAe,DAe);return uO.set(xAe,mAe),sO.set(mAe,xAe),xAe}(x_,{selector:kh,config:Xve(Xve({},vAe),aAe)});return AAe}Zve.setSimpleToolbarConfig(oye);var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(Ff,kh,x_)=>kh in Ff?__defProp(Ff,kh,{enumerable:!0,configurable:!0,writable:!0,value:x_}):Ff[kh]=x_,__spreadValues=(Ff,kh)=>{for(var x_ in kh||(kh={}))__hasOwnProp.call(kh,x_)&&__defNormalProp(Ff,x_,kh[x_]);if(__getOwnPropSymbols)for(var x_ of __getOwnPropSymbols(kh))__propIsEnum.call(kh,x_)&&__defNormalProp(Ff,x_,kh[x_]);return Ff},__spreadProps=(Ff,kh)=>__defProps(Ff,__getOwnPropDescs(kh));function genErrorInfo(Ff){let kh=`请使用 '@${Ff}' 事件,不要放在 props 中`;return kh+=`
|
|
259
|
-
Please use '@${Ff}' event instead of props`,kh}var _export_sfc=(Ff,kh)=>{for(const[x_,tAe]of kh)Ff[x_]=tAe;return Ff};const _sfc_main$1$1=vue$1.defineComponent({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(Ff,kh){const x_=vue$1.ref(null),tAe=vue$1.shallowRef(null),aAe=vue$1.ref(""),fAe=()=>{if(!x_.value)return;const vAe=vue$1.toRaw(Ff.defaultContent);iye({selector:x_.value,mode:Ff.mode,content:vAe||[],html:Ff.defaultHtml||Ff.modelValue||"",config:__spreadProps(__spreadValues({},Ff.defaultConfig),{onCreated(AAe){if(tAe.value=AAe,kh.emit("onCreated",AAe),Ff.defaultConfig.onCreated){const mAe=genErrorInfo("onCreated");throw new Error(mAe)}},onChange(AAe){const mAe=AAe.getHtml();if(aAe.value=mAe,kh.emit("update:modelValue",mAe),kh.emit("onChange",AAe),Ff.defaultConfig.onChange){const yAe=genErrorInfo("onChange");throw new Error(yAe)}},onDestroyed(AAe){if(kh.emit("onDestroyed",AAe),Ff.defaultConfig.onDestroyed){const mAe=genErrorInfo("onDestroyed");throw new Error(mAe)}},onMaxLength(AAe){if(kh.emit("onMaxLength",AAe),Ff.defaultConfig.onMaxLength){const mAe=genErrorInfo("onMaxLength");throw new Error(mAe)}},onFocus(AAe){if(kh.emit("onFocus",AAe),Ff.defaultConfig.onFocus){const mAe=genErrorInfo("onFocus");throw new Error(mAe)}},onBlur(AAe){if(kh.emit("onBlur",AAe),Ff.defaultConfig.onBlur){const mAe=genErrorInfo("onBlur");throw new Error(mAe)}},customAlert(AAe,mAe){if(kh.emit("customAlert",AAe,mAe),Ff.defaultConfig.customAlert){const yAe=genErrorInfo("customAlert");throw new Error(yAe)}},customPaste:(AAe,mAe)=>{if(Ff.defaultConfig.customPaste){const bAe=genErrorInfo("customPaste");throw new Error(bAe)}let yAe;return kh.emit("customPaste",AAe,mAe,bAe=>{yAe=bAe}),yAe}})})};function hAe(vAe){const AAe=tAe.value;AAe!=null&&AAe.setHtml(vAe)}return vue$1.onMounted(()=>{fAe()}),vue$1.watch(()=>Ff.modelValue,vAe=>{vAe!==aAe.value&&hAe(vAe)}),{box:x_}}}),_hoisted_1$1$1={ref:"box",style:{height:"100%"}};function _sfc_render$1$1(Ff,kh,x_,tAe,aAe,fAe){return vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$1$1,null,512)}var Editor=_export_sfc(_sfc_main$1$1,[["render",_sfc_render$1$1]]);const _sfc_main$n=vue$1.defineComponent({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(Ff){const kh=vue$1.ref(null),x_=tAe=>{if(kh.value){if(tAe==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");QO.getToolbar(tAe)||aye({editor:tAe,selector:kh.value||"<div></div>",mode:Ff.mode,config:Ff.defaultConfig})}};return vue$1.watchEffect(()=>{const{editor:tAe}=Ff;tAe!=null&&x_(tAe)}),{selector:kh}}}),_hoisted_1$m={ref:"selector"};function _sfc_render$k(Ff,kh,x_,tAe,aAe,fAe){return vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$m,null,512)}var Toolbar=_export_sfc(_sfc_main$n,[["render",_sfc_render$k]]);const _hoisted_1$l={style:{border:"1px solid #ccc"}},_sfc_main$m=vue$1.defineComponent({__name:"WangEditor",props:{modelValue:{default:""},height:{default:400},readOnly:{type:Boolean,default:!1},placeholder:{default:"请输入内容..."},mode:{default:"default"},toolbarConfig:{default:()=>({})},editorConfig:{default:()=>({})},hideUpload:{type:Boolean,default:!0},hideTable:{type:Boolean,default:!0},language:{default:"zh-CN"}},emits:["update:modelValue","change","created","destroyed","focus","blur"],setup(Ff,{expose:kh,emit:x_}){const tAe=Ff,aAe=x_,fAe=vue$1.shallowRef(),hAe=vue$1.reactive({excludeKeys:[...tAe.hideTable?["insertTable"]:[],...tAe.hideUpload?["uploadImage","insertImage","uploadVideo","insertVideo","group-image","group-video"]:[]],...tAe.toolbarConfig,modalAppendToBody:!0}),vAe=vue$1.reactive({placeholder:tAe.placeholder,readOnly:tAe.readOnly,...tAe.editorConfig});vue$1.onBeforeUnmount(()=>{const VAe=fAe.value;VAe!=null&&VAe.destroy()});const AAe=VAe=>{fAe.value=VAe,tAe.language&&tAe.language!=="zh-CN"&&zP(tAe.language),aAe("created",VAe)},mAe=VAe=>{aAe("change",VAe)},yAe=VAe=>{aAe("destroyed",VAe)},bAe=VAe=>{aAe("focus",VAe)},EAe=VAe=>{aAe("blur",VAe)},SAe=(VAe,zAe)=>{console.log(`${zAe}: ${VAe}`)};return kh({getEditor:()=>fAe.value,getHtml:()=>{var VAe;return((VAe=fAe.value)==null?void 0:VAe.getHtml())||""},getText:()=>{var VAe;return((VAe=fAe.value)==null?void 0:VAe.getText())||""},setHtml:VAe=>{var zAe;return(zAe=fAe.value)==null?void 0:zAe.setHtml(VAe)},insertText:VAe=>{var zAe;return(zAe=fAe.value)==null?void 0:zAe.insertText(VAe)},focus:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.focus()},blur:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.blur()},clear:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.clear()},undo:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.undo()},redo:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.redo()}}),(VAe,zAe)=>(vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$l,[vue$1.createVNode(vue$1.unref(Toolbar),{style:{"border-bottom":"1px solid #ccc"},editor:fAe.value,defaultConfig:hAe,mode:VAe.mode},null,8,["editor","defaultConfig","mode"]),vue$1.createVNode(vue$1.unref(Editor),{style:vue$1.normalizeStyle({height:tAe.height+"px","overflow-y":"hidden"}),modelValue:tAe.modelValue,"onUpdate:modelValue":zAe[0]||(zAe[0]=QAe=>tAe.modelValue=QAe),defaultConfig:vAe,mode:VAe.mode,"read-only":VAe.readOnly,onOnCreated:AAe,onOnChange:mAe,onOnDestroyed:yAe,onOnFocus:bAe,onOnBlur:EAe,onCustomAlert:SAe},null,8,["style","modelValue","defaultConfig","mode","read-only"])]))}}),WangEditor_vue_vue_type_style_index_0_scoped_7164d3f8_lang="",WangEditor=_export_sfc$1(_sfc_main$m,[["__scopeId","data-v-7164d3f8"]]),elInputNumber="",_sfc_main$l=vue$1.defineComponent({props:{option:Object,formComp:Object,pageKey:String},setup(Ff){const kh=useStore(),x_=Ff.pageKey,tAe=Ff.option,aAe=Ff.formComp,fAe=vue$1.reactive({currentValue:vue$1.computed(()=>Ff.formComp.formData[tAe.prop]||null),size:tAe.size||"small"});tAe.url&&hAe();function hAe(){let AAe=tAe.method=="POST"?"data":"params";service({url:kh.state._BASE_URL+tAe.url,[AAe]:tAe.params||{},method:tAe.method||"GET"}).then(mAe=>{tAe.options=typeof tAe.options=="function"?tAe.options(mAe):mAe[tAe.resDataKey]||mAe.items||mAe||[]}),Ff.formComp.updateStatusData=hAe}function vAe(AAe){if(fAe.currentValue!==AAe){if(aAe.formData[tAe.prop]=AAe,tAe.change){let mAe={};tAe.relation&&(mAe=getRelationComp(kh,x_,tAe.relation)),tAe.change({...aAe,...mAe})}kh.dispatch("_QUERY_LIST",{pageKey:x_,target:aAe.target})}}return{...vue$1.toRefs(fAe),changeTab:vAe}}}),SearchTab_vue_vue_type_style_index_0_scoped_50ed1da4_lang="",_hoisted_1$k={key:0,class:"header-btns step-btn"},_hoisted_2$8=["onClick"],_hoisted_3$6={key:0,class:"number"},_hoisted_4$4={key:1,class:"header-btns status-tab"},_hoisted_5$3={key:0,class:"number"};function _sfc_render$j(Ff,kh,x_,tAe,aAe,fAe){const hAe=ElButton;return Ff.option.type=="TabStep"?(vue$1.openBlock(),vue$1.createElementBlock("ul",_hoisted_1$k,[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.option.options||[],(vAe,AAe)=>{var mAe;return vue$1.openBlock(),vue$1.createElementBlock("li",{key:vAe[Ff.option.itemValue],class:vue$1.normalizeClass(["li"+AAe,Ff.currentValue==vAe[Ff.option.itemValue]?"active":""]),style:vue$1.normalizeStyle({"z-index":((mAe=Ff.option.options)==null?void 0:mAe.length)-AAe}),onClick:yAe=>Ff.changeTab(vAe[Ff.option.itemValue])},[vue$1.createTextVNode(vue$1.toDisplayString(vAe[Ff.option.itemName])+" ",1),Ff.option.itemData?(vue$1.openBlock(),vue$1.createElementBlock("span",_hoisted_3$6,vue$1.toDisplayString(vAe[Ff.option.itemData]||0),1)):vue$1.createCommentVNode("",!0)],14,_hoisted_2$8)}),128))])):(vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_4$4,[Ff.option.itemData?(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,{key:0},vue$1.renderList(Ff.option.options||[],vAe=>(vue$1.openBlock(),vue$1.createElementBlock("div",{key:vAe[Ff.option.itemValue]},[vue$1.createVNode(hAe,{type:Ff.currentValue==vAe[Ff.option.itemValue]?"primary":"info",onClick:AAe=>Ff.changeTab(vAe[Ff.option.itemValue]),size:Ff.size},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(vAe[Ff.option.itemName]),1),vAe[Ff.option.itemData]||vAe[Ff.option.itemData]==0?(vue$1.openBlock(),vue$1.createElementBlock("span",_hoisted_5$3,"("+vue$1.toDisplayString(vAe[Ff.option.itemData]||0)+")",1)):vue$1.createCommentVNode("",!0)]),_:2},1032,["type","onClick","size"])]))),128)):(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,{key:1},vue$1.renderList(Ff.option.options||[],vAe=>(vue$1.openBlock(),vue$1.createBlock(hAe,{key:vAe[Ff.option.itemValue],type:Ff.currentValue==vAe[Ff.option.itemValue]?"primary":"info",onClick:AAe=>Ff.changeTab(vAe[Ff.option.itemValue]),size:Ff.size},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(vAe[Ff.option.itemName]),1)]),_:2},1032,["type","onClick","size"]))),128))]))}const __unplugin_components_0$3=_export_sfc$1(_sfc_main$l,[["render",_sfc_render$j],["__scopeId","data-v-50ed1da4"]]),_sfc_main$k=vue$1.defineComponent({name:"Form",components:{SearchTab:__unplugin_components_0$3,uploadComp:UploadComp},props:{componentOption:{type:Object,default:()=>{}},pageKey:{type:String,default:""}},setup(Ff){const{t:kh}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),x_=useStore(),tAe=vue$1.ref(),aAe=Ff.componentOption,fAe=vue$1.reactive({open:!0,labelWidth:aAe.labelWidth||"110px",formItemWidth:aAe.formItemWidth||"180px",size:aAe.size||"small",showCloseButton:aAe.showCloseButton||!1,elementGroup:[],inline:aAe.inline!==!1,allDisabled:!1,formData:aAe.formData,row:{},loading:!1,relation:getRelationComp(x_,Ff.pageKey,aAe.relation)});aAe.getFormData=mAe,aAe.submit=bAe,aAe.reset=yAe,fAe.elementGroup=vue$1.computed(()=>aAe.elementGroup.filter(xAe=>xAe.isShow===void 0||typeof xAe.isShow=="function"&&xAe.isShow(fAe.formData,fAe.relation)));function hAe(){aAe.elementGroup.forEach(xAe=>{(xAe.type==="Select"||xAe.type==="Cascader"||xAe.type==="radioGroup"||xAe.type==="RadioGroup"||xAe.type==="RadioButton"||xAe.type==="Checkbox"||xAe.type==="CheckboxGroup")&&xAe.url&&!xAe.remote&&getSelectOption(x_,xAe,Ff.pageKey)})}function vAe(xAe,OAe){if(xAe){fAe.loading=!0;let TAe=OAe.method=="POST"?"data":"params";const BAe=typeof OAe.params=="function"?OAe.params(xAe,aAe):OAe.params;service({url:x_.state._BASE_URL+OAe.url,[TAe]:BAe||{},method:OAe.method||"GET"}).then(RAe=>{fAe.loading=!1,OAe.options=RAe[OAe.resProp]||RAe})}else OAe.options=[]}function AAe(xAe,OAe){fAe.formData[OAe.prop]=xAe,tAe.value.validateField(OAe.prop)}function mAe(){return getFormData(aAe)}function yAe(){aAe.elementGroup.forEach(xAe=>{xAe.type==="Tab"||xAe.type==="TabStep"||(fAe.formData[xAe.prop]=xAe.value),xAe.reset&&xAe.reset()}),aAe.validate&&setTimeout(()=>{tAe.value.clearValidate()})}function bAe(xAe,OAe){if(aAe.validate)tAe.value.validate(TAe=>{if(TAe){const BAe=EAe(OAe);if(BAe===!1)return;SAe(xAe,BAe)}});else{const TAe=EAe(OAe);if(TAe===!1)return;SAe(xAe,TAe)}}function EAe(xAe){if(aAe.submitBefore){const OAe=aAe.submitBefore({relation:fAe.relation,formData:aAe.formData,row:aAe.row,triggerButton:xAe});return OAe===!1?!1:OAe}return!0}function SAe(xAe,OAe){x_.commit("setLoading",!0);let TAe=aAe.method=="GET"?"params":"data";service({url:x_.state._BASE_URL+aAe.url,[TAe]:typeof OAe=="object"?OAe:aAe.formData||{},method:aAe.method||"POST"}).then(BAe=>{if(aAe.submitAfter){let RAe={};aAe.relation&&(RAe=getRelationComp(x_,Ff.pageKey,aAe.relation)),aAe.submitAfter({res:BAe,relation:RAe,formData:aAe.formData,row:aAe.row})}xAe({...fAe.formData})}).catch(BAe=>{console.log(BAe)}).finally(()=>{x_.commit("setLoading",!1)})}function DAe(){fAe.open=!fAe.open}return hAe(),{t:kh,...vue$1.toRefs(fAe),formRef:tAe,isOpen:DAe,getSelectData:hAe,remoteMethod:vAe,fileUrlInfo:AAe}}}),Form_vue_vue_type_style_index_0_scoped_1a2d553f_lang="",Form_vue_vue_type_style_index_1_lang="",_hoisted_1$j={key:0,class:"mask"};function _sfc_render$i(Ff,kh,x_,tAe,aAe,fAe){const hAe=__unplugin_components_0$3,vAe=ElInput,AAe=ElInputNumber,mAe=WangEditor,yAe=ElOption,bAe=ElSelect,EAe=ElCascader,SAe=ElRadio,DAe=ElRadioGroup,xAe=ElRadioButton,OAe=ElCheckbox,TAe=ElCheckboxGroup$1,BAe=ElDatePicker,RAe=ElTimeSelect,FAe=ElSwitch,MAe=UploadComp,$Ae=ElFormItem,LAe=__unplugin_components_17,VAe=__unplugin_components_18,zAe=ElIcon,QAe=ElForm;return vue$1.openBlock(),vue$1.createBlock(QAe,{class:vue$1.normalizeClass(["form-group",Ff.componentOption.class||""]),ref:"formRef",model:Ff.formData,size:Ff.size,inline:Ff.inline,style:vue$1.normalizeStyle(Ff.componentOption.style)},{default:vue$1.withCtx(()=>[Ff.allDisabled?(vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$j)):vue$1.createCommentVNode("",!0),(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.elementGroup,(GAe,qAe)=>(vue$1.openBlock(),vue$1.createBlock($Ae,{key:GAe.prop,label:GAe.label,"label-width":GAe.labelWidth||Ff.labelWidth,prop:GAe.prop||"",rules:typeof GAe.rules=="function"?GAe.rules(Ff.formData,Ff.relation):GAe.rules,class:vue$1.normalizeClass([GAe.className,!Ff.open&&qAe>4?"hide-item":""]),style:vue$1.normalizeStyle({width:GAe.width||Ff.formItemWidth,display:GAe.type==="Tab"||GAe.type==="TabStep"?"block":"",...GAe.style})},vue$1.createSlots({default:vue$1.withCtx(()=>[GAe.type==="Tab"||GAe.type==="TabStep"?(vue$1.openBlock(),vue$1.createBlock(hAe,{key:0,option:GAe,formComp:Ff.componentOption,pageKey:Ff.pageKey},null,8,["option","formComp","pageKey"])):GAe.type==="Input"?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:1,clearable:"",disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled||GAe.disable,"show-password":GAe.inputType==="password",type:GAe.inputType||"text",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,maxlength:GAe.maxlength,min:GAe.min,max:GAe.max,placeholder:GAe.placeholder,"prefix-Icon":GAe.prefixIcon||"",onKeyup:ZAe=>GAe.keyup&&GAe.keyup(Ff.formData[GAe.prop]),onClear:ZAe=>GAe.clear&&GAe.clear(Ff.formData[GAe.prop]),"data-target":Ff.componentOption.target,"data-pageKey":Ff.pageKey},null,8,["disabled","show-password","type","modelValue","onUpdate:modelValue","maxlength","min","max","placeholder","prefix-Icon","onKeyup","onClear","data-target","data-pageKey"])):vue$1.createCommentVNode("",!0),Ff.elementGroup.length===1?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:2,class:"hide-input",type:"text"})):vue$1.createCommentVNode("",!0),GAe.type==="InputNumber"?(vue$1.openBlock(),vue$1.createBlock(AAe,{key:3,clearable:"",disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,"controls-position":"right",controls:GAe.controls!==!1,min:GAe.min,max:GAe.max,placeholder:GAe.placeholder,"prefix-Icon":GAe.prefixIcon||"",onKeyup:ZAe=>GAe.keyup&&GAe.keyup(Ff.formData[GAe.prop]),onClear:ZAe=>GAe.clear&&GAe.clear(Ff.formData[GAe.prop])},null,8,["disabled","modelValue","onUpdate:modelValue","controls","min","max","placeholder","prefix-Icon","onKeyup","onClear"])):GAe.type==="Textarea"?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:4,clearable:"",type:"textarea",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,placeholder:GAe.placeholder,rows:GAe.rows||1,"show-word-limit":GAe.showWordLimit,maxlength:GAe.maxlength},null,8,["modelValue","onUpdate:modelValue","placeholder","rows","show-word-limit","maxlength"])):GAe.type==="Editor"?(vue$1.openBlock(),vue$1.createBlock(mAe,{key:5,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,mode:"simple",height:GAe.height,placeholder:GAe.placeholder,"read-only":GAe.readOnly,hideUpload:GAe.hideUpload,hideTable:GAe.hideTable,language:GAe.language},null,8,["modelValue","onUpdate:modelValue","height","placeholder","read-only","hideUpload","hideTable","language"])):GAe.type==="Select"&&!GAe.remote?(vue$1.openBlock(),vue$1.createBlock(bAe,{key:6,clearable:GAe.clearable!==!1,filterable:GAe.filterable,placeholder:GAe.placeholder,multiple:GAe.multiple===!0,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),onVisibleChange:ZAe=>{GAe.visibleChange&&GAe.visibleChange(ZAe,{formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe})},disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,"collapse-tags":GAe.collapseTags,"collapse-tags-tooltip":GAe.collapseTagsTooltip},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(yAe,{label:typeof GAe.itemName=="function"?GAe.itemName(ZAe):ZAe[GAe.itemName||"label"],value:typeof GAe.itemValue=="function"?GAe.itemValue(ZAe):ZAe[GAe.itemValue||"value"],key:ZAe.value,disabled:ZAe.disabled,onClick:rme=>GAe.optionClick&&GAe.optionClick({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:ZAe})},null,8,["label","value","disabled","onClick"]))),128))]),_:2},1032,["clearable","filterable","placeholder","multiple","modelValue","onUpdate:modelValue","onChange","onVisibleChange","disabled","collapse-tags","collapse-tags-tooltip"])):vue$1.createCommentVNode("",!0),GAe.type==="Select"&&GAe.remote?(vue$1.openBlock(),vue$1.createBlock(bAe,{key:7,clearable:GAe.clearable!==!1,filterable:"","reserve-keyword":"",placeholder:GAe.placeholder,multiple:GAe.multiple===!0,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,"collapse-tags":GAe.collapseTags,"collapse-tags-tooltip":GAe.collapseTagsTooltip,remote:"","remote-method":ZAe=>{Ff.remoteMethod(ZAe,GAe)},loading:Ff.loading},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(yAe,{label:typeof GAe.itemName=="function"?GAe.itemName(ZAe):ZAe[GAe.itemName||"label"],value:typeof GAe.itemValue=="function"?GAe.itemValue(ZAe):ZAe[GAe.itemValue||"value"],key:ZAe.value,disabled:ZAe.disabled,onClick:rme=>GAe.optionClick&&GAe.optionClick({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:ZAe})},null,8,["label","value","disabled","onClick"]))),128))]),_:2},1032,["clearable","placeholder","multiple","modelValue","onUpdate:modelValue","onChange","disabled","collapse-tags","collapse-tags-tooltip","remote-method","loading"])):GAe.type==="Cascader"?(vue$1.openBlock(),vue$1.createBlock(EAe,{key:8,clearable:"",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,options:GAe.options,props:GAe.props,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),placeholder:GAe.placeholder},vue$1.createSlots({_:2},[GAe.slot?{name:"default",fn:vue$1.withCtx(({data:ZAe})=>[vue$1.renderSlot(Ff.$slots,GAe.slot,{data:ZAe},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","options","props","onChange","placeholder"])):(GAe.type==="RadioGroup"||GAe.type==="radioGroup")&&GAe.optionClick?(vue$1.openBlock(),vue$1.createBlock(DAe,{key:9,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(SAe,{key:ZAe[GAe.itemValue||"value"],label:ZAe[GAe.itemValue||"value"],style:vue$1.normalizeStyle(GAe.itemStyle),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,onClick:vue$1.withModifiers(rme=>GAe.optionClick&&GAe.optionClick({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:ZAe}),["prevent"])},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe[GAe.itemName||"label"]),1)]),_:2},1032,["label","style","disabled","onClick"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled"])):GAe.type==="RadioGroup"||GAe.type==="radioGroup"?(vue$1.openBlock(),vue$1.createBlock(DAe,{key:10,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(SAe,{key:ZAe[GAe.itemValue||"value"],label:ZAe[GAe.itemValue||"value"],style:vue$1.normalizeStyle(GAe.itemStyle),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe[GAe.itemName||"label"]),1)]),_:2},1032,["label","style","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled"])):GAe.type==="RadioButton"?(vue$1.openBlock(),vue$1.createBlock(DAe,{key:11,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe})},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.radios,ZAe=>(vue$1.openBlock(),vue$1.createBlock(xAe,{label:ZAe.value,key:ZAe.value},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe.label),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):GAe.type==="Checkbox"||GAe.type==="CheckboxGroup"?(vue$1.openBlock(),vue$1.createBlock(TAe,{key:12,class:vue$1.normalizeClass(GAe.className),modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.checkboxs,ZAe=>(vue$1.openBlock(),vue$1.createBlock(OAe,{label:ZAe.value,key:ZAe.value},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe.label),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["class","modelValue","onUpdate:modelValue"])):GAe.type==="Year"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:13,type:"year",placeholder:GAe.placeholder,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,clearable:GAe.clearable!==!1,disabled:GAe.disabled,"value-format":GAe.valueFormat},null,8,["placeholder","modelValue","onUpdate:modelValue","clearable","disabled","value-format"])):GAe.type==="Date"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:14,type:GAe.dateType||"date",placeholder:GAe.placeholder,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,clearable:GAe.clearable!==!1,"value-format":GAe.valueFormat,disabled:GAe.disabled,"disabled-date":ZAe=>GAe.disabledDate&&GAe.disabledDate({time:ZAe,formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe})},null,8,["type","placeholder","modelValue","onUpdate:modelValue","clearable","value-format","disabled","disabled-date"])):GAe.type==="Daterange"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:15,type:"daterange","start-placeholder":GAe.startPlaceholder,"end-placeholder":GAe.endPlaceholder,"range-separator":" - ",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,"disabled-date":GAe.disabledDate,shortcuts:GAe.shortcuts,"value-format":GAe.valueFormat},null,8,["start-placeholder","end-placeholder","modelValue","onUpdate:modelValue","disabled-date","shortcuts","value-format"])):GAe.type==="Datetimerange"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:16,type:"datetimerange","start-placeholder":GAe.startPlaceholder,"end-placeholder":GAe.endPlaceholder,"range-separator":" - ",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,"disabled-date":GAe.disabledDate,shortcuts:GAe.shortcuts,"value-format":GAe.valueFormat},null,8,["start-placeholder","end-placeholder","modelValue","onUpdate:modelValue","disabled-date","shortcuts","value-format"])):GAe.type==="Time"?(vue$1.openBlock(),vue$1.createBlock(RAe,{key:17,placeholder:GAe.placeholder,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,type:""},null,8,["placeholder","modelValue","onUpdate:modelValue"])):GAe.type==="DateTime"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:18,placeholder:GAe.placeholder,type:"datetime",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,disabled:GAe.disable,"disabled-date":GAe.disabledDate},null,8,["placeholder","modelValue","onUpdate:modelValue","disabled","disabled-date"])):GAe.type==="Switch"?(vue$1.openBlock(),vue$1.createBlock(FAe,{key:19,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe},null,8,["modelValue","onUpdate:modelValue"])):GAe.type==="upload"?(vue$1.openBlock(),vue$1.createBlock(MAe,{key:20,style:vue$1.normalizeStyle({"text-align":GAe.textAlign||"center"}),revisionImg:!0,name:"upload",isDraggable:GAe.isDraggable,uploadObj:{defaultfilelist:Ff.formData[GAe.prop]},onFileUrlInfo:ZAe=>Ff.fileUrlInfo(ZAe,GAe),onChange:(ZAe,rme)=>GAe.change&&GAe.change({formComp:Ff.componentOption,fileList:rme,file:ZAe,option:GAe}),onRemove:ZAe=>GAe.remove&&GAe.remove({formComp:Ff.componentOption,file:ZAe,option:GAe}),listType:GAe.listType||"picture-card",ref_for:!0,ref:"uploadComp",fileUrl:GAe.fileUrl,limit:GAe.limit,maxSize:GAe.maxSize,format:GAe.format,text:GAe.text,tip:GAe.tip,multiple:GAe.multiple,disabled:GAe.disabled,drag:GAe.drag,autoUpload:GAe.autoUpload},null,8,["style","isDraggable","uploadObj","onFileUrlInfo","onChange","onRemove","listType","fileUrl","limit","maxSize","format","text","tip","multiple","disabled","drag","autoUpload"])):vue$1.createCommentVNode("",!0),GAe.slot&&!GAe.labelSlot?vue$1.renderSlot(Ff.$slots,GAe.slot,{key:21,data:Ff.formData},void 0,!0):vue$1.createCommentVNode("",!0)]),_:2},[GAe.labelSlot?{name:"label",fn:vue$1.withCtx(()=>[vue$1.renderSlot(Ff.$slots,GAe.slot,{data:Ff.formData},void 0,!0)]),key:"0"}:void 0]),1032,["label","label-width","prop","rules","class","style"]))),128)),vue$1.renderSlot(Ff.$slots,"default",{},void 0,!0),Ff.elementGroup.length>4&&Ff.showCloseButton?(vue$1.openBlock(),vue$1.createElementBlock("span",{key:1,onClick:kh[0]||(kh[0]=(...GAe)=>Ff.isOpen&&Ff.isOpen(...GAe)),class:"form-move-search"},[vue$1.createTextVNode(vue$1.toDisplayString(Ff.open?Ff.t("收起"):Ff.t("展开"))+" ",1),vue$1.createVNode(zAe,null,{default:vue$1.withCtx(()=>[vue$1.withDirectives(vue$1.createVNode(LAe,null,null,512),[[vue$1.vShow,Ff.open]]),vue$1.withDirectives(vue$1.createVNode(VAe,null,null,512),[[vue$1.vShow,!Ff.open]])]),_:1})])):vue$1.createCommentVNode("",!0)]),_:3},8,["class","model","size","inline","style"])}const Form=_export_sfc$1(_sfc_main$k,[["render",_sfc_render$i],["__scopeId","data-v-1a2d553f"]]),_sfc_main$j=vue$1.defineComponent({name:"Upload",props:{url:String,text:{type:String,default:""},disabled:{type:Boolean,default:!1},buttonType:{type:String,default:"success"},type:{type:String,default:"button"},accept:{type:String,default:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf"},style:{type:Object,default:{}},params:{type:Object,default:{}},beforeUploadValidate:{type:Function,default:()=>!0},size:{type:String,default:"small"}},emits:["onSuccess","onError"],setup(Ff,kh){const{t:x_}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),tAe=useStore(),aAe=vue$1.ref(),fAe=vue$1.reactive({uploadUrl:vue$1.computed(()=>handleProxy(tAe.state._BASE_URL+Ff.url))}),hAe=vue$1.ref(!1),vAe=getRequestHeaders(fAe.uploadUrl);async function AAe(){if(Ff.disabled)return;const EAe=Ff.beforeUploadValidate();(EAe==null?void 0:EAe.toString())==="[object Promise]"?EAe.then(SAe=>{SAe&&aAe.value.ref.click()}):EAe&&aAe.value.ref.click()}function mAe(){hAe.value=!0,tAe.commit("setLoading",!0)}function yAe(EAe){EAe.code==0?(ElMessage.success(EAe.msg||x_("上传成功")),kh.emit("onSuccess",EAe)):(ElMessage.error(EAe.msg),kh.emit("onError",EAe)),hAe.value=!1,tAe.commit("setLoading",!1)}function bAe(EAe){const SAe=EAe.toString(),DAe=new RegExp('"msg":"(.*?)(?<!\\\\)"'),xAe=SAe.match(DAe);xAe&&ElMessage.error(xAe[1]),hAe.value=!1,tAe.commit("setLoading",!1),kh.emit("onError",EAe)}return{...vue$1.toRefs(fAe),uploadButtonRef:aAe,headers:vAe,uploading:hAe,validate:AAe,beforeUpload:mAe,uploadSuccess:yAe,uploadError:bAe}}});function _sfc_render$h(Ff,kh,x_,tAe,aAe,fAe){const hAe=ElButton,vAe=ElUpload;return vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,null,[vue$1.createVNode(vAe,{style:{display:"inline-flex"},action:Ff.uploadUrl,accept:Ff.accept,"with-credentials":!0,multiple:"","show-file-list":!1,"before-upload":Ff.beforeUpload,"on-success":Ff.uploadSuccess,"on-error":Ff.uploadError,disabled:Ff.uploading,headers:Ff.headers,data:Ff.params},{default:vue$1.withCtx(()=>[vue$1.createVNode(hAe,{ref:"uploadButtonRef",style:{display:"none"},size:Ff.size,type:Ff.buttonType,loading:Ff.uploading},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.text),1)]),_:1},8,["size","type","loading"])]),_:1},8,["action","accept","before-upload","on-success","on-error","disabled","headers","data"]),Ff.type==="text"?(vue$1.openBlock(),vue$1.createElementBlock("span",{key:0,class:vue$1.normalizeClass(["dfs-text-btn",{disabled:Ff.disabled}]),style:vue$1.normalizeStyle(Ff.style),onClick:kh[0]||(kh[0]=(...AAe)=>Ff.validate&&Ff.validate(...AAe))},vue$1.toDisplayString(Ff.text),7)):(vue$1.openBlock(),vue$1.createBlock(hAe,{key:1,onClick:Ff.validate,disabled:Ff.disabled,size:Ff.size,type:Ff.buttonType},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.text),1)]),_:1},8,["onClick","disabled","size","type"]))],64)}const Upload=_export_sfc$1(_sfc_main$j,[["render",_sfc_render$h]]),_sfc_main$i=vue$1.defineComponent({name:"ButtonGroup",components:{Upload},props:{pageKey:{type:String,default:""},componentOption:{type:Object,default:()=>{}}},setup(Ff){const{t:kh}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),x_=vue$1.reactive({buttonGroup:vue$1.computed(()=>Ff.componentOption.elementGroup.filter(xAe=>{if(typeof xAe.isShow=="function")if(xAe.relation){const OAe=getRelationComp(store,Ff.pageKey,xAe.relation);return xAe.isShow(OAe)}else return xAe.isShow();return xAe.isShow===void 0||xAe.isShow})),size:Ff.componentOption.size||"default"});function tAe(xAe){switch(xAe.event){case"query":fAe(xAe.target);break;case"reset":hAe(xAe);break;case"export":mAe(xAe);break;case"download":vAe(xAe);break;case"exportByFront":AAe(xAe);break;case"dialog":yAe(xAe);break;case"cancel":bAe(xAe.restTarget||xAe.target);break;case"submit":EAe(xAe);break;default:aAe(xAe)}}function aAe(xAe){let OAe={};xAe.relation&&(OAe=getRelationComp(store,Ff.pageKey,xAe.relation)),xAe.handleClick&&xAe.handleClick(OAe)}function fAe(xAe,OAe){store.dispatch("_QUERY_LIST",{pageKey:Ff.pageKey,target:xAe,partialUpdate:OAe})}function hAe(xAe){getTargetComp(store,Ff.pageKey,xAe.target).reset(),xAe.queryTarget&&fAe(xAe.queryTarget)}function vAe(xAe){xAe.url.indexOf("https://")>-1?window.open(xAe.url,"_blank"):downLoadData({url:store.state._BASE_URL+xAe.url,fileName:xAe.fileName||"",method:xAe.method,store})}function AAe(xAe){if(!xAe.target)return ElMessage.warning("请设置'target'字段,指定需要导出的table数据");const OAe=getTargetComp(store,Ff.pageKey,xAe.target);let TAe={fileName:kh(xAe.fileName),columnKeys:xAe.columnKeys||OAe.columns.map(BAe=>BAe.field)};OAe.gridApi.exportDataAsCsv(TAe)}function mAe(xAe){if(xAe.beforeExport){let RAe={};if(xAe.relation&&(RAe=getRelationComp(store,Ff.pageKey,xAe.relation)),xAe.beforeExport(RAe)===!1)return}const OAe=getTargetComp(store,Ff.pageKey,xAe.target);if(!OAe.data.totalNum)return ElMessage.warning(kh("无可导出数据,请查询后导出"));let TAe=null,BAe={...OAe.formData||{},...OAe.params||{},...OAe.pageInfo||{}};if(OAe.dependencies&&(TAe=getTargetComp(store,Ff.pageKey,OAe.dependencies),BAe={...getFormData(TAe),...BAe}),OAe.exportBySelectionData){const RAe=OAe.exportBySelectionData(OAe.selectedRows);Array.isArray(RAe)?BAe=RAe:RAe&&(BAe={...BAe,...RAe})}if(xAe.openDownloadCenter){let RAe=(xAe.method||"post").toUpperCase(),FAe=RAe=="GET"?"params":"data";service({url:store.state._BASE_URL+xAe.url,[FAe]:{taskParam:BAe},method:RAe}).then(MAe=>{store.commit("setUploadDownloadDialogVisible",!0)})}else{const RAe={url:store.state._BASE_URL+xAe.url,fileName:xAe.fileName,method:xAe.method,params:BAe,store};downLoadData(RAe)}}function yAe(xAe){if(xAe.showDialogBefore){let TAe={};if(xAe.relation&&(TAe=getRelationComp(store,Ff.pageKey,xAe.relation)),xAe.showDialogBefore(TAe)===!1)return}const OAe=store.getters._GET_DIALOGREF(Ff.pageKey);OAe.option=xAe,OAe.showDialog()}function bAe(xAe){const OAe=store.getters._GET_DIALOGREF(Ff.pageKey);if(OAe)OAe.closeDialog();else if(xAe){const TAe=getTargetComp(store,Ff.pageKey,xAe);TAe.reset&&TAe.reset()}}function EAe(xAe){getTargetComp(store,Ff.pageKey,xAe.target).submit(TAe=>{bAe(xAe.target),ElMessage.success(kh("操作成功")),xAe.queryTarget&&fAe(xAe.queryTarget,xAe.partialUpdate)},xAe)}function SAe(xAe,OAe){OAe.queryTarget&&fAe(OAe.queryTarget),OAe.onSuccess&&OAe.onSuccess(xAe),OAe.openDownloadCenter&&store.commit("setUploadDownloadDialogVisible",!0)}function DAe(xAe,OAe){OAe.onError&&OAe.onError(xAe),OAe.openDownloadCenter&&store.commit("setUploadDownloadDialogVisible",!0)}return{...vue$1.toRefs(x_),handleClick:tAe,download:vAe,queryData:fAe,uploadSuccess:SAe,onError:DAe}}}),ButtonGroup_vue_vue_type_style_index_0_scoped_40aa0228_lang="",ButtonGroup_vue_vue_type_style_index_1_lang="",_hoisted_1$i=["onClick"];function _sfc_render$g(Ff,kh,x_,tAe,aAe,fAe){const hAe=Upload,vAe=ElIcon,AAe=ElButton;return vue$1.openBlock(),vue$1.createElementBlock("div",{class:"button-group",style:vue$1.normalizeStyle(Ff.componentOption.style)},[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.buttonGroup,mAe=>(vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,{key:mAe.text},[mAe.slot?vue$1.renderSlot(Ff.$slots,mAe.slot,{key:1},void 0,!0):(vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,{key:0},[mAe.event==="upload"?(vue$1.openBlock(),vue$1.createBlock(hAe,{key:0,url:mAe.url,text:mAe.text,onOnSuccess:yAe=>Ff.uploadSuccess(yAe,mAe),onOnError:yAe=>Ff.onError(yAe,mAe),buttonType:mAe.buttonType,type:mAe.type,style:vue$1.normalizeStyle(mAe.style),size:Ff.size},null,8,["url","text","onOnSuccess","onOnError","buttonType","type","style","size"])):(vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,{key:1},[mAe.type==="text"?(vue$1.openBlock(),vue$1.createElementBlock("span",{key:0,class:"dfs-text-btn",style:vue$1.normalizeStyle(mAe.style),onClick:yAe=>Ff.handleClick(mAe)},[mAe.icon?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:0},{default:vue$1.withCtx(()=>[(vue$1.openBlock(),vue$1.createBlock(vue$1.resolveDynamicComponent(mAe.icon),{color:mAe.iconColor||"red"},null,8,["color"]))]),_:2},1024)):vue$1.createCommentVNode("",!0),vue$1.createTextVNode(" "+vue$1.toDisplayString(mAe.text),1)],12,_hoisted_1$i)):(vue$1.openBlock(),vue$1.createBlock(AAe,{key:1,style:vue$1.normalizeStyle(mAe.style),type:mAe.buttonType||"primary",size:Ff.size,onClick:yAe=>Ff.handleClick(mAe),disabled:mAe.disabled&&mAe.disabled()},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(mAe.text),1)]),_:2},1032,["style","type","size","onClick","disabled"]))],64))],64))],64))),128)),vue$1.renderSlot(Ff.$slots,"default",{},void 0,!0)],4)}const ButtonGroup=_export_sfc$1(_sfc_main$i,[["render",_sfc_render$g],["__scopeId","data-v-40aa0228"]]),_sfc_main$h=vue$1.defineComponent({props:{gridApi:{type:Object,default:{}},storageColumnsKey:{type:String,default:""},columnDefs:{type:Array,default:[]},columnUpdate:{type:Number,default:0}},setup(Ff){const{t:kh}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),x_=vue$1.ref(),tAe=vue$1.reactive({show:!1,left:"",top:"",bottom:"auto",columns:[]});vue$1.watch(()=>Ff.columnUpdate,()=>{tAe.columns=Ff.columnDefs.map(mAe=>({...mAe,show:!mAe.hide}))}),tAe.columns=Ff.columnDefs.map(mAe=>({...mAe,show:!mAe.hide}));function aAe(){tAe.columns.forEach(yAe=>{yAe.hide=!yAe.show}),hAe(tAe.columns);const mAe=tAe.columns.map(yAe=>({field:yAe.field,headerName:yAe.headerName,width:yAe.width,minWidth:yAe.minWidth,hide:yAe.hide}));localStorage.setItem(Ff.storageColumnsKey,JSON.stringify(mAe))}function fAe(){tAe.columns.forEach(mAe=>{mAe.rowGroup?(mAe.hide=!0,mAe.show=!1):(mAe.hide=!1,mAe.show=!0)}),hAe(tAe.columns),localStorage.removeItem(Ff.storageColumnsKey)}function hAe(mAe){Ff.gridApi.setColumnDefs(mAe),tAe.show=!1}function vAe(){tAe.show=!1}function AAe(){Ff.storageColumnsKey&&(setTimeout(()=>{const mAe=document.querySelector(`.${Ff.storageColumnsKey} .ag-header`);mAe&&(mAe.oncontextmenu=yAe=>{tAe.left=yAe.pageX+"px",tAe.top=yAe.pageY+"px",setTimeout(()=>{tAe.show=!0,vue$1.nextTick(()=>{const bAe=x_.value.clientHeight,EAe=document.documentElement.clientHeight;bAe+20>EAe-yAe.pageY&&(tAe.top="auto",tAe.bottom="10px")})}),yAe.preventDefault()})},1e3),document.removeEventListener("click",vAe,!1),document.removeEventListener("contextmenu",vAe,!1),document.addEventListener("click",vAe,!1),document.addEventListener("contextmenu",vAe,!1))}return AAe(),vue$1.onActivated(()=>{AAe()}),{t:kh,elColumnCheckedPanel:x_,...vue$1.toRefs(tAe),confirm:aAe,reset:fAe}}}),ColumnCheck_vue_vue_type_style_index_0_lang="",_hoisted_1$h={class:"header-checked-header"},_hoisted_2$7={class:"header-checked-body"},_hoisted_3$5={class:"header-checked-footer"};function _sfc_render$f(Ff,kh,x_,tAe,aAe,fAe){const hAe=ElCheckbox,vAe=ElButton;return vue$1.withDirectives((vue$1.openBlock(),vue$1.createElementBlock("div",{ref:"elColumnCheckedPanel",style:vue$1.normalizeStyle({left:Ff.left,top:Ff.top,bottom:Ff.bottom}),class:"header-checked",onClick:kh[0]||(kh[0]=vue$1.withModifiers(()=>{},["stop"]))},[vue$1.createElementVNode("p",_hoisted_1$h,vue$1.toDisplayString(Ff.t("自定义显示字段")),1),vue$1.createElementVNode("div",_hoisted_2$7,[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.columns,(AAe,mAe)=>vue$1.withDirectives((vue$1.openBlock(),vue$1.createBlock(hAe,{key:AAe.headerName+mAe,modelValue:AAe.show,"onUpdate:modelValue":yAe=>AAe.show=yAe,label:AAe.headerName},null,8,["modelValue","onUpdate:modelValue","label"])),[[vue$1.vShow,AAe.headerName!==" "]])),128))]),vue$1.createElementVNode("div",_hoisted_3$5,[vue$1.createVNode(vAe,{type:"default",size:"small",onClick:Ff.reset,style:{"margin-right":"4px"}},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("还原")),1)]),_:1},8,["onClick"]),vue$1.createVNode(vAe,{type:"primary",size:"small",onClick:Ff.confirm},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("确定")),1)]),_:1},8,["onClick"])])],4)),[[vue$1.vShow,Ff.show]])}const __unplugin_components_2$1=_export_sfc$1(_sfc_main$h,[["render",_sfc_render$f]]),elConfigProvider="",elPagination="";var main={};/**
|
|
259
|
+
Please use '@${Ff}' event instead of props`,kh}var _export_sfc=(Ff,kh)=>{for(const[x_,tAe]of kh)Ff[x_]=tAe;return Ff};const _sfc_main$1$1=vue$1.defineComponent({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(Ff,kh){const x_=vue$1.ref(null),tAe=vue$1.shallowRef(null),aAe=vue$1.ref(""),fAe=()=>{if(!x_.value)return;const vAe=vue$1.toRaw(Ff.defaultContent);iye({selector:x_.value,mode:Ff.mode,content:vAe||[],html:Ff.defaultHtml||Ff.modelValue||"",config:__spreadProps(__spreadValues({},Ff.defaultConfig),{onCreated(AAe){if(tAe.value=AAe,kh.emit("onCreated",AAe),Ff.defaultConfig.onCreated){const mAe=genErrorInfo("onCreated");throw new Error(mAe)}},onChange(AAe){const mAe=AAe.getHtml();if(aAe.value=mAe,kh.emit("update:modelValue",mAe),kh.emit("onChange",AAe),Ff.defaultConfig.onChange){const yAe=genErrorInfo("onChange");throw new Error(yAe)}},onDestroyed(AAe){if(kh.emit("onDestroyed",AAe),Ff.defaultConfig.onDestroyed){const mAe=genErrorInfo("onDestroyed");throw new Error(mAe)}},onMaxLength(AAe){if(kh.emit("onMaxLength",AAe),Ff.defaultConfig.onMaxLength){const mAe=genErrorInfo("onMaxLength");throw new Error(mAe)}},onFocus(AAe){if(kh.emit("onFocus",AAe),Ff.defaultConfig.onFocus){const mAe=genErrorInfo("onFocus");throw new Error(mAe)}},onBlur(AAe){if(kh.emit("onBlur",AAe),Ff.defaultConfig.onBlur){const mAe=genErrorInfo("onBlur");throw new Error(mAe)}},customAlert(AAe,mAe){if(kh.emit("customAlert",AAe,mAe),Ff.defaultConfig.customAlert){const yAe=genErrorInfo("customAlert");throw new Error(yAe)}},customPaste:(AAe,mAe)=>{if(Ff.defaultConfig.customPaste){const bAe=genErrorInfo("customPaste");throw new Error(bAe)}let yAe;return kh.emit("customPaste",AAe,mAe,bAe=>{yAe=bAe}),yAe}})})};function hAe(vAe){const AAe=tAe.value;AAe!=null&&AAe.setHtml(vAe)}return vue$1.onMounted(()=>{fAe()}),vue$1.watch(()=>Ff.modelValue,vAe=>{vAe!==aAe.value&&hAe(vAe)}),{box:x_}}}),_hoisted_1$1$1={ref:"box",style:{height:"100%"}};function _sfc_render$1$1(Ff,kh,x_,tAe,aAe,fAe){return vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$1$1,null,512)}var Editor=_export_sfc(_sfc_main$1$1,[["render",_sfc_render$1$1]]);const _sfc_main$n=vue$1.defineComponent({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(Ff){const kh=vue$1.ref(null),x_=tAe=>{if(kh.value){if(tAe==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");QO.getToolbar(tAe)||aye({editor:tAe,selector:kh.value||"<div></div>",mode:Ff.mode,config:Ff.defaultConfig})}};return vue$1.watchEffect(()=>{const{editor:tAe}=Ff;tAe!=null&&x_(tAe)}),{selector:kh}}}),_hoisted_1$m={ref:"selector"};function _sfc_render$k(Ff,kh,x_,tAe,aAe,fAe){return vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$m,null,512)}var Toolbar=_export_sfc(_sfc_main$n,[["render",_sfc_render$k]]);const _hoisted_1$l={style:{border:"1px solid #ccc"}},_sfc_main$m=vue$1.defineComponent({__name:"WangEditor",props:{modelValue:{default:""},height:{default:400},readOnly:{type:Boolean,default:!1},placeholder:{default:"请输入内容..."},mode:{default:"default"},toolbarConfig:{default:()=>({})},editorConfig:{default:()=>({})},hideUpload:{type:Boolean,default:!0},hideTable:{type:Boolean,default:!0},language:{default:"zh-CN"}},emits:["update:modelValue","change","created","destroyed","focus","blur"],setup(Ff,{expose:kh,emit:x_}){const tAe=Ff,aAe=x_,fAe=vue$1.shallowRef(),hAe=vue$1.reactive({excludeKeys:[...tAe.hideTable?["insertTable"]:[],...tAe.hideUpload?["uploadImage","insertImage","uploadVideo","insertVideo","group-image","group-video"]:[]],...tAe.toolbarConfig}),vAe=vue$1.reactive({placeholder:tAe.placeholder,readOnly:tAe.readOnly,...tAe.editorConfig});vue$1.onBeforeUnmount(()=>{const VAe=fAe.value;VAe!=null&&VAe.destroy()});const AAe=VAe=>{fAe.value=VAe,tAe.language&&tAe.language!=="zh-CN"&&zP(tAe.language),aAe("created",VAe)},mAe=VAe=>{aAe("change",VAe)},yAe=VAe=>{aAe("destroyed",VAe)},bAe=VAe=>{aAe("focus",VAe)},EAe=VAe=>{aAe("blur",VAe)},SAe=(VAe,zAe)=>{console.log(`${zAe}: ${VAe}`)};return kh({getEditor:()=>fAe.value,getHtml:()=>{var VAe;return((VAe=fAe.value)==null?void 0:VAe.getHtml())||""},getText:()=>{var VAe;return((VAe=fAe.value)==null?void 0:VAe.getText())||""},setHtml:VAe=>{var zAe;return(zAe=fAe.value)==null?void 0:zAe.setHtml(VAe)},insertText:VAe=>{var zAe;return(zAe=fAe.value)==null?void 0:zAe.insertText(VAe)},focus:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.focus()},blur:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.blur()},clear:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.clear()},undo:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.undo()},redo:()=>{var VAe;return(VAe=fAe.value)==null?void 0:VAe.redo()}}),(VAe,zAe)=>(vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$l,[vue$1.createVNode(vue$1.unref(Toolbar),{style:{"border-bottom":"1px solid #ccc"},editor:fAe.value,defaultConfig:hAe,mode:VAe.mode},null,8,["editor","defaultConfig","mode"]),vue$1.createVNode(vue$1.unref(Editor),{style:vue$1.normalizeStyle({height:tAe.height+"px","overflow-y":"hidden"}),modelValue:tAe.modelValue,"onUpdate:modelValue":zAe[0]||(zAe[0]=QAe=>tAe.modelValue=QAe),defaultConfig:vAe,mode:VAe.mode,"read-only":VAe.readOnly,onOnCreated:AAe,onOnChange:mAe,onOnDestroyed:yAe,onOnFocus:bAe,onOnBlur:EAe,onCustomAlert:SAe},null,8,["style","modelValue","defaultConfig","mode","read-only"])]))}}),WangEditor_vue_vue_type_style_index_0_scoped_21b25462_lang="",WangEditor=_export_sfc$1(_sfc_main$m,[["__scopeId","data-v-21b25462"]]),elInputNumber="",_sfc_main$l=vue$1.defineComponent({props:{option:Object,formComp:Object,pageKey:String},setup(Ff){const kh=useStore(),x_=Ff.pageKey,tAe=Ff.option,aAe=Ff.formComp,fAe=vue$1.reactive({currentValue:vue$1.computed(()=>Ff.formComp.formData[tAe.prop]||null),size:tAe.size||"small"});tAe.url&&hAe();function hAe(){let AAe=tAe.method=="POST"?"data":"params";service({url:kh.state._BASE_URL+tAe.url,[AAe]:tAe.params||{},method:tAe.method||"GET"}).then(mAe=>{tAe.options=typeof tAe.options=="function"?tAe.options(mAe):mAe[tAe.resDataKey]||mAe.items||mAe||[]}),Ff.formComp.updateStatusData=hAe}function vAe(AAe){if(fAe.currentValue!==AAe){if(aAe.formData[tAe.prop]=AAe,tAe.change){let mAe={};tAe.relation&&(mAe=getRelationComp(kh,x_,tAe.relation)),tAe.change({...aAe,...mAe})}kh.dispatch("_QUERY_LIST",{pageKey:x_,target:aAe.target})}}return{...vue$1.toRefs(fAe),changeTab:vAe}}}),SearchTab_vue_vue_type_style_index_0_scoped_50ed1da4_lang="",_hoisted_1$k={key:0,class:"header-btns step-btn"},_hoisted_2$8=["onClick"],_hoisted_3$6={key:0,class:"number"},_hoisted_4$4={key:1,class:"header-btns status-tab"},_hoisted_5$3={key:0,class:"number"};function _sfc_render$j(Ff,kh,x_,tAe,aAe,fAe){const hAe=ElButton;return Ff.option.type=="TabStep"?(vue$1.openBlock(),vue$1.createElementBlock("ul",_hoisted_1$k,[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.option.options||[],(vAe,AAe)=>{var mAe;return vue$1.openBlock(),vue$1.createElementBlock("li",{key:vAe[Ff.option.itemValue],class:vue$1.normalizeClass(["li"+AAe,Ff.currentValue==vAe[Ff.option.itemValue]?"active":""]),style:vue$1.normalizeStyle({"z-index":((mAe=Ff.option.options)==null?void 0:mAe.length)-AAe}),onClick:yAe=>Ff.changeTab(vAe[Ff.option.itemValue])},[vue$1.createTextVNode(vue$1.toDisplayString(vAe[Ff.option.itemName])+" ",1),Ff.option.itemData?(vue$1.openBlock(),vue$1.createElementBlock("span",_hoisted_3$6,vue$1.toDisplayString(vAe[Ff.option.itemData]||0),1)):vue$1.createCommentVNode("",!0)],14,_hoisted_2$8)}),128))])):(vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_4$4,[Ff.option.itemData?(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,{key:0},vue$1.renderList(Ff.option.options||[],vAe=>(vue$1.openBlock(),vue$1.createElementBlock("div",{key:vAe[Ff.option.itemValue]},[vue$1.createVNode(hAe,{type:Ff.currentValue==vAe[Ff.option.itemValue]?"primary":"info",onClick:AAe=>Ff.changeTab(vAe[Ff.option.itemValue]),size:Ff.size},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(vAe[Ff.option.itemName]),1),vAe[Ff.option.itemData]||vAe[Ff.option.itemData]==0?(vue$1.openBlock(),vue$1.createElementBlock("span",_hoisted_5$3,"("+vue$1.toDisplayString(vAe[Ff.option.itemData]||0)+")",1)):vue$1.createCommentVNode("",!0)]),_:2},1032,["type","onClick","size"])]))),128)):(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,{key:1},vue$1.renderList(Ff.option.options||[],vAe=>(vue$1.openBlock(),vue$1.createBlock(hAe,{key:vAe[Ff.option.itemValue],type:Ff.currentValue==vAe[Ff.option.itemValue]?"primary":"info",onClick:AAe=>Ff.changeTab(vAe[Ff.option.itemValue]),size:Ff.size},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(vAe[Ff.option.itemName]),1)]),_:2},1032,["type","onClick","size"]))),128))]))}const __unplugin_components_0$3=_export_sfc$1(_sfc_main$l,[["render",_sfc_render$j],["__scopeId","data-v-50ed1da4"]]),_sfc_main$k=vue$1.defineComponent({name:"Form",components:{SearchTab:__unplugin_components_0$3,uploadComp:UploadComp},props:{componentOption:{type:Object,default:()=>{}},pageKey:{type:String,default:""}},setup(Ff){const{t:kh}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),x_=useStore(),tAe=vue$1.ref(),aAe=Ff.componentOption,fAe=vue$1.reactive({open:!0,labelWidth:aAe.labelWidth||"110px",formItemWidth:aAe.formItemWidth||"180px",size:aAe.size||"small",showCloseButton:aAe.showCloseButton||!1,elementGroup:[],inline:aAe.inline!==!1,allDisabled:!1,formData:aAe.formData,row:{},loading:!1,relation:getRelationComp(x_,Ff.pageKey,aAe.relation)});aAe.getFormData=mAe,aAe.submit=bAe,aAe.reset=yAe,fAe.elementGroup=vue$1.computed(()=>aAe.elementGroup.filter(xAe=>xAe.isShow===void 0||typeof xAe.isShow=="function"&&xAe.isShow(fAe.formData,fAe.relation)));function hAe(){aAe.elementGroup.forEach(xAe=>{(xAe.type==="Select"||xAe.type==="Cascader"||xAe.type==="radioGroup"||xAe.type==="RadioGroup"||xAe.type==="RadioButton"||xAe.type==="Checkbox"||xAe.type==="CheckboxGroup")&&xAe.url&&!xAe.remote&&getSelectOption(x_,xAe,Ff.pageKey)})}function vAe(xAe,OAe){if(xAe){fAe.loading=!0;let TAe=OAe.method=="POST"?"data":"params";const BAe=typeof OAe.params=="function"?OAe.params(xAe,aAe):OAe.params;service({url:x_.state._BASE_URL+OAe.url,[TAe]:BAe||{},method:OAe.method||"GET"}).then(RAe=>{fAe.loading=!1,OAe.options=RAe[OAe.resProp]||RAe})}else OAe.options=[]}function AAe(xAe,OAe){fAe.formData[OAe.prop]=xAe,tAe.value.validateField(OAe.prop)}function mAe(){return getFormData(aAe)}function yAe(){aAe.elementGroup.forEach(xAe=>{xAe.type==="Tab"||xAe.type==="TabStep"||(fAe.formData[xAe.prop]=xAe.value),xAe.reset&&xAe.reset()}),aAe.validate&&setTimeout(()=>{tAe.value.clearValidate()})}function bAe(xAe,OAe){if(aAe.validate)tAe.value.validate(TAe=>{if(TAe){const BAe=EAe(OAe);if(BAe===!1)return;SAe(xAe,BAe)}});else{const TAe=EAe(OAe);if(TAe===!1)return;SAe(xAe,TAe)}}function EAe(xAe){if(aAe.submitBefore){const OAe=aAe.submitBefore({relation:fAe.relation,formData:aAe.formData,row:aAe.row,triggerButton:xAe});return OAe===!1?!1:OAe}return!0}function SAe(xAe,OAe){x_.commit("setLoading",!0);let TAe=aAe.method=="GET"?"params":"data";service({url:x_.state._BASE_URL+aAe.url,[TAe]:typeof OAe=="object"?OAe:aAe.formData||{},method:aAe.method||"POST"}).then(BAe=>{if(aAe.submitAfter){let RAe={};aAe.relation&&(RAe=getRelationComp(x_,Ff.pageKey,aAe.relation)),aAe.submitAfter({res:BAe,relation:RAe,formData:aAe.formData,row:aAe.row})}xAe({...fAe.formData})}).catch(BAe=>{console.log(BAe)}).finally(()=>{x_.commit("setLoading",!1)})}function DAe(){fAe.open=!fAe.open}return hAe(),{t:kh,...vue$1.toRefs(fAe),formRef:tAe,isOpen:DAe,getSelectData:hAe,remoteMethod:vAe,fileUrlInfo:AAe}}}),Form_vue_vue_type_style_index_0_scoped_1a2d553f_lang="",Form_vue_vue_type_style_index_1_lang="",_hoisted_1$j={key:0,class:"mask"};function _sfc_render$i(Ff,kh,x_,tAe,aAe,fAe){const hAe=__unplugin_components_0$3,vAe=ElInput,AAe=ElInputNumber,mAe=WangEditor,yAe=ElOption,bAe=ElSelect,EAe=ElCascader,SAe=ElRadio,DAe=ElRadioGroup,xAe=ElRadioButton,OAe=ElCheckbox,TAe=ElCheckboxGroup$1,BAe=ElDatePicker,RAe=ElTimeSelect,FAe=ElSwitch,MAe=UploadComp,$Ae=ElFormItem,LAe=__unplugin_components_17,VAe=__unplugin_components_18,zAe=ElIcon,QAe=ElForm;return vue$1.openBlock(),vue$1.createBlock(QAe,{class:vue$1.normalizeClass(["form-group",Ff.componentOption.class||""]),ref:"formRef",model:Ff.formData,size:Ff.size,inline:Ff.inline,style:vue$1.normalizeStyle(Ff.componentOption.style)},{default:vue$1.withCtx(()=>[Ff.allDisabled?(vue$1.openBlock(),vue$1.createElementBlock("div",_hoisted_1$j)):vue$1.createCommentVNode("",!0),(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.elementGroup,(GAe,qAe)=>(vue$1.openBlock(),vue$1.createBlock($Ae,{key:GAe.prop,label:GAe.label,"label-width":GAe.labelWidth||Ff.labelWidth,prop:GAe.prop||"",rules:typeof GAe.rules=="function"?GAe.rules(Ff.formData,Ff.relation):GAe.rules,class:vue$1.normalizeClass([GAe.className,!Ff.open&&qAe>4?"hide-item":""]),style:vue$1.normalizeStyle({width:GAe.width||Ff.formItemWidth,display:GAe.type==="Tab"||GAe.type==="TabStep"?"block":"",...GAe.style})},vue$1.createSlots({default:vue$1.withCtx(()=>[GAe.type==="Tab"||GAe.type==="TabStep"?(vue$1.openBlock(),vue$1.createBlock(hAe,{key:0,option:GAe,formComp:Ff.componentOption,pageKey:Ff.pageKey},null,8,["option","formComp","pageKey"])):GAe.type==="Input"?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:1,clearable:"",disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled||GAe.disable,"show-password":GAe.inputType==="password",type:GAe.inputType||"text",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,maxlength:GAe.maxlength,min:GAe.min,max:GAe.max,placeholder:GAe.placeholder,"prefix-Icon":GAe.prefixIcon||"",onKeyup:ZAe=>GAe.keyup&&GAe.keyup(Ff.formData[GAe.prop]),onClear:ZAe=>GAe.clear&&GAe.clear(Ff.formData[GAe.prop]),"data-target":Ff.componentOption.target,"data-pageKey":Ff.pageKey},null,8,["disabled","show-password","type","modelValue","onUpdate:modelValue","maxlength","min","max","placeholder","prefix-Icon","onKeyup","onClear","data-target","data-pageKey"])):vue$1.createCommentVNode("",!0),Ff.elementGroup.length===1?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:2,class:"hide-input",type:"text"})):vue$1.createCommentVNode("",!0),GAe.type==="InputNumber"?(vue$1.openBlock(),vue$1.createBlock(AAe,{key:3,clearable:"",disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,"controls-position":"right",controls:GAe.controls!==!1,min:GAe.min,max:GAe.max,placeholder:GAe.placeholder,"prefix-Icon":GAe.prefixIcon||"",onKeyup:ZAe=>GAe.keyup&&GAe.keyup(Ff.formData[GAe.prop]),onClear:ZAe=>GAe.clear&&GAe.clear(Ff.formData[GAe.prop])},null,8,["disabled","modelValue","onUpdate:modelValue","controls","min","max","placeholder","prefix-Icon","onKeyup","onClear"])):GAe.type==="Textarea"?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:4,clearable:"",type:"textarea",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,placeholder:GAe.placeholder,rows:GAe.rows||1,"show-word-limit":GAe.showWordLimit,maxlength:GAe.maxlength},null,8,["modelValue","onUpdate:modelValue","placeholder","rows","show-word-limit","maxlength"])):GAe.type==="Editor"?(vue$1.openBlock(),vue$1.createBlock(mAe,{key:5,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,mode:"simple",height:GAe.height,placeholder:GAe.placeholder,"read-only":GAe.readOnly,hideUpload:GAe.hideUpload,hideTable:GAe.hideTable,language:GAe.language},null,8,["modelValue","onUpdate:modelValue","height","placeholder","read-only","hideUpload","hideTable","language"])):GAe.type==="Select"&&!GAe.remote?(vue$1.openBlock(),vue$1.createBlock(bAe,{key:6,clearable:GAe.clearable!==!1,filterable:GAe.filterable,placeholder:GAe.placeholder,multiple:GAe.multiple===!0,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),onVisibleChange:ZAe=>{GAe.visibleChange&&GAe.visibleChange(ZAe,{formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe})},disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,"collapse-tags":GAe.collapseTags,"collapse-tags-tooltip":GAe.collapseTagsTooltip},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(yAe,{label:typeof GAe.itemName=="function"?GAe.itemName(ZAe):ZAe[GAe.itemName||"label"],value:typeof GAe.itemValue=="function"?GAe.itemValue(ZAe):ZAe[GAe.itemValue||"value"],key:ZAe.value,disabled:ZAe.disabled,onClick:rme=>GAe.optionClick&&GAe.optionClick({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:ZAe})},null,8,["label","value","disabled","onClick"]))),128))]),_:2},1032,["clearable","filterable","placeholder","multiple","modelValue","onUpdate:modelValue","onChange","onVisibleChange","disabled","collapse-tags","collapse-tags-tooltip"])):vue$1.createCommentVNode("",!0),GAe.type==="Select"&&GAe.remote?(vue$1.openBlock(),vue$1.createBlock(bAe,{key:7,clearable:GAe.clearable!==!1,filterable:"","reserve-keyword":"",placeholder:GAe.placeholder,multiple:GAe.multiple===!0,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,"collapse-tags":GAe.collapseTags,"collapse-tags-tooltip":GAe.collapseTagsTooltip,remote:"","remote-method":ZAe=>{Ff.remoteMethod(ZAe,GAe)},loading:Ff.loading},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(yAe,{label:typeof GAe.itemName=="function"?GAe.itemName(ZAe):ZAe[GAe.itemName||"label"],value:typeof GAe.itemValue=="function"?GAe.itemValue(ZAe):ZAe[GAe.itemValue||"value"],key:ZAe.value,disabled:ZAe.disabled,onClick:rme=>GAe.optionClick&&GAe.optionClick({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:ZAe})},null,8,["label","value","disabled","onClick"]))),128))]),_:2},1032,["clearable","placeholder","multiple","modelValue","onUpdate:modelValue","onChange","disabled","collapse-tags","collapse-tags-tooltip","remote-method","loading"])):GAe.type==="Cascader"?(vue$1.openBlock(),vue$1.createBlock(EAe,{key:8,clearable:"",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,options:GAe.options,props:GAe.props,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),placeholder:GAe.placeholder},vue$1.createSlots({_:2},[GAe.slot?{name:"default",fn:vue$1.withCtx(({data:ZAe})=>[vue$1.renderSlot(Ff.$slots,GAe.slot,{data:ZAe},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","options","props","onChange","placeholder"])):(GAe.type==="RadioGroup"||GAe.type==="radioGroup")&&GAe.optionClick?(vue$1.openBlock(),vue$1.createBlock(DAe,{key:9,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(SAe,{key:ZAe[GAe.itemValue||"value"],label:ZAe[GAe.itemValue||"value"],style:vue$1.normalizeStyle(GAe.itemStyle),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled,onClick:vue$1.withModifiers(rme=>GAe.optionClick&&GAe.optionClick({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:ZAe}),["prevent"])},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe[GAe.itemName||"label"]),1)]),_:2},1032,["label","style","disabled","onClick"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled"])):GAe.type==="RadioGroup"||GAe.type==="radioGroup"?(vue$1.openBlock(),vue$1.createBlock(DAe,{key:10,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe}),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.options,ZAe=>(vue$1.openBlock(),vue$1.createBlock(SAe,{key:ZAe[GAe.itemValue||"value"],label:ZAe[GAe.itemValue||"value"],style:vue$1.normalizeStyle(GAe.itemStyle),disabled:typeof GAe.disabled=="function"?GAe.disabled(Ff.formData,Ff.relation):GAe.disabled},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe[GAe.itemName||"label"]),1)]),_:2},1032,["label","style","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled"])):GAe.type==="RadioButton"?(vue$1.openBlock(),vue$1.createBlock(DAe,{key:11,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,onChange:ZAe=>GAe.change&&GAe.change({formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe})},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.radios,ZAe=>(vue$1.openBlock(),vue$1.createBlock(xAe,{label:ZAe.value,key:ZAe.value},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe.label),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):GAe.type==="Checkbox"||GAe.type==="CheckboxGroup"?(vue$1.openBlock(),vue$1.createBlock(TAe,{key:12,class:vue$1.normalizeClass(GAe.className),modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe},{default:vue$1.withCtx(()=>[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(GAe.checkboxs,ZAe=>(vue$1.openBlock(),vue$1.createBlock(OAe,{label:ZAe.value,key:ZAe.value},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(ZAe.label),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["class","modelValue","onUpdate:modelValue"])):GAe.type==="Year"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:13,type:"year",placeholder:GAe.placeholder,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,clearable:GAe.clearable!==!1,disabled:GAe.disabled,"value-format":GAe.valueFormat},null,8,["placeholder","modelValue","onUpdate:modelValue","clearable","disabled","value-format"])):GAe.type==="Date"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:14,type:GAe.dateType||"date",placeholder:GAe.placeholder,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,clearable:GAe.clearable!==!1,"value-format":GAe.valueFormat,disabled:GAe.disabled,"disabled-date":ZAe=>GAe.disabledDate&&GAe.disabledDate({time:ZAe,formComp:Ff.componentOption,value:Ff.formData[GAe.prop],option:GAe})},null,8,["type","placeholder","modelValue","onUpdate:modelValue","clearable","value-format","disabled","disabled-date"])):GAe.type==="Daterange"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:15,type:"daterange","start-placeholder":GAe.startPlaceholder,"end-placeholder":GAe.endPlaceholder,"range-separator":" - ",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,"disabled-date":GAe.disabledDate,shortcuts:GAe.shortcuts,"value-format":GAe.valueFormat},null,8,["start-placeholder","end-placeholder","modelValue","onUpdate:modelValue","disabled-date","shortcuts","value-format"])):GAe.type==="Datetimerange"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:16,type:"datetimerange","start-placeholder":GAe.startPlaceholder,"end-placeholder":GAe.endPlaceholder,"range-separator":" - ",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,"disabled-date":GAe.disabledDate,shortcuts:GAe.shortcuts,"value-format":GAe.valueFormat},null,8,["start-placeholder","end-placeholder","modelValue","onUpdate:modelValue","disabled-date","shortcuts","value-format"])):GAe.type==="Time"?(vue$1.openBlock(),vue$1.createBlock(RAe,{key:17,placeholder:GAe.placeholder,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,type:""},null,8,["placeholder","modelValue","onUpdate:modelValue"])):GAe.type==="DateTime"?(vue$1.openBlock(),vue$1.createBlock(BAe,{key:18,placeholder:GAe.placeholder,type:"datetime",modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe,disabled:GAe.disable,"disabled-date":GAe.disabledDate},null,8,["placeholder","modelValue","onUpdate:modelValue","disabled","disabled-date"])):GAe.type==="Switch"?(vue$1.openBlock(),vue$1.createBlock(FAe,{key:19,modelValue:Ff.formData[GAe.prop],"onUpdate:modelValue":ZAe=>Ff.formData[GAe.prop]=ZAe},null,8,["modelValue","onUpdate:modelValue"])):GAe.type==="upload"?(vue$1.openBlock(),vue$1.createBlock(MAe,{key:20,style:vue$1.normalizeStyle({"text-align":GAe.textAlign||"center"}),revisionImg:!0,name:"upload",isDraggable:GAe.isDraggable,uploadObj:{defaultfilelist:Ff.formData[GAe.prop]},onFileUrlInfo:ZAe=>Ff.fileUrlInfo(ZAe,GAe),onChange:(ZAe,rme)=>GAe.change&&GAe.change({formComp:Ff.componentOption,fileList:rme,file:ZAe,option:GAe}),onRemove:ZAe=>GAe.remove&&GAe.remove({formComp:Ff.componentOption,file:ZAe,option:GAe}),listType:GAe.listType||"picture-card",ref_for:!0,ref:"uploadComp",fileUrl:GAe.fileUrl,limit:GAe.limit,maxSize:GAe.maxSize,format:GAe.format,text:GAe.text,tip:GAe.tip,multiple:GAe.multiple,disabled:GAe.disabled,drag:GAe.drag,autoUpload:GAe.autoUpload},null,8,["style","isDraggable","uploadObj","onFileUrlInfo","onChange","onRemove","listType","fileUrl","limit","maxSize","format","text","tip","multiple","disabled","drag","autoUpload"])):vue$1.createCommentVNode("",!0),GAe.slot&&!GAe.labelSlot?vue$1.renderSlot(Ff.$slots,GAe.slot,{key:21,data:Ff.formData},void 0,!0):vue$1.createCommentVNode("",!0)]),_:2},[GAe.labelSlot?{name:"label",fn:vue$1.withCtx(()=>[vue$1.renderSlot(Ff.$slots,GAe.slot,{data:Ff.formData},void 0,!0)]),key:"0"}:void 0]),1032,["label","label-width","prop","rules","class","style"]))),128)),vue$1.renderSlot(Ff.$slots,"default",{},void 0,!0),Ff.elementGroup.length>4&&Ff.showCloseButton?(vue$1.openBlock(),vue$1.createElementBlock("span",{key:1,onClick:kh[0]||(kh[0]=(...GAe)=>Ff.isOpen&&Ff.isOpen(...GAe)),class:"form-move-search"},[vue$1.createTextVNode(vue$1.toDisplayString(Ff.open?Ff.t("收起"):Ff.t("展开"))+" ",1),vue$1.createVNode(zAe,null,{default:vue$1.withCtx(()=>[vue$1.withDirectives(vue$1.createVNode(LAe,null,null,512),[[vue$1.vShow,Ff.open]]),vue$1.withDirectives(vue$1.createVNode(VAe,null,null,512),[[vue$1.vShow,!Ff.open]])]),_:1})])):vue$1.createCommentVNode("",!0)]),_:3},8,["class","model","size","inline","style"])}const Form=_export_sfc$1(_sfc_main$k,[["render",_sfc_render$i],["__scopeId","data-v-1a2d553f"]]),_sfc_main$j=vue$1.defineComponent({name:"Upload",props:{url:String,text:{type:String,default:""},disabled:{type:Boolean,default:!1},buttonType:{type:String,default:"success"},type:{type:String,default:"button"},accept:{type:String,default:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf"},style:{type:Object,default:{}},params:{type:Object,default:{}},beforeUploadValidate:{type:Function,default:()=>!0},size:{type:String,default:"small"}},emits:["onSuccess","onError"],setup(Ff,kh){const{t:x_}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),tAe=useStore(),aAe=vue$1.ref(),fAe=vue$1.reactive({uploadUrl:vue$1.computed(()=>handleProxy(tAe.state._BASE_URL+Ff.url))}),hAe=vue$1.ref(!1),vAe=getRequestHeaders(fAe.uploadUrl);async function AAe(){if(Ff.disabled)return;const EAe=Ff.beforeUploadValidate();(EAe==null?void 0:EAe.toString())==="[object Promise]"?EAe.then(SAe=>{SAe&&aAe.value.ref.click()}):EAe&&aAe.value.ref.click()}function mAe(){hAe.value=!0,tAe.commit("setLoading",!0)}function yAe(EAe){EAe.code==0?(ElMessage.success(EAe.msg||x_("上传成功")),kh.emit("onSuccess",EAe)):(ElMessage.error(EAe.msg),kh.emit("onError",EAe)),hAe.value=!1,tAe.commit("setLoading",!1)}function bAe(EAe){const SAe=EAe.toString(),DAe=new RegExp('"msg":"(.*?)(?<!\\\\)"'),xAe=SAe.match(DAe);xAe&&ElMessage.error(xAe[1]),hAe.value=!1,tAe.commit("setLoading",!1),kh.emit("onError",EAe)}return{...vue$1.toRefs(fAe),uploadButtonRef:aAe,headers:vAe,uploading:hAe,validate:AAe,beforeUpload:mAe,uploadSuccess:yAe,uploadError:bAe}}});function _sfc_render$h(Ff,kh,x_,tAe,aAe,fAe){const hAe=ElButton,vAe=ElUpload;return vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,null,[vue$1.createVNode(vAe,{style:{display:"inline-flex"},action:Ff.uploadUrl,accept:Ff.accept,"with-credentials":!0,multiple:"","show-file-list":!1,"before-upload":Ff.beforeUpload,"on-success":Ff.uploadSuccess,"on-error":Ff.uploadError,disabled:Ff.uploading,headers:Ff.headers,data:Ff.params},{default:vue$1.withCtx(()=>[vue$1.createVNode(hAe,{ref:"uploadButtonRef",style:{display:"none"},size:Ff.size,type:Ff.buttonType,loading:Ff.uploading},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.text),1)]),_:1},8,["size","type","loading"])]),_:1},8,["action","accept","before-upload","on-success","on-error","disabled","headers","data"]),Ff.type==="text"?(vue$1.openBlock(),vue$1.createElementBlock("span",{key:0,class:vue$1.normalizeClass(["dfs-text-btn",{disabled:Ff.disabled}]),style:vue$1.normalizeStyle(Ff.style),onClick:kh[0]||(kh[0]=(...AAe)=>Ff.validate&&Ff.validate(...AAe))},vue$1.toDisplayString(Ff.text),7)):(vue$1.openBlock(),vue$1.createBlock(hAe,{key:1,onClick:Ff.validate,disabled:Ff.disabled,size:Ff.size,type:Ff.buttonType},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.text),1)]),_:1},8,["onClick","disabled","size","type"]))],64)}const Upload=_export_sfc$1(_sfc_main$j,[["render",_sfc_render$h]]),_sfc_main$i=vue$1.defineComponent({name:"ButtonGroup",components:{Upload},props:{pageKey:{type:String,default:""},componentOption:{type:Object,default:()=>{}}},setup(Ff){const{t:kh}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),x_=vue$1.reactive({buttonGroup:vue$1.computed(()=>Ff.componentOption.elementGroup.filter(xAe=>{if(typeof xAe.isShow=="function")if(xAe.relation){const OAe=getRelationComp(store,Ff.pageKey,xAe.relation);return xAe.isShow(OAe)}else return xAe.isShow();return xAe.isShow===void 0||xAe.isShow})),size:Ff.componentOption.size||"default"});function tAe(xAe){switch(xAe.event){case"query":fAe(xAe.target);break;case"reset":hAe(xAe);break;case"export":mAe(xAe);break;case"download":vAe(xAe);break;case"exportByFront":AAe(xAe);break;case"dialog":yAe(xAe);break;case"cancel":bAe(xAe.restTarget||xAe.target);break;case"submit":EAe(xAe);break;default:aAe(xAe)}}function aAe(xAe){let OAe={};xAe.relation&&(OAe=getRelationComp(store,Ff.pageKey,xAe.relation)),xAe.handleClick&&xAe.handleClick(OAe)}function fAe(xAe,OAe){store.dispatch("_QUERY_LIST",{pageKey:Ff.pageKey,target:xAe,partialUpdate:OAe})}function hAe(xAe){getTargetComp(store,Ff.pageKey,xAe.target).reset(),xAe.queryTarget&&fAe(xAe.queryTarget)}function vAe(xAe){xAe.url.indexOf("https://")>-1?window.open(xAe.url,"_blank"):downLoadData({url:store.state._BASE_URL+xAe.url,fileName:xAe.fileName||"",method:xAe.method,store})}function AAe(xAe){if(!xAe.target)return ElMessage.warning("请设置'target'字段,指定需要导出的table数据");const OAe=getTargetComp(store,Ff.pageKey,xAe.target);let TAe={fileName:kh(xAe.fileName),columnKeys:xAe.columnKeys||OAe.columns.map(BAe=>BAe.field)};OAe.gridApi.exportDataAsCsv(TAe)}function mAe(xAe){if(xAe.beforeExport){let RAe={};if(xAe.relation&&(RAe=getRelationComp(store,Ff.pageKey,xAe.relation)),xAe.beforeExport(RAe)===!1)return}const OAe=getTargetComp(store,Ff.pageKey,xAe.target);if(!OAe.data.totalNum)return ElMessage.warning(kh("无可导出数据,请查询后导出"));let TAe=null,BAe={...OAe.formData||{},...OAe.params||{},...OAe.pageInfo||{}};if(OAe.dependencies&&(TAe=getTargetComp(store,Ff.pageKey,OAe.dependencies),BAe={...getFormData(TAe),...BAe}),OAe.exportBySelectionData){const RAe=OAe.exportBySelectionData(OAe.selectedRows);Array.isArray(RAe)?BAe=RAe:RAe&&(BAe={...BAe,...RAe})}if(xAe.openDownloadCenter){let RAe=(xAe.method||"post").toUpperCase(),FAe=RAe=="GET"?"params":"data";service({url:store.state._BASE_URL+xAe.url,[FAe]:{taskParam:BAe},method:RAe}).then(MAe=>{store.commit("setUploadDownloadDialogVisible",!0)})}else{const RAe={url:store.state._BASE_URL+xAe.url,fileName:xAe.fileName,method:xAe.method,params:BAe,store};downLoadData(RAe)}}function yAe(xAe){if(xAe.showDialogBefore){let TAe={};if(xAe.relation&&(TAe=getRelationComp(store,Ff.pageKey,xAe.relation)),xAe.showDialogBefore(TAe)===!1)return}const OAe=store.getters._GET_DIALOGREF(Ff.pageKey);OAe.option=xAe,OAe.showDialog()}function bAe(xAe){const OAe=store.getters._GET_DIALOGREF(Ff.pageKey);if(OAe)OAe.closeDialog();else if(xAe){const TAe=getTargetComp(store,Ff.pageKey,xAe);TAe.reset&&TAe.reset()}}function EAe(xAe){getTargetComp(store,Ff.pageKey,xAe.target).submit(TAe=>{bAe(xAe.target),ElMessage.success(kh("操作成功")),xAe.queryTarget&&fAe(xAe.queryTarget,xAe.partialUpdate)},xAe)}function SAe(xAe,OAe){OAe.queryTarget&&fAe(OAe.queryTarget),OAe.onSuccess&&OAe.onSuccess(xAe),OAe.openDownloadCenter&&store.commit("setUploadDownloadDialogVisible",!0)}function DAe(xAe,OAe){OAe.onError&&OAe.onError(xAe),OAe.openDownloadCenter&&store.commit("setUploadDownloadDialogVisible",!0)}return{...vue$1.toRefs(x_),handleClick:tAe,download:vAe,queryData:fAe,uploadSuccess:SAe,onError:DAe}}}),ButtonGroup_vue_vue_type_style_index_0_scoped_40aa0228_lang="",ButtonGroup_vue_vue_type_style_index_1_lang="",_hoisted_1$i=["onClick"];function _sfc_render$g(Ff,kh,x_,tAe,aAe,fAe){const hAe=Upload,vAe=ElIcon,AAe=ElButton;return vue$1.openBlock(),vue$1.createElementBlock("div",{class:"button-group",style:vue$1.normalizeStyle(Ff.componentOption.style)},[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.buttonGroup,mAe=>(vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,{key:mAe.text},[mAe.slot?vue$1.renderSlot(Ff.$slots,mAe.slot,{key:1},void 0,!0):(vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,{key:0},[mAe.event==="upload"?(vue$1.openBlock(),vue$1.createBlock(hAe,{key:0,url:mAe.url,text:mAe.text,onOnSuccess:yAe=>Ff.uploadSuccess(yAe,mAe),onOnError:yAe=>Ff.onError(yAe,mAe),buttonType:mAe.buttonType,type:mAe.type,style:vue$1.normalizeStyle(mAe.style),size:Ff.size},null,8,["url","text","onOnSuccess","onOnError","buttonType","type","style","size"])):(vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,{key:1},[mAe.type==="text"?(vue$1.openBlock(),vue$1.createElementBlock("span",{key:0,class:"dfs-text-btn",style:vue$1.normalizeStyle(mAe.style),onClick:yAe=>Ff.handleClick(mAe)},[mAe.icon?(vue$1.openBlock(),vue$1.createBlock(vAe,{key:0},{default:vue$1.withCtx(()=>[(vue$1.openBlock(),vue$1.createBlock(vue$1.resolveDynamicComponent(mAe.icon),{color:mAe.iconColor||"red"},null,8,["color"]))]),_:2},1024)):vue$1.createCommentVNode("",!0),vue$1.createTextVNode(" "+vue$1.toDisplayString(mAe.text),1)],12,_hoisted_1$i)):(vue$1.openBlock(),vue$1.createBlock(AAe,{key:1,style:vue$1.normalizeStyle(mAe.style),type:mAe.buttonType||"primary",size:Ff.size,onClick:yAe=>Ff.handleClick(mAe),disabled:mAe.disabled&&mAe.disabled()},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(mAe.text),1)]),_:2},1032,["style","type","size","onClick","disabled"]))],64))],64))],64))),128)),vue$1.renderSlot(Ff.$slots,"default",{},void 0,!0)],4)}const ButtonGroup=_export_sfc$1(_sfc_main$i,[["render",_sfc_render$g],["__scopeId","data-v-40aa0228"]]),_sfc_main$h=vue$1.defineComponent({props:{gridApi:{type:Object,default:{}},storageColumnsKey:{type:String,default:""},columnDefs:{type:Array,default:[]},columnUpdate:{type:Number,default:0}},setup(Ff){const{t:kh}=vue$1.getCurrentInstance().appContext.config.globalProperties.useI18n(),x_=vue$1.ref(),tAe=vue$1.reactive({show:!1,left:"",top:"",bottom:"auto",columns:[]});vue$1.watch(()=>Ff.columnUpdate,()=>{tAe.columns=Ff.columnDefs.map(mAe=>({...mAe,show:!mAe.hide}))}),tAe.columns=Ff.columnDefs.map(mAe=>({...mAe,show:!mAe.hide}));function aAe(){tAe.columns.forEach(yAe=>{yAe.hide=!yAe.show}),hAe(tAe.columns);const mAe=tAe.columns.map(yAe=>({field:yAe.field,headerName:yAe.headerName,width:yAe.width,minWidth:yAe.minWidth,hide:yAe.hide}));localStorage.setItem(Ff.storageColumnsKey,JSON.stringify(mAe))}function fAe(){tAe.columns.forEach(mAe=>{mAe.rowGroup?(mAe.hide=!0,mAe.show=!1):(mAe.hide=!1,mAe.show=!0)}),hAe(tAe.columns),localStorage.removeItem(Ff.storageColumnsKey)}function hAe(mAe){Ff.gridApi.setColumnDefs(mAe),tAe.show=!1}function vAe(){tAe.show=!1}function AAe(){Ff.storageColumnsKey&&(setTimeout(()=>{const mAe=document.querySelector(`.${Ff.storageColumnsKey} .ag-header`);mAe&&(mAe.oncontextmenu=yAe=>{tAe.left=yAe.pageX+"px",tAe.top=yAe.pageY+"px",setTimeout(()=>{tAe.show=!0,vue$1.nextTick(()=>{const bAe=x_.value.clientHeight,EAe=document.documentElement.clientHeight;bAe+20>EAe-yAe.pageY&&(tAe.top="auto",tAe.bottom="10px")})}),yAe.preventDefault()})},1e3),document.removeEventListener("click",vAe,!1),document.removeEventListener("contextmenu",vAe,!1),document.addEventListener("click",vAe,!1),document.addEventListener("contextmenu",vAe,!1))}return AAe(),vue$1.onActivated(()=>{AAe()}),{t:kh,elColumnCheckedPanel:x_,...vue$1.toRefs(tAe),confirm:aAe,reset:fAe}}}),ColumnCheck_vue_vue_type_style_index_0_lang="",_hoisted_1$h={class:"header-checked-header"},_hoisted_2$7={class:"header-checked-body"},_hoisted_3$5={class:"header-checked-footer"};function _sfc_render$f(Ff,kh,x_,tAe,aAe,fAe){const hAe=ElCheckbox,vAe=ElButton;return vue$1.withDirectives((vue$1.openBlock(),vue$1.createElementBlock("div",{ref:"elColumnCheckedPanel",style:vue$1.normalizeStyle({left:Ff.left,top:Ff.top,bottom:Ff.bottom}),class:"header-checked",onClick:kh[0]||(kh[0]=vue$1.withModifiers(()=>{},["stop"]))},[vue$1.createElementVNode("p",_hoisted_1$h,vue$1.toDisplayString(Ff.t("自定义显示字段")),1),vue$1.createElementVNode("div",_hoisted_2$7,[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.columns,(AAe,mAe)=>vue$1.withDirectives((vue$1.openBlock(),vue$1.createBlock(hAe,{key:AAe.headerName+mAe,modelValue:AAe.show,"onUpdate:modelValue":yAe=>AAe.show=yAe,label:AAe.headerName},null,8,["modelValue","onUpdate:modelValue","label"])),[[vue$1.vShow,AAe.headerName!==" "]])),128))]),vue$1.createElementVNode("div",_hoisted_3$5,[vue$1.createVNode(vAe,{type:"default",size:"small",onClick:Ff.reset,style:{"margin-right":"4px"}},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("还原")),1)]),_:1},8,["onClick"]),vue$1.createVNode(vAe,{type:"primary",size:"small",onClick:Ff.confirm},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("确定")),1)]),_:1},8,["onClick"])])],4)),[[vue$1.vShow,Ff.show]])}const __unplugin_components_2$1=_export_sfc$1(_sfc_main$h,[["render",_sfc_render$f]]),elConfigProvider="",elPagination="";var main={};/**
|
|
260
260
|
* vue-class-component v8.0.0-rc.1
|
|
261
261
|
* (c) 2015-present Evan You
|
|
262
262
|
* @license MIT
|