import{d as Pn,v as Nn,r as Kt,u as Rn,C as Fn,I as _t,a as Qt,b as Mn,B as Dt,h as Y,D as Bn,o as C,c as W,z as wt,l as x,m as v,w as y,x as B,F as Ee,e as xe,t as qe,f as q,V as Vn,j as Ae,a4 as Et,ac as Ln,R as Xn,a3 as Un,A as Zt,L as Yn,ad as qn,X as Jt,Y as en,E as et,W as tn,S as tt,q as nt,Z as jn,$ as $n,U as zn}from"./index-3679850f.js";import{_ as Hn,a as Wn}from"./vueFile.vue_vue_type_script_setup_true_lang-604207ac.js";import{_ as Gn}from"./aceDrawer.vue_vue_type_script_setup_true_lang-7e84294c.js";/**! * Sortable 1.15.0 * @author RubaXa * @author owenm * @license MIT */function nn(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),t.push.apply(t,n)}return t}function he(o){for(var e=1;e=0)&&(t[i]=o[i]);return t}function Zn(o,e){if(o==null)return{};var t=Qn(o,e),n,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(o,n)&&(t[n]=o[n])}return t}var Jn="1.15.0";function be(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var ye=be(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ze=be(/Edge/i),on=be(/firefox/i),He=be(/safari/i)&&!be(/chrome/i)&&!be(/android/i),fn=be(/iP(ad|od|hone)/i),pn=be(/chrome/i)&&be(/android/i),hn={capture:!1,passive:!1};function O(o,e,t){o.addEventListener(e,t,!ye&&hn)}function T(o,e,t){o.removeEventListener(e,t,!ye&&hn)}function ft(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function eo(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function fe(o,e,t,n){if(o){t=t||document;do{if(e!=null&&(e[0]===">"?o.parentNode===t&&ft(o,e):ft(o,e))||n&&o===t)return o;if(o===t)break}while(o=eo(o))}return null}var an=/\s+/g;function te(o,e,t){if(o&&e)if(o.classList)o.classList[t?"add":"remove"](e);else{var n=(" "+o.className+" ").replace(an," ").replace(" "+e+" "," ");o.className=(n+(t?" "+e:"")).replace(an," ")}}function m(o,e,t){var n=o&&o.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function Xe(o,e){var t="";if(typeof o=="string")t=o;else do{var n=m(o,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function gn(o,e,t){if(o){var n=o.getElementsByTagName(e),i=0,r=n.length;if(t)for(;i=r:a=i<=r,!a)return n;if(n===pe())break;n=Ce(n,!1)}return!1}function Ue(o,e,t,n){for(var i=0,r=0,a=o.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,r=Zn(n,so);Je.pluginEvent.bind(b)(e,t,he({dragEl:d,parentEl:N,ghostEl:_,rootEl:A,nextEl:Re,lastDownEl:st,cloneEl:P,cloneHidden:Te,dragStarted:je,putSortable:j,activeSortable:b.active,originalEvent:i,oldIndex:Le,oldDraggableIndex:Ge,newIndex:ne,newDraggableIndex:Se,hideGhostForTarget:wn,unhideGhostForTarget:En,cloneNowHidden:function(){Te=!0},cloneNowShown:function(){Te=!1},dispatchSortableEvent:function(l){G({sortable:t,name:l,originalEvent:i})}},r))};function G(o){lo(he({putSortable:j,cloneEl:P,targetEl:d,rootEl:A,oldIndex:Le,oldDraggableIndex:Ge,newIndex:ne,newDraggableIndex:Se},o))}var d,N,_,A,Re,st,P,Te,Le,ne,Ge,Se,ot,j,Ve=!1,pt=!1,ht=[],Pe,ue,Ct,kt,sn,un,je,Be,Ke,Qe=!1,at=!1,ut,$,Ot=[],Nt=!1,gt=[],bt=typeof document<"u",it=fn,cn=Ze||ye?"cssFloat":"float",uo=bt&&!pn&&!fn&&"draggable"in document.createElement("div"),yn=function(){if(bt){if(ye)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),_n=function(e,t){var n=m(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=Ue(e,0,t),a=Ue(e,1,t),l=r&&m(r),u=a&&m(a),c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+L(r).width,g=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+L(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var p=l.float==="left"?"left":"right";return a&&(u.clear==="both"||u.clear===p)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||c>=i&&n[cn]==="none"||a&&n[cn]==="none"&&c+g>i)?"vertical":"horizontal"},co=function(e,t,n){var i=n?e.left:e.top,r=n?e.right:e.bottom,a=n?e.width:e.height,l=n?t.left:t.top,u=n?t.right:t.bottom,c=n?t.width:t.height;return i===l||r===u||i+a/2===l+c/2},fo=function(e,t){var n;return ht.some(function(i){var r=i[oe].options.emptyInsertThreshold;if(!(!r||Bt(i))){var a=L(i),l=e>=a.left-r&&e<=a.right+r,u=t>=a.top-r&&t<=a.bottom+r;if(l&&u)return n=i}}),n},Dn=function(e){function t(r,a){return function(l,u,c,g){var p=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(r==null&&(a||p))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return t(r(l,u,c,g),a)(l,u,c,g);var D=(a?l:u).options.group.name;return r===!0||typeof r=="string"&&r===D||r.join&&r.indexOf(D)>-1}}var n={},i=e.group;(!i||lt(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},wn=function(){!yn&&_&&m(_,"display","none")},En=function(){!yn&&_&&m(_,"display","")};bt&&!pn&&document.addEventListener("click",function(o){if(pt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),pt=!1,!1},!0);var Ne=function(e){if(d){e=e.touches?e.touches[0]:e;var t=fo(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[oe]._onDragOver(n)}}},po=function(e){d&&d.parentNode[oe]._isOutsideThisEl(e.target)};function b(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=ve({},e),o[oe]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _n(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:b.supportPointer!==!1&&"PointerEvent"in window&&!He,emptyInsertThreshold:5};Je.initializePlugins(this,o,t);for(var n in t)!(n in e)&&(e[n]=t[n]);Dn(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:uo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?O(o,"pointerdown",this._onTapStart):(O(o,"mousedown",this._onTapStart),O(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(o,"dragover",this),O(o,"dragenter",this)),ht.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ve(this,ao())}b.prototype={constructor:b,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Be=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,r=i.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,g=i.filter;if(Do(n),!d&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||i.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&He&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=fe(u,i.draggable,n,!1),!(u&&u.animated)&&st!==u)){if(Le=ie(u),Ge=ie(u,i.draggable),typeof g=="function"){if(g.call(this,e,u,this)){G({sortable:t,rootEl:c,name:"filter",targetEl:u,toEl:n,fromEl:n}),K("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(g&&(g=g.split(",").some(function(p){if(p=fe(c,p.trim(),n,!1),p)return G({sortable:t,rootEl:p,name:"filter",targetEl:u,fromEl:n,toEl:n}),K("filter",t,{evt:e}),!0}),g)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!fe(c,i.handle,n,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,t,n){var i=this,r=i.el,a=i.options,l=r.ownerDocument,u;if(n&&!d&&n.parentNode===r){var c=L(n);if(A=r,d=n,N=d.parentNode,Re=d.nextSibling,st=n,ot=a.group,b.dragged=d,Pe={target:d,clientX:(t||e).clientX,clientY:(t||e).clientY},sn=Pe.clientX-c.left,un=Pe.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,d.style["will-change"]="all",u=function(){if(K("delayEnded",i,{evt:e}),b.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!on&&i.nativeDraggable&&(d.draggable=!0),i._triggerDragStart(e,t),G({sortable:i,name:"choose",originalEvent:e}),te(d,a.chosenClass,!0)},a.ignore.split(",").forEach(function(g){gn(d,g.trim(),It)}),O(l,"dragover",Ne),O(l,"mousemove",Ne),O(l,"touchmove",Ne),O(l,"mouseup",i._onDrop),O(l,"touchend",i._onDrop),O(l,"touchcancel",i._onDrop),on&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),K("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ze||ye))){if(b.eventCanceled){this._onDrop();return}O(l,"mouseup",i._disableDelayedDrag),O(l,"touchend",i._disableDelayedDrag),O(l,"touchcancel",i._disableDelayedDrag),O(l,"mousemove",i._delayedDragTouchMoveHandler),O(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&O(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,a.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&It(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;T(e,"mouseup",this._disableDelayedDrag),T(e,"touchend",this._disableDelayedDrag),T(e,"touchcancel",this._disableDelayedDrag),T(e,"mousemove",this._delayedDragTouchMoveHandler),T(e,"touchmove",this._delayedDragTouchMoveHandler),T(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):t?O(document,"touchmove",this._onTouchMove):O(document,"mousemove",this._onTouchMove):(O(d,"dragend",this),O(A,"dragstart",this._onDragStart));try{document.selection?ct(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Ve=!1,A&&d){K("dragStarted",this,{evt:t}),this.nativeDraggable&&O(document,"dragover",po);var n=this.options;!e&&te(d,n.dragClass,!1),te(d,n.ghostClass,!0),b.active=this,e&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ue){this._lastX=ue.clientX,this._lastY=ue.clientY,wn();for(var e=document.elementFromPoint(ue.clientX,ue.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ue.clientX,ue.clientY),e!==t);)t=e;if(d.parentNode[oe]._isOutsideThisEl(e),t)do{if(t[oe]){var n=void 0;if(n=t[oe]._onDragOver({clientX:ue.clientX,clientY:ue.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);En()}},_onTouchMove:function(e){if(Pe){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=_&&Xe(_,!0),l=_&&a&&a.a,u=_&&a&&a.d,c=it&&$&&ln($),g=(r.clientX-Pe.clientX+i.x)/(l||1)+(c?c[0]-Ot[0]:0)/(l||1),p=(r.clientY-Pe.clientY+i.y)/(u||1)+(c?c[1]-Ot[1]:0)/(u||1);if(!b.active&&!Ve){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(G({rootEl:N,name:"add",toEl:N,fromEl:A,originalEvent:e}),G({sortable:this,name:"remove",toEl:N,originalEvent:e}),G({rootEl:N,name:"sort",toEl:N,fromEl:A,originalEvent:e}),G({sortable:this,name:"sort",toEl:N,originalEvent:e})),j&&j.save()):ne!==Le&&ne>=0&&(G({sortable:this,name:"update",toEl:N,originalEvent:e}),G({sortable:this,name:"sort",toEl:N,originalEvent:e})),b.active&&((ne==null||ne===-1)&&(ne=Le,Se=Ge),G({sortable:this,name:"end",toEl:N,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){K("nulling",this),A=d=N=_=Re=P=st=Te=Pe=ue=je=ne=Se=Le=Ge=Be=Ke=j=ot=b.dragged=b.ghost=b.clone=b.active=null,gt.forEach(function(e){e.checked=!0}),gt.length=Ct=kt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),ho(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,r=n.length,a=this.options;in.right+i||o.clientX<=n.right&&o.clientY>n.bottom&&o.clientX>=n.left:o.clientX>n.right&&o.clientY>n.top||o.clientX<=n.right&&o.clientY>n.bottom+i}function vo(o,e,t,n,i,r,a,l){var u=n?o.clientY:o.clientX,c=n?t.height:t.width,g=n?t.top:t.left,p=n?t.bottom:t.right,D=!1;if(!a){if(l&&utg+c*r/2:up-ut)return-Ke}else if(u>g+c*(1-i)/2&&up-c*r/2)?u>g+c/2?1:-1:0}function yo(o){return ie(d){l.visible=!1,l.content="",l.codeType="",l.title=""},g=Qt(()=>{var f,s,h,F,ee,De,Ie,Fe;return[{label:"所属表单",placeholder:"请选择所属表单",value:parseInt(a.formId)||"",key:"formId",type:"select",options:a.formList,clearable:!0},{label:"数据列表名称",placeholder:"保存的数据列表名称",value:a.name,key:"name"},{label:"数据添加编辑打开方式",placeholder:"默认新页面打开",value:(f=a.tableData.config)==null?void 0:f.openType,type:"select",options:[{label:"弹窗",value:"dialog"},{label:"新页面",value:"page"}],key:"openType",path:"config",clearable:!0},{label:"窗口宽度",placeholder:"弹窗宽度",value:(s=a.tableData.config)==null?void 0:s.dialogWidth,type:"input",key:"dialogWidth",path:"config",hide:((h=a.tableData.config)==null?void 0:h.openType)!=="dialog"},{label:"横向滚动固定在底部",value:(F=a.tableData.config)==null?void 0:F.fixedBottomScroll,key:"fixedBottomScroll",type:"select",placeholder:"默认开启",path:"config",options:[{label:"启用",value:!0},{label:"禁用",value:!1}],clearable:!0},{label:"列显示隐藏设置",value:(ee=a.tableData.config)==null?void 0:ee.columnsSetting,key:"columnsSetting",type:"select",placeholder:"默认开启",path:"config",options:[{label:"启用",value:!0},{label:"禁用",value:!1}],clearable:!0},{label:"可折叠查询表单",value:(De=a.tableData.config)==null?void 0:De.expand,key:"expand",type:"switch",path:"config"},{label:"操作列按钮下拉",value:(Ie=a.tableData.config)==null?void 0:Ie.operateDropdown,key:"operateDropdown",type:"switch",path:"config"},{label:"开启侧栏树",value:(Fe=a.tableData.treeData)==null?void 0:Fe.show,key:"tree",type:"switch"}]}),p=Qt(()=>{var h;const f={label:"表单字段",options:a.formFieldList},s=[{label:"其他字段",options:[{label:"多选",type:"selection"},{label:"序号",type:"index",width:"70px"},{label:"操作",prop:"__control"}]}];return(h=a.formFieldList)!=null&&h.length&&s.unshift(f),s}),D=(f,s)=>{var h;if(f.key==="tree"){a.tableData.treeData||(a.tableData.treeData={}),a.tableData.treeData.show=s;return}f.path==="config"?a.tableData.config[f.key]=f.value:a[f.key]=f.value,f.key==="formId"&&(!s&&((h=a.tableData.config)==null?void 0:h.openType)==="dialog"&&delete a.tableData.config.openType,me(f.value))},I=f=>{a.tableData.columns.forEach((s,h)=>{s.prop===f.prop&&a.tableData.columns.splice(h,1)})},S=(f,s)=>{if(s){let h=!1;a.tableData.columns.forEach(F=>{(F.prop&&F.prop===f.prop||F.type&&F.type===f.type)&&(h=!0)}),h||a.tableData.columns.push(f)}else a.tableData.columns.forEach((h,F)=>{h.prop===f.prop&&a.tableData.columns.splice(F,1)})},k=f=>{switch(f){case"del":a.tableData.columns=[],a.selectField=[];break;case"eye":a.previewVisible=!0;break;case"json":R(a.tableData,{direction:"rtl",type:"json"});break;case"vue":t.value.openTable(a.tableData);break;case"save":Oe();break}},Q=()=>{a.tagList.push({value:"",type:"success"})},Z=()=>{const f={};a.tagList.forEach(s=>{f[s.value]=s.type}),Object.keys(f).length?a.config.tagList=f:delete a.config.tagList,V()},V=()=>{Object.assign(a.attrObj,{config:a.config})},J=f=>{a.tagList.splice(f,1),Z()},z=()=>{R(a.attrObj,{type:"attr",title:"组件el-table-column属性"})},X=f=>{var s,h;switch(f){case"dict":R(a.dict||{},{type:f,title:u.dict});break;case"tableConfig":R(a.tableData.tableProps||{},{type:f,title:"el-table的相关属性"});break;case"beforeRequest":case"afterResponse":case"beforeDelete":const F=a.tableData.events||{};R(F[f],{type:f,title:u[f]});break;case"tree":let ee=a.tableData.treeData||{};Object.keys(ee).length===1&&(ee={show:!0,treeProps:{},name:"唯一标识",method:"post",requestUrl:""}),R(ee,{title:"更多参数详见ak-list组件",type:f});break;case"treeBeforeRequest":const De=(s=a.tableData.treeData)==null?void 0:s.beforeRequest;R(De,{type:f,title:"侧栏树请求前处理事件,可对参数作处理"});break;case"treeAfterResponse":const Ie=(h=a.tableData.treeData)==null?void 0:h.afterResponse;R(Ie,{type:f,title:'侧栏树请求返回事件,可对返回数据处理;也可为字符串,如opt="formatTest"'});break;case"operateBtn":const Fe=[{label:"编辑",key:"edit"},{label:"删除",key:"del"}];R(a.tableData.operateBtn||Fe,{type:f,title:"可设置多个操作按钮,其中key=edit/del有内置处理事件,还可根据条件显示与隐藏"});break;case"controlBtn":const vt=[{label:"新增",key:"add",type:"primary",size:"small",icon:"plus"},{label:"批量删除",key:"del",type:"danger",size:"small",icon:"delete"}];R(a.tableData.controlBtn||vt,{type:f,title:"可设置多个操作按钮,其中key=add/del有内置处理事件",direction:"rtl"});break}},R=(f,s={})=>{l.visible=!0,Object.assign(l,{direction:"ltr"},s);let h=Jt(f,!0);switch(s.type){case"dict":h=en(f,!0);break;case"beforeRequest":case"beforeDelete":case"treeBeforeRequest":f||(h=$n);break;case"afterResponse":case"treeAfterResponse":f||(h=jn);break}l.content=h},ge=f=>{const s=et(f);switch(l.type){case"json":a.tableData=s;break;case"tree":console.log(s),a.tableData.treeData=s;break;case"operateBtn":a.tableData.operateBtn=s;break;case"controlBtn":a.tableData.controlBtn=s;break;case"dict":a.dict=tn(f);break;case"beforeRequest":case"afterResponse":case"beforeDelete":a.tableData.events||(a.tableData.events={}),a.tableData.events[l.type]=s;break;case"tableConfig":a.tableData.tableProps=s;break;case"treeBeforeRequest":a.tableData.treeData.beforeRequest=s;break;case"treeAfterResponse":a.tableData.treeData.afterResponse=s;break}c()},ke=f=>{a.attrObj=f,a.config=f.config||{};const s=a.config.tagList;if(a.tagList=[],s)for(const h in s)a.tagList.push({value:h,type:s[h]});a.tabsName="first"},H=()=>{if(!i.id){tt.error("请先保存设计的列表");return}r.push({path:"/design/form",query:{id:i.id,type:"search",redirect:`/design/dataList?id=${i.id}`}})},_e=()=>{const f=n.value.querySelector(".el-table__header-wrapper tr");b.create(f,{animation:180,delay:0,onEnd:s=>{const h=a.tableData.columns[s.oldIndex];a.tableData.columns.splice(s.oldIndex,1),a.tableData.columns.splice(s.newIndex,0,h),a.refreshTable=!1,Dt(()=>{a.refreshTable=!0,Dt(()=>{_e()})})}})},ce=()=>{nt("designList",{pageInfo:{pageSize:100},type:1}).then(s=>{console.log("获取列表数据源",s),a.formList=s.data.list})},me=f=>{nt("designById",{id:f}).then(s=>{console.log("获取当前数据下所有字段");const h=et(s.data.data);console.log("content",h),le(h)})},re=["txt","title","table","component","upload","button","tinymce"],le=f=>{f==null||f.list.forEach(s=>{var h;s.type==="grid"||s.type==="tabs"?s.columns.forEach(F=>{le(F)}):["card","div"].includes(s.type)?le(s):re.indexOf(s.type)===-1&&s.name&&a.formFieldList.push({prop:s.name,label:(h=s.item)==null?void 0:h.label,help:s.config.help||""})})},Oe=()=>{const{requestUrl:f,deleteUrl:s}=a.tableData.config;if(!a.formId&&(!f||!s))return tt.error("请选择所属表单或配置接口url");const h={listData:Jt(a.tableData),source:a.formId,name:a.name||"未命名列表",type:2,dict:en(a.dict)};let F="designSave";i.id&&(Object.assign(h,{id:i.id}),F="designEdit"),a.loading=!0,nt(F,h).then(()=>{tt({message:"保存成功!",type:"success"}),r.push({path:"/design/dataList/list"}),a.loading=!1,window.sessionStorage.removeItem("formMenuList")}).catch(ee=>{tt.error(ee.message||"保存异常"),a.loading=!1}),i.id||window.sessionStorage.removeItem("formMenuList")},de=f=>{nt("designById",{id:f}).then(s=>{const h=s.data;a.tableData=et(h.listData),a.searchData=et(h.data),a.name=h.name,a.formId=h.source,a.dict=tn(h.dict),h.source&&me(h.source)})};return Mn(()=>{Dt(()=>{_e()}),ce(),i.id&&de(i.id),i.form&&me(i.form)}),(f,s)=>{var Ut,Yt,qt,jt,$t,zt,Ht,Wt,Gt;const h=Y("el-button"),F=Y("el-checkbox"),ee=Y("el-popover"),De=Y("el-divider"),Ie=Y("el-tooltip"),Fe=Y("el-table-column"),vt=Y("el-table"),ae=Y("el-form-item"),we=Y("el-option"),yt=Y("el-select"),Ye=Y("el-input"),Xt=Y("el-tab-pane"),Tn=Y("el-switch"),Cn=Y("QuestionFilled"),kn=Y("el-icon"),On=Y("el-tabs"),In=Y("el-form"),xn=Y("el-dialog"),An=Bn("loading");return C(),W("div",null,[wt((C(),W("div",{class:"design-container design-table",ref_key:"container",ref:n},[x("div",Eo,[x("div",So,[x("div",To,[v(ee,{placement:"bottom",width:420,trigger:"hover"},{reference:y(()=>[v(h,{type:"primary",plain:"",size:"small"},{default:y(()=>[B("添加表格列字段")]),_:1})]),default:y(()=>[x("div",Co,[(C(!0),W(Ee,null,xe(p.value,(E,w)=>(C(),W("div",{class:"item",key:w},[x("h3",null,qe(E.label),1),x("div",ko,[(C(!0),W(Ee,null,xe(E.options,se=>(C(),q(F,{label:se.label,key:se.prop,onChange:U=>S(se,U)},null,8,["label","onChange"]))),128))])]))),128))])]),_:1})]),v(Hn,{onClick:k})]),x("div",Oo,[x("div",{class:"search-box",onClick:H,title:"条件查询搜索区域,单击可编辑"},[(Yt=(Ut=a.searchData)==null?void 0:Ut.list)!=null&&Yt.length?(C(),q(Vn,{key:0,"is-search":"","form-data":a.searchData,dict:a.dict,requestUrl:""},null,8,["form-data","dict"])):(C(),W("div",Io,"条件查询搜索区域,单击可编辑"))]),v(De,{"border-style":"dashed"}),x("div",xo,[x("div",{class:"btn-group",onClick:s[0]||(s[0]=E=>X("controlBtn")),title:"单击可编辑"},[((jt=(qt=a.tableData)==null?void 0:qt.controlBtn)==null?void 0:jt.length)===0||!(($t=a.tableData)!=null&&$t.controlBtn)?(C(),W("div",Ao," 操作按钮区域,点击可添加如新增、删除 ")):Ae("",!0),(C(!0),W(Ee,null,xe((zt=a.tableData)==null?void 0:zt.controlBtn,E=>(C(),q(h,Et(E,{key:E.label}),{default:y(()=>[B(qe(E.label),1)]),_:2},1040))),128))]),x("div",Po,[(Ht=a.tableData.config)!=null&&Ht.expand?(C(),q(h,{key:0,size:"small",circle:"",icon:"Search"})):Ae("",!0),((Wt=a.tableData.config)==null?void 0:Wt.columnsSetting)!==!1?(C(),q(h,{key:1,size:"small",circle:"",icon:"SetUp"})):Ae("",!0)])]),(Gt=a.tableData.columns)!=null&&Gt.length?Ae("",!0):(C(),W("div",No," 表格列设置区域,可从左上角 添加表格列字段 选择已有列或直接从上方工具栏 生成脚本预览 编辑 ")),a.refreshTable?(C(),q(vt,Et({key:1,data:[{}]},a.tableData.tableProps||{},{ref:"tableEl"}),{default:y(()=>[(C(!0),W(Ee,null,xe(a.tableData.columns,E=>(C(),q(Fe,Ln(Et({key:E.prop||E.label},E)),Xn({header:y(w=>[B(qe(w.column.label)+" ",1),x("i",{class:"icon-close",onClick:se=>I(E)},null,8,Ro),E.help?(C(),q(Ie,{key:0,placement:"top"},{content:y(()=>[x("span",{innerHTML:E.help},null,8,Fo)]),default:y(()=>[Mo]),_:2},1024)):Ae("",!0)]),_:2},[E.type!=="index"?{name:"default",fn:y(()=>[E.type==="selection"?(C(),q(F,{key:0})):(C(),W("span",{key:1,onClick:Un(w=>ke(E),["stop"])},"设置",8,Bo))]),key:"0"}:void 0]),1040))),128))]),_:1},16)):Ae("",!0),Vo])]),x("div",Lo,[v(In,{size:"small",class:"form"},{default:y(()=>[v(On,{modelValue:a.tabsName,"onUpdate:modelValue":s[14]||(s[14]=E=>a.tabsName=E)},{default:y(()=>[v(Xt,{label:"字段属性",name:"first"},{default:y(()=>[wt(x("div",null,[x("div",Xo,[x("h3",null,qe(a.attrObj.label),1),B(" 个性化设置 ")]),a.attrObj.prop==="__control"?(C(),q(ae,{key:0},{default:y(()=>[v(h,{onClick:s[1]||(s[1]=E=>X("operateBtn"))},{default:y(()=>[B("操作按钮设置")]),_:1})]),_:1})):(C(),W(Ee,{key:1},[v(ae,{label:"时间格式化"},{default:y(()=>[v(yt,{modelValue:a.config.formatter,"onUpdate:modelValue":s[2]||(s[2]=E=>a.config.formatter=E),onChange:V},{default:y(()=>[v(we,{label:"{y}-{m}-{d} {h}:{i}:{s}",value:"{y}-{m}-{d} {h}:{i}:{s}"}),v(we,{label:"{y}-{m}-{d}",value:"{y}-{m}-{d}"}),v(we,{label:"{h}:{i}:{s}",value:"{h}:{i}:{s}"})]),_:1},8,["modelValue"])]),_:1}),v(ae,{label:"值匹配字典"},{default:y(()=>[v(Ye,{placeholder:"字典对应的key",modelValue:a.config.dictKey,"onUpdate:modelValue":s[3]||(s[3]=E=>a.config.dictKey=E),onChange:V},null,8,["modelValue"])]),_:1}),(C(!0),W(Ee,null,xe(a.tagList,(E,w)=>(C(),q(ae,{key:w,class:"table-tag"},{default:y(()=>[v(Ye,{placeholder:"值对应的类型",modelValue:E.value,"onUpdate:modelValue":se=>E.value=se,onChange:Z},{append:y(()=>[v(yt,{style:{width:"80px"},modelValue:E.type,"onUpdate:modelValue":se=>E.type=se,onChange:Z},{default:y(()=>[v(we,{label:"success",value:"success"}),v(we,{label:"info",value:"info"}),v(we,{label:"warning",value:"warning"}),v(we,{label:"danger",value:"danger"})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"]),x("i",{class:"icon-del",onClick:se=>J(w)},null,8,Uo)]),_:2},1024))),128)),v(ae,null,{default:y(()=>[v(h,{onClick:Q},{default:y(()=>[B("新增Tag标签显示")]),_:1})]),_:1}),v(ae,null,{default:y(()=>[v(h,{onClick:z},{default:y(()=>[B("编辑"+qe(a.attrObj.label)+"属性 ",1)]),_:1})]),_:1})],64))],512),[[Zt,Object.keys(a.attrObj).length]])]),_:1}),v(Xt,{label:"数据列表配置",name:"second"},{default:y(()=>{var E;return[(C(!0),W(Ee,null,xe(g.value.filter(w=>!w.hide),(w,se)=>(C(),q(ae,{label:w.label,key:se},{default:y(()=>[w.type==="select"?(C(),q(yt,{key:0,modelValue:w.value,"onUpdate:modelValue":U=>w.value=U,placeholder:w.placeholder,clearable:!0,onChange:U=>D(w)},{default:y(()=>[(C(!0),W(Ee,null,xe(w.options,U=>(C(),q(we,{label:U.label||U.name,key:U.label||U.name,value:Yn(zn)(U.value??U.id)},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):w.type==="switch"?(C(),q(Tn,{key:1,modelValue:w.value,"onUpdate:modelValue":U=>w.value=U,onInput:U=>D(w,U)},null,8,["modelValue","onUpdate:modelValue","onInput"])):(C(),q(Ye,{key:2,modelValue:w.value,"onUpdate:modelValue":U=>w.value=U,placeholder:w.placeholder,onInput:U=>D(w)},null,8,["modelValue","onUpdate:modelValue","placeholder","onInput"]))]),_:2},1032,["label"]))),128)),wt(v(ae,{class:"event-btn"},{default:y(()=>[v(h,{onClick:s[4]||(s[4]=w=>X("tree"))},{default:y(()=>[B("编辑侧栏树属性 ")]),_:1}),v(h,{onClick:s[5]||(s[5]=w=>X("treeBeforeRequest"))},{default:y(()=>[B("beforeRequest ")]),_:1}),v(h,{onClick:s[6]||(s[6]=w=>X("treeAfterResponse"))},{default:y(()=>[B("afterResponse ")]),_:1})]),_:1},512),[[Zt,(E=a.tableData.treeData)==null?void 0:E.show]]),v(ae,{class:"event-btn"},{default:y(()=>[v(h,{onClick:s[7]||(s[7]=w=>X("tableConfig"))},{default:y(()=>[B("编辑表格属性 ")]),_:1}),v(h,{onClick:s[8]||(s[8]=w=>X("dict"))},{default:y(()=>[B("设置数据字典 "),v(Ie,{content:u.dict,placement:"top"},{default:y(()=>[v(kn,null,{default:y(()=>[v(Cn)]),_:1})]),_:1},8,["content"])]),_:1})]),_:1}),Yo,v(ae,{label:"列表数据请求URL"},{default:y(()=>[v(Ye,{placeholder:"一般不需要填写,使用默认值",modelValue:a.tableData.config.requestUrl,"onUpdate:modelValue":s[9]||(s[9]=w=>a.tableData.config.requestUrl=w)},null,8,["modelValue"])]),_:1}),v(ae,{label:"删除列表数据URL"},{default:y(()=>[v(Ye,{placeholder:"一般不需要填写,使用默认值",modelValue:a.tableData.config.deleteUrl,"onUpdate:modelValue":s[10]||(s[10]=w=>a.tableData.config.deleteUrl=w)},null,8,["modelValue"])]),_:1}),v(ae,{class:"event-btn"},{default:y(()=>[v(h,{onClick:s[11]||(s[11]=w=>X("beforeRequest"))},{default:y(()=>[B("beforeRequest ")]),_:1}),v(h,{onClick:s[12]||(s[12]=w=>X("afterResponse"))},{default:y(()=>[B("afterResponse ")]),_:1}),v(h,{onClick:s[13]||(s[13]=w=>X("beforeDelete"))},{default:y(()=>[B("beforeDelete ")]),_:1})]),_:1})]}),_:1})]),_:1},8,["modelValue"])]),_:1})])])),[[An,a.loading]]),v(Gn,{modelValue:l.visible,"onUpdate:modelValue":s[15]||(s[15]=E=>l.visible=E),title:l.title,direction:l.direction,content:l.content,"code-type":l.codeType,onBeforeClose:c,onConfirm:ge},null,8,["modelValue","title","direction","content","code-type"]),v(Wn,{ref_key:"vueFileEl",ref:t},null,512),v(xn,{modelValue:a.previewVisible,"onUpdate:modelValue":s[16]||(s[16]=E=>a.previewVisible=E),title:"预览",fullscreen:!0},{default:y(()=>[a.previewVisible?(C(),q(qn,{key:0,tableData:a.tableData,searchData:a.searchData},null,8,["tableData","searchData"])):Ae("",!0)]),_:1},8,["modelValue"])])}}});export{zo as default};