"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2531],{12531:function(M,y,a){a.r(y),a.d(y,{addData:function(){return p},batchGenCode:function(){return k},genCode:function(){return H},getGenCode:function(){return j},getGenCodeList:function(){return I},importTables:function(){return c},previewCode:function(){return G},queryTableList:function(){return R},removeData:function(){return g},syncDbInfo:function(){return S},updateData:function(){return l}});var w=a(97857),b=a.n(w),v=a(15009),t=a.n(v),T=a(99289),o=a.n(T),_=a(76772),C=a(30964);function I(n){return E.apply(this,arguments)}function E(){return E=o()(t()().mark(function n(r){var s;return t()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=new URLSearchParams(r).toString(),d.abrupt("return",(0,_.request)("/api/code/gen/list?".concat(s),{data:r,method:"get",headers:{"Content-Type":"application/json;charset=UTF-8"}}));case 2:case"end":return d.stop()}},n)})),E.apply(this,arguments)}function j(n){return h.apply(this,arguments)}function h(){return h=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen/".concat(r),{method:"get",headers:{"Content-Type":"application/json;charset=UTF-8"}}));case 1:case"end":return e.stop()}},n)})),h.apply(this,arguments)}function R(n){return i.apply(this,arguments)}function i(){return i=o()(t()().mark(function n(r){var s;return t()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=new URLSearchParams(r).toString(),d.abrupt("return",(0,_.request)("/api/code/gen/db/list?".concat(s),{data:r,method:"get",headers:{"Content-Type":"application/json;charset=UTF-8"}}));case 2:case"end":return d.stop()}},n)})),i.apply(this,arguments)}function c(n){return u.apply(this,arguments)}function u(){return u=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen/importTable?tables=".concat(r),{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"}}));case 1:case"end":return e.stop()}},n)})),u.apply(this,arguments)}function g(n){return f.apply(this,arguments)}function f(){return f=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen/".concat(r.ids),{method:"delete",headers:{"Content-Type":"application/json;charset=UTF-8"}}));case 1:case"end":return e.stop()}},n)})),f.apply(this,arguments)}function p(n){return m.apply(this,arguments)}function m(){return m=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen",{method:"POST",data:b()({},r)}));case 1:case"end":return e.stop()}},n)})),m.apply(this,arguments)}function l(n){return D.apply(this,arguments)}function D(){return D=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen",{method:"PUT",data:b()({},r)}));case 1:case"end":return e.stop()}},n)})),D.apply(this,arguments)}function S(n){return O.apply(this,arguments)}function O(){return O=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen/synchDb/".concat(r),{method:"GET"}));case 1:case"end":return e.stop()}},n)})),O.apply(this,arguments)}function H(n){return L.apply(this,arguments)}function L(){return L=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen/genCode/".concat(r),{method:"GET"}));case 1:case"end":return e.stop()}},n)})),L.apply(this,arguments)}function k(n){return P.apply(this,arguments)}function P(){return P=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.p6)("/api/code/gen/batchGenCode?tables=".concat(r)));case 1:case"end":return e.stop()}},n)})),P.apply(this,arguments)}function G(n){return U.apply(this,arguments)}function U(){return U=o()(t()().mark(function n(r){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.request)("/api/code/gen/preview/".concat(r),{method:"GET",headers:{"Content-Type":"application/json;charset=UTF-8"}}));case 1:case"end":return e.stop()}},n)})),U.apply(this,arguments)}},30964:function(M,y,a){a.d(y,{p6:function(){return E},su:function(){return j}});var w=a(15009),b=a.n(w),v=a(97857),t=a.n(v),T=a(99289),o=a.n(T),_=a(76772),C={xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",zip:"application/zip"};function I(i,c){var u=document.createElement("a"),g=new Blob([i.data],{type:c}),f=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),p=decodeURI(i.headers["content-disposition"]),m=f.exec(p),l=m?m[1]:"file";l=l.replace(/"/g,""),u.style.display="none",u.href=URL.createObjectURL(g),u.setAttribute("download",l),document.body.appendChild(u),u.click(),URL.revokeObjectURL(u.href),document.body.removeChild(u)}function E(i){(0,_.request)(i,{method:"GET",responseType:"blob",getResponse:!0}).then(function(c){I(c,C.zip)})}function j(i,c,u){return h.apply(this,arguments)}function h(){return h=o()(b()().mark(function i(c,u,g){return b()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,_.request)(c,t()(t()({},u),{},{method:"POST",responseType:"blob"})).then(function(m){var l=document.createElement("a"),D=m;l.style.display="none",l.href=URL.createObjectURL(D),l.setAttribute("download",g),document.body.appendChild(l),l.click(),URL.revokeObjectURL(l.href),document.body.removeChild(l)}));case 1:case"end":return p.stop()}},i)})),h.apply(this,arguments)}function R(i){window.location.href="/api/common/download?fileName=".concat(encodeURI(i),"&delete=",!0)}}}]);