chunk-f0ff.8440315a.js 17 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f0ff","Hu/7","+/Ti"],{"+/Ti":function(e,t,l){"use strict";l.r(t);var a={name:"BasicInfoForm",props:{info:{type:Object,default:null}},data:function(){return{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(){}},o=l("KHd+"),n=Object(o.a)(a,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("生成模板")]),e._v(" "),l("el-select",{model:{value:e.info.tplCategory,callback:function(t){e.$set(e.info,"tplCategory",t)},expression:"info.tplCategory"}},[l("el-option",{attrs:{label:"单表(增删改查)",value:"crud"}}),e._v(" "),l("el-option",{attrs:{label:"树表(增删改查)",value:"tree",disabled:""}})],1)],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"packageName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 生成包路径\n "),l("el-tooltip",{attrs:{content:"生成在哪个java包下,例如 com.ruoyi.system",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),e._v(" "),l("el-input",{model:{value:e.info.packageName,callback:function(t){e.$set(e.info,"packageName",t)},expression:"info.packageName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"moduleName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 生成模块名\n "),l("el-tooltip",{attrs:{content:"可理解为子系统名,例如 system",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),e._v(" "),l("el-input",{model:{value:e.info.moduleName,callback:function(t){e.$set(e.info,"moduleName",t)},expression:"info.moduleName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"businessName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 生成业务名\n "),l("el-tooltip",{attrs:{content:"可理解为功能英文名,例如 user",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),e._v(" "),l("el-input",{model:{value:e.info.businessName,callback:function(t){e.$set(e.info,"businessName",t)},expression:"info.businessName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{prop:"functionName"}},[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 生成功能名\n "),l("el-tooltip",{attrs:{content:"用作类描述,例如 用户",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),e._v(" "),l("el-input",{model:{value:e.info.functionName,callback:function(t){e.$set(e.info,"functionName",t)},expression:"info.functionName"}})],1)],1)],1),e._v(" "),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("其他信息")]),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 树编码字段\n "),l("el-tooltip",{attrs:{content:"树显示的编码字段名, 如:dept_id",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),e._v(" "),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){return l("el-option",{key:e.columnName,attrs:{label:e.columnName+":"+e.columnComment,value:e.columnName}})}))],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 树父编码字段\n "),l("el-tooltip",{attrs:{content:"树显示的父编码字段名, 如:parent_Id",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),e._v(" "),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){return l("el-option",{key:e.columnName,attrs:{label:e.columnName+":"+e.columnComment,value:e.columnName}})}))],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",[l("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 树名称字段\n "),l("el-tooltip",{attrs:{content:"树节点的显示名称字段名, 如:dept_name",placement:"top"}},[l("i",{staticClass:"el-icon-question"})])],1),e._v(" "),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){return l("el-option",{key:e.columnName,attrs:{label:e.columnName+":"+e.columnComment,value:e.columnName}})}))],1)],1)],1)],1)},[],!1,null,null,null);n.options.__file="genInfoForm.vue";t.default=n.exports},"Hu/7":function(e,t,l){"use strict";l.r(t);var a={name:"BasicInfoForm",props:{info:{type:Object,default:null}},data:function(){return{rules:{tableName:[{required:!0,message:"请输入表名称",trigger:"blur"}],tableComment:[{required:!0,message:"请输入表描述",trigger:"blur"}],className:[{required:!0,message:"请输入实体类名称",trigger:"blur"}],functionAuthor:[{required:!0,message:"请输入作者",trigger:"blur"}]}}}},o=l("KHd+"),n=Object(o.a)(a,function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-form",{ref:"basicInfoForm",attrs:{model:e.info,rules:e.rules,"label-width":"150px"}},[l("el-row",[l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{label:"表名称",prop:"tableName"}},[l("el-input",{attrs:{placeholder:"请输入仓库名称"},model:{value:e.info.tableName,callback:function(t){e.$set(e.info,"tableName",t)},expression:"info.tableName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{label:"表描述",prop:"tableComment"}},[l("el-input",{attrs:{placeholder:"请输入"},model:{value:e.info.tableComment,callback:function(t){e.$set(e.info,"tableComment",t)},expression:"info.tableComment"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{label:"实体类名称",prop:"className"}},[l("el-input",{attrs:{placeholder:"请输入"},model:{value:e.info.className,callback:function(t){e.$set(e.info,"className",t)},expression:"info.className"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{label:"作者",prop:"functionAuthor"}},[l("el-input",{attrs:{placeholder:"请输入"},model:{value:e.info.functionAuthor,callback:function(t){e.$set(e.info,"functionAuthor",t)},expression:"info.functionAuthor"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:24}},[l("el-form-item",{attrs:{label:"备注",prop:"remark"}},[l("el-input",{attrs:{rows:3,type:"textarea"},model:{value:e.info.remark,callback:function(t){e.$set(e.info,"remark",t)},expression:"info.remark"}})],1)],1)],1)],1)},[],!1,null,null,null);n.options.__file="basicInfoForm.vue";t.default=n.exports},S3Ld:function(e,t,l){"use strict";l.d(t,"e",function(){return r}),l.d(t,"d",function(){return s}),l.d(t,"b",function(){return i}),l.d(t,"g",function(){return c}),l.d(t,"h",function(){return u}),l.d(t,"c",function(){return m}),l.d(t,"f",function(){return p}),l.d(t,"a",function(){return f});var a=l("QbLZ"),o=l.n(a),n=l("t3Un");function r(e){return Object(n.a)({method:"get",params:o()({_gp:"admin.tools.gen",_mt:"list"},e)})}function s(e){return Object(n.a)({method:"get",params:o()({_gp:"admin.tools.gen",_mt:"getDbList"},e)})}function i(e){return Object(n.a)({method:"get",params:{_gp:"admin.tools.gen",_mt:"get",id:e}})}function c(e){return Object(n.a)({method:"post",params:{_gp:"admin.tools.gen",_mt:"update",genTable:e}})}function u(e){return Object(n.a)({method:"post",params:{_gp:"admin.tools.gen",_mt:"updateColumn",genTableColumn:e}})}function m(e){return Object(n.a)({method:"post",params:o()({_gp:"admin.tools.gen",_mt:"importTableSave"},e)})}function p(e){return Object(n.a)({method:"get",params:{_gp:"admin.tools.gen",_mt:"preview",tableId:e}})}function f(e){return Object(n.a)({method:"post",params:{_gp:"admin.tools.gen",_mt:"delete",tableIds:e}})}},fhNW:function(e,t,l){"use strict";l.d(t,"d",function(){return i}),l.d(t,"c",function(){return c}),l.d(t,"a",function(){return u}),l.d(t,"f",function(){return m}),l.d(t,"b",function(){return p}),l.d(t,"e",function(){return f});var a=l("gDS+"),o=l.n(a),n=l("QbLZ"),r=l.n(n),s=l("t3Un");function i(e){return Object(s.a)({method:"get",params:r()({_gp:"admin.dictType",_mt:"list"},e)})}function c(e){return Object(s.a)({method:"get",params:{_gp:"admin.dictType",_mt:"get",dictId:e}})}function u(e){return Object(s.a)({method:"post",params:{_gp:"admin.dictType",_mt:"add",dictType:o()(e)}})}function m(e){return Object(s.a)({method:"post",params:{_gp:"admin.dictType",_mt:"update",dictType:o()(e)}})}function p(e){return Object(s.a)({method:"post",params:{_gp:"admin.dictType",_mt:"delete",dictIds:e}})}function f(){return Object(s.a)({method:"get",params:{_gp:"admin.dictType",_mt:"optionselect"}})}},"gDS+":function(e,t,l){e.exports={default:l("oh+g"),__esModule:!0}},"oh+g":function(e,t,l){var a=l("WEpk"),o=a.JSON||(a.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},tXTw:function(e,t,l){"use strict";l.r(t);var a=l("P2sY"),o=l.n(a),n=l("4d7F"),r=l.n(n),s=l("S3Ld"),i=l("fhNW"),c=l("Hu/7"),u=l("+/Ti"),m={name:"GenEdit",components:{basicInfoForm:c.default,genInfoForm:u.default},data:function(){return{activeName:"cloum",tableHeight:document.documentElement.scrollHeight-245+"px",cloumns:[],dictOptions:[],info:{}}},beforeCreate:function(){var e=this,t=this.$route.params&&this.$route.params.tableId;t&&(Object(s.b)(t).then(function(t){e.cloumns=t.data.data.rows,e.info=t.data.data.info}),Object(i.e)().then(function(t){e.dictOptions=t.data.data.items}))},methods:{submitForm:function(){var e=this,t=this.$refs.basicInfo.$refs.basicInfoForm,l=this.$refs.genInfo.$refs.genInfoForm;r.a.all([t,l].map(this.getFormPromise)).then(function(a){if(a.every(function(e){return!!e})){var n=o()({},t.model,l.model);n.params={treeCode:n.treeCode,treeName:n.treeName,treeParentCode:n.treeParentCode},Object(s.g)(n).then(function(t){t.data.data&&(e.cloumns.forEach(function(e){Object(s.h)(e)}),e.msgSuccess(t.data.errmsg),t.data.data&&e.close())})}else e.msgError("表单校验未通过,请重新检查提交内容")})},getFormPromise:function(e){return new r.a(function(t){e.validate(function(e){t(e)})})},close:function(){this.$store.dispatch("delView",this.$route),this.$router.push({path:"/tools/gen",query:{t:Date.now()}})}}},p=l("KHd+"),f=Object(p.a)(m,function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-card",[l("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[l("el-tab-pane",{attrs:{label:"基本信息",name:"basic"}},[l("basic-info-form",{ref:"basicInfo",attrs:{info:e.info}})],1),e._v(" "),l("el-tab-pane",{attrs:{label:"字段信息",name:"cloum"}},[l("el-table",{attrs:{data:e.cloumns,"max-height":e.tableHeight}},[l("el-table-column",{attrs:{label:"序号",type:"index","min-width":"5%"}}),e._v(" "),l("el-table-column",{attrs:{"show-overflow-tooltip":!0,label:"字段列名",prop:"columnName","min-width":"10%"}}),e._v(" "),l("el-table-column",{attrs:{"show-overflow-tooltip":!0,label:"字段描述",prop:"columnComment","min-width":"10%"}}),e._v(" "),l("el-table-column",{attrs:{"show-overflow-tooltip":!0,label:"物理类型",prop:"columnType","min-width":"10%"}}),e._v(" "),l("el-table-column",{attrs:{label:"Java类型","min-width":"11%"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-select",{model:{value:t.row.javaType,callback:function(l){e.$set(t.row,"javaType",l)},expression:"scope.row.javaType"}},[l("el-option",{attrs:{label:"Long",value:"Long"}}),e._v(" "),l("el-option",{attrs:{label:"String",value:"String"}}),e._v(" "),l("el-option",{attrs:{label:"Ingeter",value:"Ingeter"}}),e._v(" "),l("el-option",{attrs:{label:"Double",value:"Double"}}),e._v(" "),l("el-option",{attrs:{label:"BigDecimal",value:"BigDecimal"}}),e._v(" "),l("el-option",{attrs:{label:"Date",value:"Date"}})],1)]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"java属性","min-width":"10%"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-input",{model:{value:t.row.javaField,callback:function(l){e.$set(t.row,"javaField",l)},expression:"scope.row.javaField"}})]}}])}),e._v(" "),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"},model:{value:t.row.isInsert,callback:function(l){e.$set(t.row,"isInsert",l)},expression:"scope.row.isInsert"}})]}}])}),e._v(" "),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"},model:{value:t.row.isEdit,callback:function(l){e.$set(t.row,"isEdit",l)},expression:"scope.row.isEdit"}})]}}])}),e._v(" "),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"},model:{value:t.row.isList,callback:function(l){e.$set(t.row,"isList",l)},expression:"scope.row.isList"}})]}}])}),e._v(" "),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"},model:{value:t.row.isQuery,callback:function(l){e.$set(t.row,"isQuery",l)},expression:"scope.row.isQuery"}})]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"查询方式","min-width":"10%"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-select",{model:{value:t.row.queryType,callback:function(l){e.$set(t.row,"queryType",l)},expression:"scope.row.queryType"}},[l("el-option",{attrs:{label:"=",value:"EQ"}}),e._v(" "),l("el-option",{attrs:{label:"!=",value:"NE"}}),e._v(" "),l("el-option",{attrs:{label:">",value:"GT"}}),e._v(" "),l("el-option",{attrs:{label:">=",value:"GTE"}}),e._v(" "),l("el-option",{attrs:{label:"<",value:"LT"}}),e._v(" "),l("el-option",{attrs:{label:"<=",value:"LTE"}}),e._v(" "),l("el-option",{attrs:{label:"LIKE",value:"LIKE"}}),e._v(" "),l("el-option",{attrs:{label:"BETWEEN",value:"BETWEEN"}})],1)]}}])}),e._v(" "),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"},model:{value:t.row.isRequired,callback:function(l){e.$set(t.row,"isRequired",l)},expression:"scope.row.isRequired"}})]}}])}),e._v(" "),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"}}),e._v(" "),l("el-option",{attrs:{label:"文本域",value:"textarea"}}),e._v(" "),l("el-option",{attrs:{label:"下拉框",value:"select"}}),e._v(" "),l("el-option",{attrs:{label:"单选框",value:"radio"}}),e._v(" "),l("el-option",{attrs:{label:"复选框",value:"checkbox"}}),e._v(" "),l("el-option",{attrs:{label:"日期控件",value:"datetime"}})],1)]}}])}),e._v(" "),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))]),e._v(" "),l("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(t.dictType))])])}))]}}])})],1)],1),e._v(" "),l("el-tab-pane",{attrs:{label:"生成信息",name:"genInfo"}},[l("gen-info-form",{ref:"genInfo",attrs:{info:e.info}})],1)],1),e._v(" "),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){e.submitForm()}}},[e._v("提交")]),e._v(" "),l("el-button",{on:{click:function(t){e.close()}}},[e._v("返回")])],1)],1)],1)},[],!1,null,null,null);f.options.__file="editTable.vue";t.default=f.exports}}]);