(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-548b6580","chunk-2d230898","chunk-2d0de3b1"],{"04d1":function(e,t,l){var n=l("342f"),o=n.match(/firefox\/(\d+)/i);e.exports=!!o&&+o[1]},"4b72":function(e,t,l){"use strict";l.d(t,"f",(function(){return o})),l.d(t,"e",(function(){return a})),l.d(t,"c",(function(){return r})),l.d(t,"i",(function(){return s})),l.d(t,"d",(function(){return i})),l.d(t,"g",(function(){return u})),l.d(t,"a",(function(){return c})),l.d(t,"b",(function(){return m})),l.d(t,"h",(function(){return f}));var n=l("b775");function o(e){return Object(n["a"])({url:"/code/gen/list",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/code/gen/db/list",method:"get",params:e})}function r(e){return Object(n["a"])({url:"/code/gen/"+e,method:"get"})}function s(e){return Object(n["a"])({url:"/code/gen",method:"put",data:e})}function i(e){return Object(n["a"])({url:"/code/gen/importTable",method:"post",params:e})}function u(e){return Object(n["a"])({url:"/code/gen/preview/"+e,method:"get"})}function c(e){return Object(n["a"])({url:"/code/gen/"+e,method:"delete"})}function m(e){return Object(n["a"])({url:"/code/gen/genCode/"+e,method:"get"})}function f(e){return Object(n["a"])({url:"/code/gen/synchDb/"+e,method:"get"})}},"4e82":function(e,t,l){"use strict";var n=l("23e7"),o=l("e330"),a=l("59ed"),r=l("7b0b"),s=l("07fa"),i=l("083a"),u=l("577e"),c=l("d039"),m=l("addb"),f=l("a640"),p=l("04d1"),d=l("d998"),b=l("2d00"),h=l("512ce"),v=[],g=o(v.sort),y=o(v.push),w=c((function(){v.sort(void 0)})),k=c((function(){v.sort(null)})),N=f("sort"),x=!c((function(){if(b)return b<70;if(!(p&&p>3)){if(d)return!0;if(h)return h<603;var e,t,l,n,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:l=3;break;case 68:case 71:l=4;break;default:l=2}for(n=0;n<47;n++)v.push({k:t+n,v:l})}for(v.sort((function(e,t){return t.v-e.v})),n=0;nu(l)?1:-1}};n({target:"Array",proto:!0,forced:C},{sort:function(e){void 0!==e&&a(e);var t=r(this);if(x)return void 0===e?g(t):g(t,e);var l,n,o=[],u=s(t);for(n=0;n",value:"GT"}}),l("el-option",{attrs:{label:">=",value:"GTE"}}),l("el-option",{attrs:{label:"<",value:"LT"}}),l("el-option",{attrs:{label:"<=",value:"LTE"}}),l("el-option",{attrs:{label:"LIKE",value:"LIKE"}}),l("el-option",{attrs:{label:"BETWEEN",value:"BETWEEN"}})],1)]}}])}),l("el-table-column",{attrs:{label:"必填","min-width":"5%"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-checkbox",{attrs:{"true-label":"1","false-label":"0"},model:{value:t.row.isRequired,callback:function(l){e.$set(t.row,"isRequired",l)},expression:"scope.row.isRequired"}})]}}])}),l("el-table-column",{attrs:{label:"显示类型","min-width":"12%"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-select",{model:{value:t.row.htmlType,callback:function(l){e.$set(t.row,"htmlType",l)},expression:"scope.row.htmlType"}},[l("el-option",{attrs:{label:"文本框",value:"input"}}),l("el-option",{attrs:{label:"文本域",value:"textarea"}}),l("el-option",{attrs:{label:"下拉框",value:"select"}}),l("el-option",{attrs:{label:"单选框",value:"radio"}}),l("el-option",{attrs:{label:"复选框",value:"checkbox"}}),l("el-option",{attrs:{label:"日期控件",value:"datetime"}}),l("el-option",{attrs:{label:"图片上传",value:"imageUpload"}}),l("el-option",{attrs:{label:"文件上传",value:"fileUpload"}}),l("el-option",{attrs:{label:"富文本控件",value:"editor"}})],1)]}}])}),l("el-table-column",{attrs:{label:"字典类型","min-width":"12%"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择"},model:{value:t.row.dictType,callback:function(l){e.$set(t.row,"dictType",l)},expression:"scope.row.dictType"}},e._l(e.dictOptions,(function(t){return l("el-option",{key:t.dictType,attrs:{label:t.dictName,value:t.dictType}},[l("span",{staticStyle:{float:"left"}},[e._v(e._s(t.dictName))]),l("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(t.dictType))])])})),1)]}}])})],1)],1),l("el-tab-pane",{attrs:{label:"生成信息",name:"genInfo"}},[l("gen-info-form",{ref:"genInfo",attrs:{info:e.info,tables:e.tables,menus:e.menus}})],1)],1),l("el-form",{attrs:{"label-width":"100px"}},[l("el-form-item",{staticStyle:{"text-align":"center","margin-left":"-100px","margin-top":"10px"}},[l("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm()}}},[e._v("提交")]),l("el-button",{on:{click:function(t){return e.close()}}},[e._v("返回")])],1)],1)],1)},o=[],a=(l("d3b7"),l("3ca3"),l("ddb0"),l("d81d"),l("a434"),l("4e82"),l("4b72")),r=l("ed45"),s=l("a6dc"),i=l("ed69"),u=l("8586"),c=l("aa47"),m={name:"GenEdit",components:{basicInfoForm:i["default"],genInfoForm:u["default"]},data:function(){return{activeName:"columnInfo",tableHeight:document.documentElement.scrollHeight-245+"px",tables:[],columns:[],dictOptions:[],menus:[],info:{}}},created:function(){var e=this,t=this.$route.params&&this.$route.params.tableId;t&&(Object(a["c"])(t).then((function(t){e.columns=t.data.rows,e.info=t.data.info,e.tables=t.data.tables})),Object(r["e"])().then((function(t){e.dictOptions=t.data})),Object(s["d"])().then((function(t){e.menus=e.handleTree(t.data,"menuId")})))},methods:{submitForm:function(){var e=this,t=this.$refs.basicInfo.$refs.basicInfoForm,l=this.$refs.genInfo.$refs.genInfoForm;Promise.all([t,l].map(this.getFormPromise)).then((function(n){var o=n.every((function(e){return!!e}));if(o){var r=Object.assign({},t.model,l.model);r.columns=e.columns,r.params={treeCode:r.treeCode,treeName:r.treeName,treeParentCode:r.treeParentCode,parentMenuId:r.parentMenuId},Object(a["i"])(r).then((function(t){e.$modal.msgSuccess(t.msg),200===t.code&&e.close()}))}else e.$modal.msgError("表单校验未通过,请重新检查提交内容")}))},getFormPromise:function(e){return new Promise((function(t){e.validate((function(e){t(e)}))}))},close:function(){var e={path:"/tool/gen",query:{t:Date.now(),pageNum:this.$route.query.pageNum}};this.$tab.closeOpenPage(e)}},mounted:function(){var e=this,t=this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];c["default"].create(t,{handle:".allowDrag",onEnd:function(t){var l=e.columns.splice(t.oldIndex,1)[0];for(var n in e.columns.splice(t.newIndex,0,l),e.columns)e.columns[n].sort=parseInt(n)+1}})}},f=m,p=l("2877"),d=Object(p["a"])(f,n,o,!1,null,null,null);t["default"]=d.exports},8586:function(e,t,l){"use strict";l.r(t);var n=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-form",{ref:"genInfoForm",attrs:{model:e.info,rules:e.rules,"label-width":"150px"}},[l("el-row",[l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"tplCategory"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("生成模板")]),l("el-select",{on:{change:e.tplSelectChange},model:{value:e.info.tplCategory,callback:function(t){e.$set(e.info,"tplCategory",t)},expression:"info.tplCategory"}},[l("el-option",{attrs:{label:"单表(增删改查)",value:"crud"}}),l("el-option",{attrs:{label:"树表(增删改查)",value:"tree"}}),l("el-option",{attrs:{label:"主子表(增删改查)",value:"sub"}})],1)],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"packageName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 生成包路径 "),l("el-tooltip",{attrs:{content:"生成在哪个java包下,例如 com.vctgo.system",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-input",{model:{value:e.info.packageName,callback:function(t){e.$set(e.info,"packageName",t)},expression:"info.packageName"}})],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"moduleName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 生成模块名 "),l("el-tooltip",{attrs:{content:"可理解为子系统名,例如 system",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-input",{model:{value:e.info.moduleName,callback:function(t){e.$set(e.info,"moduleName",t)},expression:"info.moduleName"}})],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"businessName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 生成业务名 "),l("el-tooltip",{attrs:{content:"可理解为功能英文名,例如 user",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-input",{model:{value:e.info.businessName,callback:function(t){e.$set(e.info,"businessName",t)},expression:"info.businessName"}})],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"functionName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 生成功能名 "),l("el-tooltip",{attrs:{content:"用作类描述,例如 用户",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-input",{model:{value:e.info.functionName,callback:function(t){e.$set(e.info,"functionName",t)},expression:"info.functionName"}})],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 上级菜单 "),l("el-tooltip",{attrs:{content:"分配到指定菜单下,例如 系统管理",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("treeselect",{attrs:{"append-to-body":!0,options:e.menus,normalizer:e.normalizer,"show-count":!0,placeholder:"请选择系统菜单"},model:{value:e.info.parentMenuId,callback:function(t){e.$set(e.info,"parentMenuId",t)},expression:"info.parentMenuId"}})],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"genType"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 生成代码方式 "),l("el-tooltip",{attrs:{content:"默认为zip压缩包下载,也可以自定义生成路径",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-radio",{attrs:{label:"0"},model:{value:e.info.genType,callback:function(t){e.$set(e.info,"genType",t)},expression:"info.genType"}},[e._v("zip压缩包")]),l("el-radio",{attrs:{label:"1"},model:{value:e.info.genType,callback:function(t){e.$set(e.info,"genType",t)},expression:"info.genType"}},[e._v("自定义路径")])],1)],1),"1"==e.info.genType?l("el-col",{attrs:{span:24}},[l("el-form-item",{attrs:{prop:"genPath"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 自定义路径 "),l("el-tooltip",{attrs:{content:"填写磁盘绝对路径,若不填写,则生成到当前Web项目下",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-input",{model:{value:e.info.genPath,callback:function(t){e.$set(e.info,"genPath",t)},expression:"info.genPath"}},[l("el-dropdown",{attrs:{slot:"append"},slot:"append"},[l("el-button",{attrs:{type:"primary"}},[e._v(" 最近路径快速选择 "),l("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[l("el-dropdown-item",{nativeOn:{click:function(t){e.info.genPath="/"}}},[e._v("恢复默认的生成基础路径")])],1)],1)],1)],1)],1):e._e()],1),l("el-row",{directives:[{name:"show",rawName:"v-show",value:"tree"==e.info.tplCategory,expression:"info.tplCategory == 'tree'"}]},[l("h4",{staticClass:"form-header"},[e._v("其他信息")]),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 树编码字段 "),l("el-tooltip",{attrs:{content:"树显示的编码字段名, 如:dept_id",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-select",{attrs:{placeholder:"请选择"},model:{value:e.info.treeCode,callback:function(t){e.$set(e.info,"treeCode",t)},expression:"info.treeCode"}},e._l(e.info.columns,(function(e,t){return l("el-option",{key:t,attrs:{label:e.columnName+":"+e.columnComment,value:e.columnName}})})),1)],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 树父编码字段 "),l("el-tooltip",{attrs:{content:"树显示的父编码字段名, 如:parent_Id",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-select",{attrs:{placeholder:"请选择"},model:{value:e.info.treeParentCode,callback:function(t){e.$set(e.info,"treeParentCode",t)},expression:"info.treeParentCode"}},e._l(e.info.columns,(function(e,t){return l("el-option",{key:t,attrs:{label:e.columnName+":"+e.columnComment,value:e.columnName}})})),1)],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 树名称字段 "),l("el-tooltip",{attrs:{content:"树节点的显示名称字段名, 如:dept_name",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-select",{attrs:{placeholder:"请选择"},model:{value:e.info.treeName,callback:function(t){e.$set(e.info,"treeName",t)},expression:"info.treeName"}},e._l(e.info.columns,(function(e,t){return l("el-option",{key:t,attrs:{label:e.columnName+":"+e.columnComment,value:e.columnName}})})),1)],1)],1)],1),l("el-row",{directives:[{name:"show",rawName:"v-show",value:"sub"==e.info.tplCategory,expression:"info.tplCategory == 'sub'"}]},[l("h4",{staticClass:"form-header"},[e._v("关联信息")]),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 关联子表的表名 "),l("el-tooltip",{attrs:{content:"关联子表的表名, 如:sys_user",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-select",{attrs:{placeholder:"请选择"},on:{change:e.subSelectChange},model:{value:e.info.subTableName,callback:function(t){e.$set(e.info,"subTableName",t)},expression:"info.subTableName"}},e._l(e.tables,(function(e,t){return l("el-option",{key:t,attrs:{label:e.tableName+":"+e.tableComment,value:e.tableName}})})),1)],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 子表关联的外键名 "),l("el-tooltip",{attrs:{content:"子表关联的外键名, 如:user_id",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),l("el-select",{attrs:{placeholder:"请选择"},model:{value:e.info.subTableFkName,callback:function(t){e.$set(e.info,"subTableFkName",t)},expression:"info.subTableFkName"}},e._l(e.subColumns,(function(e,t){return l("el-option",{key:t,attrs:{label:e.columnName+":"+e.columnComment,value:e.columnName}})})),1)],1)],1)],1)],1)},o=[],a=l("ca17"),r=l.n(a),s=(l("542c"),{components:{Treeselect:r.a},props:{info:{type:Object,default:null},tables:{type:Array,default:null},menus:{type:Array,default:[]}},data:function(){return{subColumns:[],rules:{tplCategory:[{required:!0,message:"请选择生成模板",trigger:"blur"}],packageName:[{required:!0,message:"请输入生成包路径",trigger:"blur"}],moduleName:[{required:!0,message:"请输入生成模块名",trigger:"blur"}],businessName:[{required:!0,message:"请输入生成业务名",trigger:"blur"}],functionName:[{required:!0,message:"请输入生成功能名",trigger:"blur"}]}}},created:function(){},watch:{"info.subTableName":function(e){this.setSubTableColumns(e)}},methods:{normalizer:function(e){return e.children&&!e.children.length&&delete e.children,{id:e.menuId,label:e.menuName,children:e.children}},subSelectChange:function(e){this.info.subTableFkName=""},tplSelectChange:function(e){"sub"!==e&&(this.info.subTableName="",this.info.subTableFkName="")},setSubTableColumns:function(e){for(var t in this.tables){var l=this.tables[t].tableName;if(e===l){this.subColumns=this.tables[t].columns;break}}}}}),i=s,u=l("2877"),c=Object(u["a"])(i,n,o,!1,null,null,null);t["default"]=c.exports},a6dc:function(e,t,l){"use strict";l.d(t,"d",(function(){return o})),l.d(t,"e",(function(){return a})),l.d(t,"c",(function(){return r})),l.d(t,"g",(function(){return s})),l.d(t,"f",(function(){return i})),l.d(t,"a",(function(){return u})),l.d(t,"h",(function(){return c})),l.d(t,"b",(function(){return m}));var n=l("b775");function o(e){return Object(n["a"])({url:"/system/menu/list",method:"get",params:e})}function a(){return Object(n["a"])({url:"/system/menu/list-all-simple",method:"get"})}function r(e){return Object(n["a"])({url:"/system/menu/"+e,method:"get"})}function s(){return Object(n["a"])({url:"/system/menu/treeselect",method:"get"})}function i(e){return Object(n["a"])({url:"/system/menu/roleMenuTreeselect/"+e,method:"get"})}function u(e){return Object(n["a"])({url:"/system/menu",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/system/menu",method:"put",data:e})}function m(e){return Object(n["a"])({url:"/system/menu/"+e,method:"delete"})}},addb:function(e,t,l){var n=l("4dae"),o=Math.floor,a=function(e,t){var l=e.length,i=o(l/2);return l<8?r(e,t):s(e,a(n(e,0,i),t),a(n(e,i),t),t)},r=function(e,t){var l,n,o=e.length,a=1;while(a0)e[n]=e[--n];n!==a++&&(e[n]=l)}return e},s=function(e,t,l,n){var o=t.length,a=l.length,r=0,s=0;while(r