text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61d44e72","chunk-037853af","chunk-170f5682","chunk-c0be9062","chunk-2d0c1f78","chunk-2d0a4474"],{"0680":function(e,t,n){"use strict";n.r(t),n.d(t,"getDict",(function(){return l}));var r=n("1da1"),a=(n("96cf"),n("4360")),l=function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,a["store"].dispatch("dictionary/getDictionary",t);case 2:return e.abrupt("return",a["store"].getters["dictionary/getDictionary"][t]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"0cb2":function(e,t,n){var r=n("7b0b"),a=Math.floor,l="".replace,o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,i=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,c,u,d){var b=n+e.length,s=c.length,f=i;return void 0!==u&&(u=r(u),f=o),l.call(d,f,(function(r,l){var o;switch(l.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(b);case"<":o=u[l.slice(1,-1)];break;default:var i=+l;if(0===i)return r;if(i>s){var d=a(i/10);return 0===d?r:d<=s?void 0===c[d-1]?l.charAt(1):c[d-1]+l.charAt(1):r}o=c[i-1]}return void 0===o?"":o}))}},"2a18":function(e,t,n){"use strict";n.r(t),n.d(t,"toUpperCase",(function(){return r})),n.d(t,"toLowerCase",(function(){return a})),n.d(t,"toSQLLine",(function(){return l})),n.d(t,"toHump",(function(){return o}));n("ac1f"),n("5319");var r=function(e){return e[0]?e.replace(e[0],e[0].toUpperCase()):""},a=function(e){return e[0]?e.replace(e[0],e[0].toLowerCase()):""},l=function(e){return"ID"===e?"ID":e.replace(/([A-Z])/g,"_$1").toLowerCase()},o=function(e){return e.replace(/\_(\w)/g,(function(e,t){return t.toUpperCase()}))}},"30bb":function(e,t,n){"use strict";n("4d70")},"37e5":function(e,t,n){},"47fe":function(e,t,n){"use strict";n.r(t),n.d(t,"preview",(function(){return a})),n.d(t,"createTemp",(function(){return l})),n.d(t,"getDB",(function(){return o})),n.d(t,"getTable",(function(){return i})),n.d(t,"getColumn",(function(){return c})),n.d(t,"getSysHistory",(function(){return u})),n.d(t,"rollback",(function(){return d})),n.d(t,"getMeta",(function(){return b})),n.d(t,"delSysHistory",(function(){return s}));var r=n("b775"),a=function(e){return Object(r["default"])({url:"/autoCode/preview",method:"post",data:e})},l=function(e){return Object(r["default"])({url:"/autoCode/createTemp",method:"post",data:e,responseType:"blob"})},o=function(){return Object(r["default"])({url:"/autoCode/getDB",method:"get"})},i=function(e){return Object(r["default"])({url:"/autoCode/getTables",method:"get",params:e})},c=function(e){return Object(r["default"])({url:"/autoCode/getColumn",method:"get",params:e})},u=function(e){return Object(r["default"])({url:"/autoCode/getSysHistory",method:"post",data:e})},d=function(e){return Object(r["default"])({url:"/autoCode/rollback",method:"post",data:e})},b=function(e){return Object(r["default"])({url:"/autoCode/getMeta",method:"post",data:e})},s=function(e){return Object(r["default"])({url:"/autoCode/delSysHistory",method:"post",data:e})}},"4d70":function(e,t,n){},5319:function(e,t,n){"use strict";var r=n("d784"),a=n("d039"),l=n("825a"),o=n("a691"),i=n("50c4"),c=n("577e"),u=n("1d80"),d=n("8aa5"),b=n("0cb2"),s=n("14c3"),f=n("b622"),m=f("replace"),p=Math.max,O=Math.min,j=function(e){return void 0===e?e:String(e)},g=function(){return"$0"==="a".replace(/./,"$0")}(),v=function(){return!!/./[m]&&""===/./[m]("a","$0")}(),h=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));r("replace",(function(e,t,n){var r=v?"$":"$0";return[function(e,n){var r=u(this),a=void 0==e?void 0:e[m];return void 0!==a?a.call(e,r,n):t.call(c(r),e,n)},function(e,a){var u=l(this),f=c(e);if("string"===typeof a&&-1===a.indexOf(r)&&-1===a.indexOf("$<")){var m=n(t,u,f,a);if(m.done)return m.value}var g="function"===typeof a;g||(a=c(a));var v=u.global;if(v){var h=u.unicode;u.lastIndex=0}var y=[];while(1){var N=s(u,f);if(null===N)break;if(y.push(N),!v)break;var w=c(N[0]);""===w&&(u.lastIndex=d(f,i(u.lastIndex),h))}for(var x="",C=0,k=0;k<y.length;k++){N=y[k];for(var _=c(N[0]),T=p(O(o(N.index),f.length),0),V=[],D=1;D<N.length;D++)V.push(j(N[D]));var F=N.groups;if(g){var S=[_].concat(V,T,f);void 0!==F&&S.push(F);var U=c(a.apply(void 0,S))}else U=b(_,f,T,V,F,a);T>=C&&(x+=f.slice(C,T)+U,C=T+_.length)}return x+f.slice(C)}]}),!h||!g||v)},5899:function(e,t){e.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},"58a8":function(e,t,n){var r=n("1d80"),a=n("577e"),l=n("5899"),o="["+l+"]",i=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),u=function(e){return function(t){var n=a(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(c,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},7156:function(e,t,n){var r=n("861d"),a=n("d2bb");e.exports=function(e,t,n){var l,o;return a&&"function"==typeof(l=t.constructor)&&l!==n&&r(o=l.prototype)&&o!==n.prototype&&a(e,o),e}},"8fb1":function(e,t,n){"use strict";n("37e5")},a434:function(e,t,n){"use strict";var r=n("23e7"),a=n("23cb"),l=n("a691"),o=n("50c4"),i=n("7b0b"),c=n("65f0"),u=n("8418"),d=n("1dde"),b=d("splice"),s=Math.max,f=Math.min,m=9007199254740991,p="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!b},{splice:function(e,t){var n,r,d,b,O,j,g=i(this),v=o(g.length),h=a(e,v),y=arguments.length;if(0===y?n=r=0:1===y?(n=0,r=v-h):(n=y-2,r=f(s(l(t),0),v-h)),v+n-r>m)throw TypeError(p);for(d=c(g,r),b=0;b<r;b++)O=h+b,O in g&&u(d,b,g[O]);if(d.length=r,n<r){for(b=h;b<v-r;b++)O=b+r,j=b+n,O in g?g[j]=g[O]:delete g[j];for(b=v;b>v-r+n;b--)delete g[b-1]}else if(n>r)for(b=v-r;b>h;b--)O=b+r-1,j=b+n-1,O in g?g[j]=g[O]:delete g[j];for(b=0;b<n;b++)g[b+h]=arguments[b+2];return g.length=v-r+n,d}})},a9e3:function(e,t,n){"use strict";var r=n("83ab"),a=n("da84"),l=n("94ca"),o=n("6eeb"),i=n("5135"),c=n("c6b6"),u=n("7156"),d=n("d9b5"),b=n("c04e"),s=n("d039"),f=n("7c73"),m=n("241c").f,p=n("06cf").f,O=n("9bf2").f,j=n("58a8").trim,g="Number",v=a[g],h=v.prototype,y=c(f(h))==g,N=function(e){if(d(e))throw TypeError("Cannot convert a Symbol value to a number");var t,n,r,a,l,o,i,c,u=b(e,"number");if("string"==typeof u&&u.length>2)if(u=j(u),t=u.charCodeAt(0),43===t||45===t){if(n=u.charCodeAt(2),88===n||120===n)return NaN}else if(48===t){switch(u.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+u}for(l=u.slice(2),o=l.length,i=0;i<o;i++)if(c=l.charCodeAt(i),c<48||c>a)return NaN;return parseInt(l,r)}return+u};if(l(g,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var w,x=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof x&&(y?s((function(){h.valueOf.call(n)})):c(n)!=g)?u(new v(N(t)),n,x):N(t)},C=r?m(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),k=0;C.length>k;k++)i(v,w=C[k])&&!i(x,w)&&O(x,w,p(v,w));x.prototype=h,h.constructor=x,o(a,g,x)}},b81f:function(e,t,n){"use strict";n.r(t);n("a4d3"),n("e01a");var r=n("7a23");Object(r["Q"])("data-v-35d769a0");var a=Object(r["o"])("div",{style:{fontSize:"16px",paddingLeft:"20px"}},[Object(r["r"])(" 点这里从现有数据库创建代码 "),Object(r["o"])("i",{class:"header-icon el-icon-thumb"})],-1),l=Object(r["r"])("使用此表创建"),o=Object(r["o"])("div",null," 自动创建API ",-1),i=Object(r["o"])("div",null," 自动移动文件 ",-1),c={class:"button-box clearflex"},u=Object(r["r"])("新增Field"),d=Object(r["r"])("编辑"),b=Object(r["r"])("上移"),s=Object(r["r"])("下移"),f=Object(r["o"])("p",null,"确定删除吗？",-1),m={style:{"text-align":"right",margin:"0"}},p=Object(r["r"])("取消"),O=Object(r["r"])("确定"),j=Object(r["r"])("删除"),g=Object(r["r"])("id , created_at , updated_at , deleted_at 会自动生成请勿重复创建"),v={class:"button-box clearflex"},h=Object(r["r"])("预览代码"),y=Object(r["r"])("生成代码"),N={class:"dialog-footer"},w=Object(r["r"])("取 消"),x=Object(r["r"])("确 定"),C={class:"dialog-footer"},k=Object(r["r"])("确 定");function _(e,t,n,_,T,V){var D=Object(r["W"])("el-option"),F=Object(r["W"])("el-select"),S=Object(r["W"])("el-form-item"),U=Object(r["W"])("el-button"),R=Object(r["W"])("el-form"),A=Object(r["W"])("el-collapse-item"),M=Object(r["W"])("el-collapse"),I=Object(r["W"])("el-divider"),L=Object(r["W"])("el-input"),$=Object(r["W"])("el-tooltip"),W=Object(r["W"])("el-checkbox"),E=Object(r["W"])("el-table-column"),J=Object(r["W"])("el-popover"),z=Object(r["W"])("el-table"),q=Object(r["W"])("el-tag"),H=Object(r["W"])("FieldDialog"),B=Object(r["W"])("el-dialog"),P=Object(r["W"])("PreviewCodeDialg");return Object(r["N"])(),Object(r["n"])("div",null,[Object(r["s"])(M,{modelValue:T.activeNames,"onUpdate:modelValue":t[2]||(t[2]=function(e){return T.activeNames=e})},{default:Object(r["lb"])((function(){return[Object(r["s"])(A,{name:"1"},{title:Object(r["lb"])((function(){return[a]})),default:Object(r["lb"])((function(){return[Object(r["s"])(R,{ref:"getTableForm",inline:!0,model:T.dbform,"label-width":"120px"},{default:Object(r["lb"])((function(){return[Object(r["s"])(S,{label:"数据库名",prop:"structName"},{default:Object(r["lb"])((function(){return[Object(r["s"])(F,{modelValue:T.dbform.dbName,"onUpdate:modelValue":t[0]||(t[0]=function(e){return T.dbform.dbName=e}),filterable:"",placeholder:"请选择数据库",onChange:V.getTable},{default:Object(r["lb"])((function(){return[(Object(r["N"])(!0),Object(r["n"])(r["b"],null,Object(r["U"])(T.dbOptions,(function(e){return Object(r["N"])(),Object(r["l"])(D,{key:e.database,label:e.database,value:e.database},null,8,["label","value"])})),128))]})),_:1},8,["modelValue","onChange"])]})),_:1}),Object(r["s"])(S,{label:"表名",prop:"structName"},{default:Object(r["lb"])((function(){return[Object(r["s"])(F,{modelValue:T.dbform.tableName,"onUpdate:modelValue":t[1]||(t[1]=function(e){return T.dbform.tableName=e}),disabled:!T.dbform.dbName,filterable:"",placeholder:"请选择表"},{default:Object(r["lb"])((function(){return[(Object(r["N"])(!0),Object(r["n"])(r["b"],null,Object(r["U"])(T.tableOptions,(function(e){return Object(r["N"])(),Object(r["l"])(D,{key:e.tableName,label:e.tableName,value:e.tableName},null,8,["label","value"])})),128))]})),_:1},8,["modelValue","disabled"])]})),_:1}),Object(r["s"])(S,null,{default:Object(r["lb"])((function(){return[Object(r["s"])(U,{size:"mini",type:"primary",onClick:V.getColumn},{default:Object(r["lb"])((function(){return[l]})),_:1},8,["onClick"])]})),_:1})]})),_:1},8,["model"])]})),_:1})]})),_:1},8,["modelValue"]),Object(r["s"])(I),Object(r["s"])(R,{ref:"autoCodeForm",rules:T.rules,model:T.form,"label-width":"120px",inline:!0},{default:Object(r["lb"])((function(){return[Object(r["s"])(S,{label:"Struct名称",prop:"structName"},{default:Object(r["lb"])((function(){return[Object(r["s"])(L,{modelValue:T.form.structName,"onUpdate:modelValue":t[3]||(t[3]=function(e){return T.form.structName=e}),placeholder:"首字母自动转换大写"},null,8,["modelValue"])]})),_:1}),Object(r["s"])(S,{label:"tableName",prop:"tableName"},{default:Object(r["lb"])((function(){return[Object(r["s"])(L,{modelValue:T.form.tableName,"onUpdate:modelValue":t[4]||(t[4]=function(e){return T.form.tableName=e}),placeholder:"指定表名（非必填）"},null,8,["modelValue"])]})),_:1}),Object(r["s"])(S,{label:"Struct简称",prop:"abbreviation"},{default:Object(r["lb"])((function(){return[Object(r["s"])(L,{modelValue:T.form.abbreviation,"onUpdate:modelValue":t[5]||(t[5]=function(e){return T.form.abbreviation=e}),placeholder:"简称会作为入参对象名和路由group"},null,8,["modelValue"])]})),_:1}),Object(r["s"])(S,{label:"Struct中文名称",prop:"description"},{default:Object(r["lb"])((function(){return[Object(r["s"])(L,{modelValue:T.form.description,"onUpdate:modelValue":t[6]||(t[6]=function(e){return T.form.description=e}),placeholder:"中文描述作为自动api描述"},null,8,["modelValue"])]})),_:1}),Object(r["s"])(S,{label:"文件名称",prop:"packageName"},{default:Object(r["lb"])((function(){return[Object(r["s"])(L,{modelValue:T.form.packageName,"onUpdate:modelValue":t[7]||(t[7]=function(e){return T.form.packageName=e}),placeholder:"生成文件的默认名称(建议为驼峰格式,首字母小写,如sysXxxXxxx)"},null,8,["modelValue"])]})),_:1}),Object(r["s"])(S,null,{label:Object(r["lb"])((function(){return[Object(r["s"])($,{content:"注：把自动生成的API注册进数据库",placement:"bottom",effect:"light"},{default:Object(r["lb"])((function(){return[o]})),_:1})]})),default:Object(r["lb"])((function(){return[Object(r["s"])(W,{modelValue:T.form.autoCreateApiToSql,"onUpdate:modelValue":t[8]||(t[8]=function(e){return T.form.autoCreateApiToSql=e})},null,8,["modelValue"])]})),_:1}),Object(r["s"])(S,null,{label:Object(r["lb"])((function(){return[Object(r["s"])($,{content:"注：自动迁移生成的文件到ymal配置的对应位置",placement:"bottom",effect:"light"},{default:Object(r["lb"])((function(){return[i]})),_:1})]})),default:Object(r["lb"])((function(){return[Object(r["s"])(W,{modelValue:T.form.autoMoveFile,"onUpdate:modelValue":t[9]||(t[9]=function(e){return T.form.autoMoveFile=e})},null,8,["modelValue"])]})),_:1})]})),_:1},8,["rules","model"]),Object(r["o"])("div",c,[Object(r["s"])(U,{size:"mini",type:"primary",onClick:t[10]||(t[10]=function(e){return V.editAndAddField()})},{default:Object(r["lb"])((function(){return[u]})),_:1})]),Object(r["s"])(z,{data:T.form.fields,border:"",stripe:""},{default:Object(r["lb"])((function(){return[Object(r["s"])(E,{type:"index",label:"序列",width:"100"}),Object(r["s"])(E,{prop:"fieldName",label:"Field名"}),Object(r["s"])(E,{prop:"fieldDesc",label:"中文名"}),Object(r["s"])(E,{prop:"fieldJson",label:"FieldJson"}),Object(r["s"])(E,{prop:"fieldType",label:"Field数据类型",width:"130"}),Object(r["s"])(E,{prop:"dataType",label:"数据库字段类型",width:"130"}),Object(r["s"])(E,{prop:"dataTypeLong",label:"数据库字段长度",width:"130"}),Object(r["s"])(E,{prop:"columnName",label:"数据库字段",width:"130"}),Object(r["s"])(E,{prop:"comment",label:"数据库字段描述",width:"130"}),Object(r["s"])(E,{prop:"fieldSearchType",label:"搜索条件",width:"130"}),Object(r["s"])(E,{prop:"dictType",label:"字典",width:"130"}),Object(r["s"])(E,{label:"操作",width:"300"},{default:Object(r["lb"])((function(e){return[Object(r["s"])(U,{size:"mini",type:"primary",icon:"el-icon-edit",onClick:function(t){return V.editAndAddField(e.row)}},{default:Object(r["lb"])((function(){return[d]})),_:2},1032,["onClick"]),Object(r["s"])(U,{size:"mini",type:"text",disabled:0===e.$index,onClick:function(t){return V.moveUpField(e.$index)}},{default:Object(r["lb"])((function(){return[b]})),_:2},1032,["disabled","onClick"]),Object(r["s"])(U,{size:"mini",type:"text",disabled:e.$index+1===T.form.fields.length,onClick:function(t){return V.moveDownField(e.$index)}},{default:Object(r["lb"])((function(){return[s]})),_:2},1032,["disabled","onClick"]),Object(r["s"])(J,{visible:e.row.visible,"onUpdate:visible":function(t){return e.row.visible=t},placement:"top"},{reference:Object(r["lb"])((function(){return[Object(r["s"])(U,{size:"mini",type:"danger",icon:"el-icon-delete"},{default:Object(r["lb"])((function(){return[j]})),_:1})]})),default:Object(r["lb"])((function(){return[f,Object(r["o"])("div",m,[Object(r["s"])(U,{size:"mini",type:"text",onClick:function(t){return e.row.visible=!1}},{default:Object(r["lb"])((function(){return[p]})),_:2},1032,["onClick"]),Object(r["s"])(U,{type:"primary",size:"mini",onClick:function(t){return V.deleteField(e.$index)}},{default:Object(r["lb"])((function(){return[O]})),_:2},1032,["onClick"])])]})),_:2},1032,["visible","onUpdate:visible"])]})),_:1})]})),_:1},8,["data"]),Object(r["s"])(q,{type:"danger"},{default:Object(r["lb"])((function(){return[g]})),_:1}),Object(r["o"])("div",v,[Object(r["s"])(U,{size:"mini",type:"primary",onClick:t[11]||(t[11]=function(e){return V.enterForm(!0)})},{default:Object(r["lb"])((function(){return[h]})),_:1}),Object(r["s"])(U,{size:"mini",type:"primary",onClick:t[12]||(t[12]=function(e){return V.enterForm(!1)})},{default:Object(r["lb"])((function(){return[y]})),_:1})]),Object(r["s"])(B,{modelValue:T.dialogFlag,"onUpdate:modelValue":t[13]||(t[13]=function(e){return T.dialogFlag=e}),title:"组件内容"},{footer:Object(r["lb"])((function(){return[Object(r["o"])("div",N,[Object(r["s"])(U,{size:"mini",onClick:V.closeDialog},{default:Object(r["lb"])((function(){return[w]})),_:1},8,["onClick"]),Object(r["s"])(U,{size:"mini",type:"primary",onClick:V.enterDialog},{default:Object(r["lb"])((function(){return[x]})),_:1},8,["onClick"])])]})),default:Object(r["lb"])((function(){return[T.dialogFlag?(Object(r["N"])(),Object(r["l"])(H,{key:0,ref:"fieldDialog","dialog-middle":T.dialogMiddle},null,8,["dialog-middle"])):Object(r["m"])("",!0)]})),_:1},8,["modelValue"]),Object(r["s"])(B,{modelValue:T.previewFlag,"onUpdate:modelValue":t[15]||(t[15]=function(e){return T.previewFlag=e})},{footer:Object(r["lb"])((function(){return[Object(r["o"])("div",C,[Object(r["s"])(U,{type:"primary",onClick:t[14]||(t[14]=function(e){return T.previewFlag=!1})},{default:Object(r["lb"])((function(){return[k]})),_:1})])]})),default:Object(r["lb"])((function(){return[T.previewFlag?(Object(r["N"])(),Object(r["l"])(P,{key:0,"preview-code":T.preViewCode},null,8,["preview-code"])):Object(r["m"])("",!0)]})),_:1},8,["modelValue"])])}Object(r["O"])();var T=n("1da1"),V=(n("96cf"),n("a434"),n("45fc"),n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("d81d"),n("a9e3"),n("c77a")),D=n("ca09"),F=n("2a18"),S=n("47fe"),U=n("0680"),R={fieldName:"",fieldDesc:"",fieldType:"",dataType:"",fieldJson:"",columnName:"",dataTypeLong:"",comment:"",fieldSearchType:"",dictType:""},A={name:"AutoCode",components:{FieldDialog:V["default"],PreviewCodeDialg:D["default"]},data:function(){return{activeNames:[""],preViewCode:{},dbform:{dbName:"",tableName:""},dbOptions:[],tableOptions:[],addFlag:"",fdMap:{},form:{structName:"",tableName:"",packageName:"",abbreviation:"",description:"",autoCreateApiToSql:!1,autoMoveFile:!1,fields:[]},rules:{structName:[{required:!0,message:"请输入结构体名称",trigger:"blur"}],abbreviation:[{required:!0,message:"请输入结构体简称",trigger:"blur"}],description:[{required:!0,message:"请输入结构体描述",trigger:"blur"}],packageName:[{required:!0,message:"文件名称：sysXxxxXxxx",trigger:"blur"}]},dialogMiddle:{},bk:{},dialogFlag:!1,previewFlag:!1}},created:function(){this.getDb(),this.setFdMap();var e=this.$route.params.id;e&&this.getAutoCodeJson(e)},methods:{editAndAddField:function(e){this.dialogFlag=!0,e?(this.addFlag="edit",this.bk=JSON.parse(JSON.stringify(e)),this.dialogMiddle=e):(this.addFlag="add",this.dialogMiddle=JSON.parse(JSON.stringify(R)))},moveUpField:function(e){if(0!==e){var t=this.form.fields[e-1];this.form.fields.splice(e-1,1),this.form.fields.splice(e,0,t)}},moveDownField:function(e){var t=this.form.fields.length;if(e!==t-1){var n=this.form.fields[e+1];this.form.fields.splice(e+1,1),this.form.fields.splice(e,0,n)}},enterDialog:function(){var e=this;this.$refs.fieldDialog.$refs.fieldDialogFrom.validate((function(t){if(!t)return!1;e.dialogMiddle.fieldName=Object(F["toUpperCase"])(e.dialogMiddle.fieldName),"add"===e.addFlag&&e.form.fields.push(e.dialogMiddle),e.dialogFlag=!1}))},closeDialog:function(){"edit"===this.addFlag&&(this.dialogMiddle=this.bk),this.dialogFlag=!1},deleteField:function(e){this.form.fields.splice(e,1)},enterForm:function(e){var t=this;return Object(T["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!(t.form.fields.length<=0)){n.next=3;break}return t.$message({type:"error",message:"请填写至少一个field"}),n.abrupt("return",!1);case 3:if(!t.form.fields.some((function(e){return e.fieldName===t.form.structName}))){n.next=6;break}return t.$message({type:"error",message:"存在与结构体同名的字段"}),n.abrupt("return",!1);case 6:t.$refs.autoCodeForm.validate(function(){var n=Object(T["a"])(regeneratorRuntime.mark((function n(r){var a,l,o,i,c,u,d;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!r){n.next=30;break}if(t.form.structName=Object(F["toUpperCase"])(t.form.structName),t.form.structName!==t.form.abbreviation){n.next=5;break}return t.$message({type:"error",message:"structName和struct简称不能相同"}),n.abrupt("return",!1);case 5:if(t.form.humpPackageName=Object(F["toSQLLine"])(t.form.packageName),!e){n.next=14;break}return n.next=9,Object(S["preview"])(t.form);case 9:a=n.sent,t.preViewCode=a.data.autoCode,t.previewFlag=!0,n.next=28;break;case 14:return n.next=16,Object(S["createTemp"])(t.form);case 16:if(o=n.sent,"false"!==(null===(l=o.headers)||void 0===l?void 0:l.success)){n.next=21;break}return n.abrupt("return");case 21:if(!t.form.autoMoveFile){n.next=24;break}return t.$message({type:"success",message:"自动化代码创建成功，自动移动成功"}),n.abrupt("return");case 24:t.$message({type:"success",message:"自动化代码创建成功，正在下载"});case 25:i=new Blob([o]),c="ginvueadmin.zip","download"in document.createElement("a")?(u=window.URL.createObjectURL(i),d=document.createElement("a"),d.style.display="none",d.href=u,d.setAttribute("download",c),document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(u)):window.navigator.msSaveBlob(i,c);case 28:n.next=31;break;case 30:return n.abrupt("return",!1);case 31:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}());case 7:case"end":return n.stop()}}),n)})))()},getDb:function(){var e=this;return Object(T["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(S["getDB"])();case 2:n=t.sent,0===n.code&&(e.dbOptions=n.data.dbs);case 4:case"end":return t.stop()}}),t)})))()},getTable:function(){var e=this;return Object(T["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(S["getTable"])({dbName:e.dbform.dbName});case 2:n=t.sent,0===n.code&&(e.tableOptions=n.data.tables),e.dbform.tableName="";case 5:case"end":return t.stop()}}),t)})))()},getColumn:function(){var e=this;return Object(T["a"])(regeneratorRuntime.mark((function t(){var n,r,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=["id","created_at","updated_at","deleted_at"],t.next=3,Object(S["getColumn"])(e.dbform);case 3:r=t.sent,0===r.code&&(a=Object(F["toHump"])(e.dbform.tableName),e.form.structName=Object(F["toUpperCase"])(a),e.form.tableName=e.dbform.tableName,e.form.packageName=a,e.form.abbreviation=a,e.form.description=a+"表",e.form.autoCreateApiToSql=!0,e.form.fields=[],r.data.columns&&r.data.columns.map((function(t){if(!n.some((function(e){return e===t.columnName}))){var r=Object(F["toHump"])(t.columnName);e.form.fields.push({fieldName:Object(F["toUpperCase"])(r),fieldDesc:t.columnComment||r+"字段",fieldType:e.fdMap[t.dataType],dataType:t.dataType,fieldJson:r,dataTypeLong:t.dataTypeLong,columnName:t.columnName,comment:t.columnComment,fieldSearchType:"",dictType:""})}})));case 5:case"end":return t.stop()}}),t)})))()},setFdMap:function(){var e=this;return Object(T["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=["string","int","bool","float64","time.Time"],n.map(function(){var t=Object(T["a"])(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(U["getDict"])(n);case 2:r=t.sent,r&&r.map((function(t){e.fdMap[t.label]=n}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()},getAutoCodeJson:function(e){var t=this;return Object(T["a"])(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,Object(S["getMeta"])({id:Number(e)});case 2:r=n.sent,0===r.code&&(t.form=JSON.parse(r.data.meta));case 4:case"end":return n.stop()}}),n)})))()}}},M=(n("30bb"),n("d959")),I=n.n(M);const L=I()(A,[["render",_],["__scopeId","data-v-35d769a0"]]);t["default"]=L},c77a:function(e,t,n){"use strict";n.r(t);n("99af"),n("b0c0");var r=n("7a23"),a=Object(r["o"])("span",{style:{color:"red"}},"搜索时如果条件为LIKE只支持字符串",-1),l=Object(r["r"])("自动填充");function o(e,t,n,o,i,c){var u=Object(r["W"])("el-input"),d=Object(r["W"])("el-col"),b=Object(r["W"])("el-button"),s=Object(r["W"])("el-form-item"),f=Object(r["W"])("el-option"),m=Object(r["W"])("el-select"),p=Object(r["W"])("el-form");return Object(r["N"])(),Object(r["n"])("div",null,[a,Object(r["s"])(p,{ref:"fieldDialogFrom",model:i.middleDate,"label-width":"120px","label-position":"left",rules:i.rules},{default:Object(r["lb"])((function(){return[Object(r["s"])(s,{label:"Field名称",prop:"fieldName"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:6},{default:Object(r["lb"])((function(){return[Object(r["s"])(u,{modelValue:i.middleDate.fieldName,"onUpdate:modelValue":t[0]||(t[0]=function(e){return i.middleDate.fieldName=e}),autocomplete:"off"},null,8,["modelValue"])]})),_:1}),Object(r["s"])(d,{offset:1,span:2},{default:Object(r["lb"])((function(){return[Object(r["s"])(b,{size:"mini",onClick:c.autoFill},{default:Object(r["lb"])((function(){return[l]})),_:1},8,["onClick"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"Field中文名",prop:"fieldDesc"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:6},{default:Object(r["lb"])((function(){return[Object(r["s"])(u,{modelValue:i.middleDate.fieldDesc,"onUpdate:modelValue":t[1]||(t[1]=function(e){return i.middleDate.fieldDesc=e}),autocomplete:"off"},null,8,["modelValue"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"FieldJSON",prop:"fieldJson"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:6},{default:Object(r["lb"])((function(){return[Object(r["s"])(u,{modelValue:i.middleDate.fieldJson,"onUpdate:modelValue":t[2]||(t[2]=function(e){return i.middleDate.fieldJson=e}),autocomplete:"off"},null,8,["modelValue"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"数据库字段名",prop:"columnName"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:6},{default:Object(r["lb"])((function(){return[Object(r["s"])(u,{modelValue:i.middleDate.columnName,"onUpdate:modelValue":t[3]||(t[3]=function(e){return i.middleDate.columnName=e}),autocomplete:"off"},null,8,["modelValue"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"数据库字段描述",prop:"comment"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:6},{default:Object(r["lb"])((function(){return[Object(r["s"])(u,{modelValue:i.middleDate.comment,"onUpdate:modelValue":t[4]||(t[4]=function(e){return i.middleDate.comment=e}),autocomplete:"off"},null,8,["modelValue"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"Field数据类型",prop:"fieldType"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:8},{default:Object(r["lb"])((function(){return[Object(r["s"])(m,{modelValue:i.middleDate.fieldType,"onUpdate:modelValue":t[5]||(t[5]=function(e){return i.middleDate.fieldType=e}),placeholder:"请选择field数据类型",clearable:"",onChange:c.getDbfdOptions},{default:Object(r["lb"])((function(){return[(Object(r["N"])(!0),Object(r["n"])(r["b"],null,Object(r["U"])(i.typeOptions,(function(e){return Object(r["N"])(),Object(r["l"])(f,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])})),128))]})),_:1},8,["modelValue","onChange"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"数据库字段类型",prop:"dataType"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:8},{default:Object(r["lb"])((function(){return[Object(r["s"])(m,{modelValue:i.middleDate.dataType,"onUpdate:modelValue":t[6]||(t[6]=function(e){return i.middleDate.dataType=e}),disabled:!i.middleDate.fieldType,placeholder:"请选择数据库字段类型",clearable:""},{default:Object(r["lb"])((function(){return[(Object(r["N"])(!0),Object(r["n"])(r["b"],null,Object(r["U"])(i.dbfdOptions,(function(e){return Object(r["N"])(),Object(r["l"])(f,{key:e.label,label:e.label,value:e.label},null,8,["label","value"])})),128))]})),_:1},8,["modelValue","disabled"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"数据库字段长度",prop:"dataTypeLong"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:8},{default:Object(r["lb"])((function(){return[Object(r["s"])(u,{modelValue:i.middleDate.dataTypeLong,"onUpdate:modelValue":t[7]||(t[7]=function(e){return i.middleDate.dataTypeLong=e}),placeholder:"自定义类型必须指定长度",disabled:!i.middleDate.dataType},null,8,["modelValue","disabled"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"Field查询条件",prop:"fieldSearchType"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:8},{default:Object(r["lb"])((function(){return[Object(r["s"])(m,{modelValue:i.middleDate.fieldSearchType,"onUpdate:modelValue":t[8]||(t[8]=function(e){return i.middleDate.fieldSearchType=e}),placeholder:"请选择Field查询条件",clearable:""},{default:Object(r["lb"])((function(){return[(Object(r["N"])(!0),Object(r["n"])(r["b"],null,Object(r["U"])(i.typeSearchOptions,(function(e){return Object(r["N"])(),Object(r["l"])(f,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])})),128))]})),_:1},8,["modelValue"])]})),_:1})]})),_:1}),Object(r["s"])(s,{label:"关联字典",prop:"dictType"},{default:Object(r["lb"])((function(){return[Object(r["s"])(d,{span:8},{default:Object(r["lb"])((function(){return[Object(r["s"])(m,{modelValue:i.middleDate.dictType,"onUpdate:modelValue":t[9]||(t[9]=function(e){return i.middleDate.dictType=e}),disabled:"int"!==i.middleDate.fieldType,placeholder:"请选择字典",clearable:""},{default:Object(r["lb"])((function(){return[(Object(r["N"])(!0),Object(r["n"])(r["b"],null,Object(r["U"])(i.dictOptions,(function(e){return Object(r["N"])(),Object(r["l"])(f,{key:e.type,label:"".concat(e.type,"(").concat(e.name,")"),value:e.type},null,8,["label","value"])})),128))]})),_:1},8,["modelValue","disabled"])]})),_:1})]})),_:1})]})),_:1},8,["model","rules"])])}var i=n("1da1"),c=(n("96cf"),n("0680")),u=n("2a18"),d=n("b00a"),b={name:"FieldDialog",props:{dialogMiddle:{type:Object,default:function(){return{}}}},data:function(){return{middleDate:{},dbfdOptions:[],dictOptions:[],typeSearchOptions:[{label:"=",value:"="},{label:"<>",value:"<>"},{label:">",value:">"},{label:"<",value:"<"},{label:"LIKE",value:"LIKE"}],typeOptions:[{label:"字符串",value:"string"},{label:"整型",value:"int"},{label:"布尔值",value:"bool"},{label:"浮点型",value:"float64"},{label:"时间",value:"time.Time"}],rules:{fieldName:[{required:!0,message:"请输入field英文名",trigger:"blur"}],fieldDesc:[{required:!0,message:"请输入field中文名",trigger:"blur"}],fieldJson:[{required:!0,message:"请输入field格式化json",trigger:"blur"}],columnName:[{required:!0,message:"请输入数据库字段",trigger:"blur"}],fieldType:[{required:!0,message:"请选择field数据类型",trigger:"blur"}]}}},created:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.middleDate=e.dialogMiddle,t.next=3,Object(d["getSysDictionaryList"])({page:1,pageSize:999999});case 3:n=t.sent,e.dictOptions=n.data.list;case 5:case"end":return t.stop()}}),t)})))()},methods:{autoFill:function(){this.middleDate.fieldJson=Object(u["toLowerCase"])(this.middleDate.fieldName),this.middleDate.columnName=Object(u["toSQLLine"])(this.middleDate.fieldJson)},getDbfdOptions:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.middleDate.dataType="",e.middleDate.dataTypeLong="",e.middleDate.fieldSearchType="",e.middleDate.dictType="",!e.middleDate.fieldType){t.next=8;break}return t.next=7,Object(c["getDict"])(e.middleDate.fieldType);case 7:e.dbfdOptions=t.sent;case 8:case"end":return t.stop()}}),t)})))()}}},s=n("d959"),f=n.n(s);const m=f()(b,[["render",o]]);t["default"]=m},ca09:function(e,t,n){"use strict";n.r(t);var r=n("7a23"),a={class:"previewCode"},l={class:"previewCodeTool"},o=Object(r["o"])("p",null,"操作栏：",-1),i=Object(r["r"])("全选"),c=Object(r["r"])("复制"),u=["id"];function d(e,t,n,d,b,s){var f=Object(r["W"])("el-button"),m=Object(r["W"])("el-tab-pane"),p=Object(r["W"])("el-tabs");return Object(r["N"])(),Object(r["n"])("div",a,[Object(r["o"])("div",l,[o,Object(r["s"])(f,{onClick:s.selectText},{default:Object(r["lb"])((function(){return[i]})),_:1},8,["onClick"]),Object(r["s"])(f,{onClick:s.copy},{default:Object(r["lb"])((function(){return[c]})),_:1},8,["onClick"])]),Object(r["s"])(p,{modelValue:b.activeName,"onUpdate:modelValue":t[0]||(t[0]=function(e){return b.activeName=e})},{default:Object(r["lb"])((function(){return[(Object(r["N"])(!0),Object(r["n"])(r["b"],null,Object(r["U"])(n.previewCode,(function(e,t){return Object(r["N"])(),Object(r["l"])(m,{key:t,label:t,name:t},{default:Object(r["lb"])((function(){return[Object(r["o"])("div",{id:t,class:"tab-info"},null,8,u)]})),_:2},1032,["label","name"])})),128))]})),_:1},8,["modelValue"])])}var b=n("0e54"),s=n.n(b),f=n("1487"),m=n.n(f),p=(n("8d5f"),{props:{previewCode:{type:Object,default:function(){return{}}}},data:function(){return{activeName:""}},mounted:function(){for(var e in s.a.setOptions({renderer:new s.a.Renderer,highlight:function(e){return m.a.highlightAuto(e).value},pedantic:!1,gfm:!0,tables:!0,breaks:!1,sanitize:!1,smartLists:!0,smartypants:!1,xhtml:!1}),this.previewCode)""===this.activeName&&(this.activeName=e),document.getElementById(e).innerHTML=s()(this.previewCode[e])},methods:{selectText:function(){var e=document.getElementById(this.activeName);if(document.body.createTextRange){var t=document.body.createTextRange();t.moveToElementText(e),t.select()}else if(window.getSelection){var n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r)}else alert("none")},copy:function(){this.selectText(),document.execCommand("copy"),this.$message.success("复制成功")}}}),O=(n("8fb1"),n("d959")),j=n.n(O);const g=j()(p,[["render",d]]);t["default"]=g},e01a:function(e,t,n){"use strict";var r=n("23e7"),a=n("83ab"),l=n("da84"),o=n("5135"),i=n("861d"),c=n("9bf2").f,u=n("e893"),d=l.Symbol;if(a&&"function"==typeof d&&(!("description"in d.prototype)||void 0!==d().description)){var b={},s=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof s?new d(e):void 0===e?d():d(e);return""===e&&(b[t]=!0),t};u(s,d);var f=s.prototype=d.prototype;f.constructor=s;var m=f.toString,p="Symbol(test)"==String(d("test")),O=/^Symbol\((.*)\)[^)]+$/;c(f,"description",{configurable:!0,get:function(){var e=i(this)?this.valueOf():this,t=m.call(e);if(o(b,e))return"";var n=p?t.slice(7,-1):t.replace(O,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:s})}}}]);