2023-05-05 16:32:31 +08:00
|
|
|
import{_ as W,r as w,A as $,d as u,o as d,k as N,w as l,e,m as o,f as T,g as U,c as V,F as _,M as G,D as C,N as H,l as F,s as J}from"./index.276e09af.js";import{l as K}from"./menu.611a8a90.js";const Q=F("i",{class:"el-icon-arrow-down el-icon--right"},null,-1),R=F("h4",{class:"form-header"},"\u5176\u4ED6\u4FE1\u606F",-1),X=F("h4",{class:"form-header"},"\u5173\u8054\u4FE1\u606F",-1),Y={__name:"genInfoForm",props:{info:{type:Object,default:null},tables:{type:Array,default:null}},setup(t){const g=t,I=w([]),q=w([]),{proxy:M}=J(),P=w({tplCategory:[{required:!0,message:"\u8BF7\u9009\u62E9\u751F\u6210\u6A21\u677F",trigger:"blur"}],packageName:[{required:!0,message:"\u8BF7\u8F93\u5165\u751F\u6210\u5305\u8DEF\u5F84",trigger:"blur"}],moduleName:[{required:!0,message:"\u8BF7\u8F93\u5165\u751F\u6210\u6A21\u5757\u540D",trigger:"blur"}],businessName:[{required:!0,message:"\u8BF7\u8F93\u5165\u751F\u6210\u4E1A\u52A1\u540D",trigger:"blur"}],functionName:[{required:!0,message:"\u8BF7\u8F93\u5165\u751F\u6210\u529F\u80FD\u540D",trigger:"blur"}]});function B(b){g.info.subTableFkName=""}function S(b){b!=="sub"&&(g.info.subTableName="",g.info.subTableFkName="")}function j(b){for(var a in g.tables){const c=g.tables[a].tableName;if(b===c){I.value=g.tables[a].columns;break}}}function A(){K().then(b=>{q.value=M.handleTree(b.data,"menuId")})}return $(()=>g.info.subTableName,b=>{j(b)}),A(),(b,a)=>{const c=u("el-option"),v=u("el-select"),m=u("el-form-item"),f=u("el-col"),r=u("question-filled"),i=u("el-icon"),s=u("el-tooltip"),y=u("el-input"),D=u("tree-select"),x=u("el-radio"),h=u("el-button"),z=u("el-dropdown-item"),O=u("el-dropdown-menu"),E=u("el-dropdown"),k=u("el-row"),L=u("el-form");return d(),N(L,{ref:"genInfoForm",model:t.info,rules:T(P),"label-width":"150px"},{default:l(()=>[e(k,null,{default:l(()=>[e(f,{span:12},{default:l(()=>[e(m,{prop:"tplCategory"},{label:l(()=>[o("\u751F\u6210\u6A21\u677F")]),default:l(()=>[e(v,{modelValue:t.info.tplCategory,"onUpdate:modelValue":a[0]||(a[0]=n=>t.info.tplCategory=n),onChange:S},{default:l(()=>[e(c,{label:"\u5355\u8868\uFF08\u589E\u5220\u6539\u67E5\uFF09",value:"crud"}),e(c,{label:"\u6811\u8868\uFF08\u589E\u5220\u6539\u67E5\uFF09",value:"tree"}),e(c,{label:"\u4E3B\u5B50\u8868\uFF08\u589E\u5220\u6539\u67E5\uFF09",value:"sub"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,{prop:"packageName"},{label:l(()=>[o(" \u751F\u6210\u5305\u8DEF\u5F84 "),e(s,{content:"\u751F\u6210\u5728\u54EA\u4E2Ajava\u5305\u4E0B\uFF0C\u4F8B\u5982 com.ruoyi.system",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(y,{modelValue:t.info.packageName,"onUpdate:modelValue":a[1]||(a[1]=n=>t.info.packageName=n)},null,8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,{prop:"moduleName"},{label:l(()=>[o(" \u751F\u6210\u6A21\u5757\u540D "),e(s,{content:"\u53EF\u7406\u89E3\u4E3A\u5B50\u7CFB\u7EDF\u540D\uFF0C\u4F8B\u5982 system",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(y,{modelValue:t.info.moduleName,"onUpdate:modelValue":a[2]||(a[2]=n=>t.info.moduleName=n)},null,8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,{prop:"businessName"},{label:l(()=>[o(" \u751F\u6210\u4E1A\u52A1\u540D "),e(s,{content:"\u53EF\u7406\u89E3\u4E3A\u529F\u80FD\u82F1\u6587\u540D\uFF0C\u4F8B\u5982 user",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(y,{modelValue:t.info.businessName,"onUpdate:modelValue":a[3]||(a[3]=n=>t.info.businessName=n)},null,8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,{prop:"functionName"},{label:l(()=>[o(" \u751F\u6210\u529F\u80FD\u540D "),e(s,{content:"\u7528\u4F5C\u7C7B\u63CF\u8FF0\uFF0C\u4F8B\u5982 \u7528\u6237",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(y,{modelValue:t.info.functionName,"onUpdate:modelValue":a[4]||(a[4]=n=>t.info.functionName=n)},null,8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,null,{label:l(()=>[o(" \u4E0A\u7
|