import{a_ as L,Z as w,c9 as D,a8 as I,V as P}from"./index-CLZzJyTP.js";import{U as n,a2 as H,ad as N,af as r,k as l,a6 as x,a4 as J,a5 as V,G as S,d as R,f as y,n as T}from"./vue-vendor-CxLCUzY4.js";import{B as F}from"./index-XZKTTfG1.js";import"./index-ByX9XNkE.js";import $ from"./JCodeEditor-CR57XeIe.js";import"./antd-vue-vendor-CahNzUUa.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useTimeout-KpZCXEcl.js";import"./index-DvqyyN77.js";import"./useWindowSizeFn-D9PllI8g.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useForm-Dx3lJ3DG.js";import"./componentMap-DpsJvoqz.js";import"./useFormItem-IOFWTdED.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JAddInput-B36c3B5x.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-C7yPiS0L.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./depart.api-DHG2p2Yd.js";import"./JImageUpload-BFwNYdm5.js";import"./JDictSelectTag-CfF54ALX.js";import"./JSelectDept-CaEHrQp6.js";import"./JPopup-BvqhHpPl.js";import"./JEllipsis-C_gT_vEQ.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./JAreaLinkage-M9TGy8nY.js";import"./EasyCronInput-CWOTSpxK.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */var z=Object.defineProperty,E=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,M=(e,t,o)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,k=(e,t)=>{for(var o in t||(t={}))Q.call(t,o)&&M(e,o,t[o]);if(E)for(var o of E(t))U.call(t,o)&&M(e,o,t[o]);return e},G=(e,t,o)=>new Promise((p,d)=>{var f=i=>{try{c(o.next(i))}catch(m){d(m)}},h=i=>{try{c(o.throw(i))}catch(m){d(m)}},c=i=>i.done?p(i.value):Promise.resolve(i.value).then(f,h);c((o=o.apply(e,t)).next())});const j=w(),O="enhance_",K=L({id:"online-cgform-enhance",state:()=>({enhanceJs:{}}),getters:{},actions:{getEnhanceJs(e){return this.enhanceJs[e]=j.get(O+e),this.enhanceJs[e]},addEnhanceJs(e){this.enhanceJs[e.code]?this.enhanceJs[e.code].push(k({},e)):this.enhanceJs[e.code]=[k({},e)];let t=this.enhanceJs[e.code];for(;t.length>16;)t.shift();j.set(O+e.code,t)}}}),W=R({name:"EnhanceJsHistory",components:{BasicModal:F,JCodeEditor:$},setup(){const e=K(),t=y(),o=y(!1),p=y([]),d=y(""),f=y(0),[h,{closeModal:c}]=I(a=>G(this,null,function*(){i(a.code,a.type)}));function i(a,C){d.value="",p.value=[];let _=e.getEnhanceJs(a),s=[],u=0;for(let g of _)g.type===C&&(u++,s.push(Object.assign({},g,{index:u})));s&&s.length>0&&s.sort((g,B)=>B.date-g.date),p.value=[...s],T(()=>v(s[0]))}function m(){c()}function b(a){return P(a,"yyyy-MM-DD HH:mm:ss")}function v(a){f.value=a.index,t.value.setValue(a.str)}return{codeEditorRef:t,fullCode:v,registerModal:h,getFormatDate:b,onCancel:m,confirmLoading:o,dataList:p,jsStr:d,activeIndex:f}}}),X=["onClick"];function Z(e,t,o,p,d,f){const h=n("a-divider"),c=n("a-list-item"),i=n("a-list"),m=n("a-layout-sider"),b=n("JCodeEditor"),v=n("a-layout-content"),a=n("a-layout"),C=n("a-spin"),_=n("a-button"),s=n("BasicModal");return H(),N(s,{onRegister:e.registerModal,title:"JS增强历史记录",width:1200,maskClosable:!1,confirmLoading:e.confirmLoading,defaultFullscreen:"",onCancel:e.onCancel},{footer:r(()=>[l(_,{onClick:e.onCancel},{default:r(()=>[S("关闭")]),_:1},8,["onClick"])]),default:r(()=>[l(C,{spinning:e.confirmLoading},{default:r(()=>[l(a,null,{default:r(()=>[l(m,{theme:"light"},{default:r(()=>[l(i,{bordered:"",dataSource:e.dataList,class:x("enhance-list")},{header:r(()=>[J("div",null,[l(h,{style:{margin:"0"}},{default:r(()=>[S("保存时间")]),_:1})])]),renderItem:r(({item:u})=>[l(c,{class:x(e.activeIndex===u.index?"bg-blue":"")},{default:r(()=>[J("a",{onClick:g=>e.fullCode(u)},V(e.getFormatDate(u.date)),9,X)]),_:2},1032,["class"])]),_:1},8,["dataSource"])]),_:1}),l(a,null,{default:r(()=>[l(v,{style:{margin:"8px 8px",padding:"8px",background:"#fff",minHeight:"280px"}},{default:r(()=>[l(b,{ref:"codeEditorRef",language:"javascript",fullScreen:!0,lineNumbers:!1,"language-change":!1},null,512)]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"])]),_:1},8,["onRegister","confirmLoading","onCancel"])}const q=D(W,[["render",Z],["__scopeId","data-v-a2408ade"]]),Xe=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"}));export{q as E,Xe as a,K as u};
