2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
|
import{r as e,a2 as l,d as a,o as n,k as u,w as o,e as t,n as d,f as m,m as f,c as p,V as r,K as s,W as i,M as c,l as b,v as _}from"./index.e5c8b0d6.js";import{l as g}from"./menu.a3f2b703.js";const V=b("i",{class:"el-icon-arrow-down el-icon--right"},null,-1),N=b("h4",{class:"form-header"},"其他信息",-1),y=b("h4",{class:"form-header"},"关联信息",-1),h={__name:"genInfoForm",props:{info:{type:Object,default:null},tables:{type:Array,default:null}},setup(b){const h=b,v=e([]),k=e([]),{proxy:C}=_(),T=e({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"}]});function U(e){h.info.subTableFkName=""}function w(e){"sub"!==e&&(h.info.subTableName="",h.info.subTableFkName="")}return l((()=>h.info.subTableName),(e=>{!function(e){for(var l in h.tables)if(e===h.tables[l].tableName){v.value=h.tables[l].columns;break}}(e)})),g().then((e=>{k.value=C.handleTree(e.data,"menuId")})),(e,l)=>{const _=a("el-option"),g=a("el-select"),h=a("el-form-item"),C=a("el-col"),I=a("question-filled"),q=a("el-icon"),F=a("el-tooltip"),P=a("el-input"),j=a("tree-select"),x=a("el-radio"),M=a("el-button"),z=a("el-dropdown-item"),W=a("el-dropdown-menu"),A=a("el-dropdown"),K=a("el-row"),O=a("el-form");return n(),u(O,{ref:"genInfoForm",model:b.info,rules:m(T),"label-width":"150px"},{default:o((()=>[t(K,null,{default:o((()=>[t(C,{span:12},{default:o((()=>[t(h,{prop:"tplCategory"},{label:o((()=>[d("生成模板")])),default:o((()=>[t(g,{modelValue:b.info.tplCategory,"onUpdate:modelValue":l[0]||(l[0]=e=>b.info.tplCategory=e),onChange:w},{default:o((()=>[t(_,{label:"单表(增删改查)",value:"crud"}),t(_,{label:"树表(增删改查)",value:"tree"}),t(_,{label:"主子表(增删改查)",value:"sub"})])),_:1},8,["modelValue"])])),_:1})])),_:1}),t(C,{span:12},{default:o((()=>[t(h,{prop:"packageName"},{label:o((()=>[d(" 生成包路径 "),t(F,{content:"生成在哪个java包下,例如 com.ruoyi.system",placement:"top"},{default:o((()=>[t(q,null,{default:o((()=>[t(I)])),_:1})])),_:1})])),default:o((()=>[t(P,{modelValue:b.info.packageName,"onUpdate:modelValue":l[1]||(l[1]=e=>b.info.packageName=e)},null,8,["modelValue"])])),_:1})])),_:1}),t(C,{span:12},{default:o((()=>[t(h,{prop:"moduleName"},{label:o((()=>[d(" 生成模块名 "),t(F,{content:"可理解为子系统名,例如 system",placement:"top"},{default:o((()=>[t(q,null,{default:o((()=>[t(I)])),_:1})])),_:1})])),default:o((()=>[t(P,{modelValue:b.info.moduleName,"onUpdate:modelValue":l[2]||(l[2]=e=>b.info.moduleName=e)},null,8,["modelValue"])])),_:1})])),_:1}),t(C,{span:12},{default:o((()=>[t(h,{prop:"businessName"},{label:o((()=>[d(" 生成业务名 "),t(F,{content:"可理解为功能英文名,例如 user",placement:"top"},{default:o((()=>[t(q,null,{default:o((()=>[t(I)])),_:1})])),_:1})])),default:o((()=>[t(P,{modelValue:b.info.businessName,"onUpdate:modelValue":l[3]||(l[3]=e=>b.info.businessName=e)},null,8,["modelValue"])])),_:1})])),_:1}),t(C,{span:12},{default:o((()=>[t(h,{prop:"functionName"},{label:o((()=>[d(" 生成功能名 "),t(F,{content:"用作类描述,例如 用户",placement:"top"},{default:o((()=>[t(q,null,{default:o((()=>[t(I)])),_:1})])),_:1})])),default:o((()=>[t(P,{modelValue:b.info.functionName,"onUpdate:modelValue":l[4]||(l[4]=e=>b.info.functionName=e)},null,8,["modelValue"])])),_:1})])),_:1}),t(C,{span:12},{default:o((()=>[t(h,null,{label:o((()=>[d(" 上级菜单 "),t(F,{content:"分配到指定菜单下,例如 系统管理",placement:"top"},{default:o((()=>[t(q,null,{default:o((()=>[t(I)])),_:1})])),_:1})])),default:o((()=>[t(j,{value:b.info.parentMenuId,"onUpdate:value":l[5]||(l[5]=e=>b.info.parentMenuId=e),options:m(k),objMap:{value:"menuId",label:"menuName",children:"children"},placeholder:"请选择系统菜单"},null,8,["value","option
|