You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.5 KiB
2 lines
1.5 KiB
var d=Object.defineProperty;var p=(a,t,e)=>t in a?d(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var o=(a,t,e)=>(p(a,typeof t!="symbol"?t+"":t,e),e);var n=(a,t,e)=>new Promise((c,r)=>{var i=s=>{try{h(e.next(s))}catch(u){r(u)}},y=s=>{try{h(e.throw(s))}catch(u){r(u)}},h=s=>s.done?c(s.value):Promise.resolve(s.value).then(i,y);h((e=e.apply(a,t)).next())});import{af as E,ag as m}from"./index-f4658ae7.js";import{c as g}from"./ParamsUtils-3cbc5822.js";class w{constructor(t,...e){o(this,"EnsName","");o(this,"queryArgs",[]);o(this,"data",[]);this.EnsName=t,this.queryArgs=e}Retrieve(...t){return n(this,null,function*(){if(t.length%2===1)throw new Error("\u67E5\u8BE2\u6761\u4EF6\u4E0D\u5339\u914D");this.queryArgs=t,yield this.Init()})}Init(){return n(this,null,function*(){this.data=yield E.post(m,null,{params:{DoType:"Entities_Init",EnsName:this.EnsName,Paras:g(this.queryArgs)}})})}isEmpty(){return this.data.length===0}getData(){return this.data}DoMethodReturnString(t,...e){return n(this,null,function*(){return yield this.execEntityMethod(t,e)})}DoMethodReturnJSON(t,...e){return n(this,null,function*(){return yield this.execEntityMethod(t,e)})}execEntityMethod(c){return n(this,arguments,function*(t,e=[]){const r=new FormData;e.length>0&&r.append("paras",e.join("~"));const i={DoType:"Entities_DoMethodReturnString",MethodName:t,t:Date.now()};return this.EnsName&&(i.EnsName=this.EnsName),this.PKVal&&(i.PKVal=encodeURIComponent(this.PKVal)),yield E.post(m,r,{params:i})})}}export{w as default};
|