Agriculture-front-end/dist/assets/genInfoForm.68f49db8.js
2023-05-05 16:32:31 +08:00

2 lines
9.5 KiB
JavaScript

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\u7EA7\u83DC\u5355 "),e(s,{content:"\u5206\u914D\u5230\u6307\u5B9A\u83DC\u5355\u4E0B\uFF0C\u4F8B\u5982 \u7CFB\u7EDF\u7BA1\u7406",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(D,{value:t.info.parentMenuId,"onUpdate:value":a[5]||(a[5]=n=>t.info.parentMenuId=n),options:T(q),objMap:{value:"menuId",label:"menuName",children:"children"},placeholder:"\u8BF7\u9009\u62E9\u7CFB\u7EDF\u83DC\u5355"},null,8,["value","options"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,{prop:"genType"},{label:l(()=>[o(" \u751F\u6210\u4EE3\u7801\u65B9\u5F0F "),e(s,{content:"\u9ED8\u8BA4\u4E3Azip\u538B\u7F29\u5305\u4E0B\u8F7D\uFF0C\u4E5F\u53EF\u4EE5\u81EA\u5B9A\u4E49\u751F\u6210\u8DEF\u5F84",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(x,{modelValue:t.info.genType,"onUpdate:modelValue":a[6]||(a[6]=n=>t.info.genType=n),label:"0"},{default:l(()=>[o("zip\u538B\u7F29\u5305")]),_:1},8,["modelValue"]),e(x,{modelValue:t.info.genType,"onUpdate:modelValue":a[7]||(a[7]=n=>t.info.genType=n),label:"1"},{default:l(()=>[o("\u81EA\u5B9A\u4E49\u8DEF\u5F84")]),_:1},8,["modelValue"])]),_:1})]),_:1}),t.info.genType=="1"?(d(),N(f,{key:0,span:24},{default:l(()=>[e(m,{prop:"genPath"},{label:l(()=>[o(" \u81EA\u5B9A\u4E49\u8DEF\u5F84 "),e(s,{content:"\u586B\u5199\u78C1\u76D8\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u82E5\u4E0D\u586B\u5199\uFF0C\u5219\u751F\u6210\u5230\u5F53\u524DWeb\u9879\u76EE\u4E0B",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(y,{modelValue:t.info.genPath,"onUpdate:modelValue":a[9]||(a[9]=n=>t.info.genPath=n)},{append:l(()=>[e(E,null,{dropdown:l(()=>[e(O,null,{default:l(()=>[e(z,{onClick:a[8]||(a[8]=n=>t.info.genPath="/")},{default:l(()=>[o("\u6062\u590D\u9ED8\u8BA4\u7684\u751F\u6210\u57FA\u7840\u8DEF\u5F84")]),_:1})]),_:1})]),default:l(()=>[e(h,{type:"primary"},{default:l(()=>[o(" \u6700\u8FD1\u8DEF\u5F84\u5FEB\u901F\u9009\u62E9 "),Q]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):U("v-if",!0)]),_:1}),t.info.tplCategory=="tree"?(d(),V(_,{key:0},[R,G(e(k,null,{default:l(()=>[e(f,{span:12},{default:l(()=>[e(m,null,{label:l(()=>[o(" \u6811\u7F16\u7801\u5B57\u6BB5 "),e(s,{content:"\u6811\u663E\u793A\u7684\u7F16\u7801\u5B57\u6BB5\u540D\uFF0C \u5982\uFF1Adept_id",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(v,{modelValue:t.info.treeCode,"onUpdate:modelValue":a[10]||(a[10]=n=>t.info.treeCode=n),placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(d(!0),V(_,null,C(t.info.columns,(n,p)=>(d(),N(c,{key:p,label:n.columnName+"\uFF1A"+n.columnComment,value:n.columnName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,null,{label:l(()=>[o(" \u6811\u7236\u7F16\u7801\u5B57\u6BB5 "),e(s,{content:"\u6811\u663E\u793A\u7684\u7236\u7F16\u7801\u5B57\u6BB5\u540D\uFF0C \u5982\uFF1Aparent_Id",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(v,{modelValue:t.info.treeParentCode,"onUpdate:modelValue":a[11]||(a[11]=n=>t.info.treeParentCode=n),placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(d(!0),V(_,null,C(t.info.columns,(n,p)=>(d(),N(c,{key:p,label:n.columnName+"\uFF1A"+n.columnComment,value:n.columnName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,null,{label:l(()=>[o(" \u6811\u540D\u79F0\u5B57\u6BB5 "),e(s,{content:"\u6811\u8282\u70B9\u7684\u663E\u793A\u540D\u79F0\u5B57\u6BB5\u540D\uFF0C \u5982\uFF1Adept_name",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(v,{modelValue:t.info.treeName,"onUpdate:modelValue":a[12]||(a[12]=n=>t.info.treeName=n),placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(d(!0),V(_,null,C(t.info.columns,(n,p)=>(d(),N(c,{key:p,label:n.columnName+"\uFF1A"+n.columnComment,value:n.columnName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},512),[[H,t.info.tplCategory=="tree"]])],64)):U("v-if",!0),t.info.tplCategory=="sub"?(d(),V(_,{key:1},[X,e(k,null,{default:l(()=>[e(f,{span:12},{default:l(()=>[e(m,null,{label:l(()=>[o(" \u5173\u8054\u5B50\u8868\u7684\u8868\u540D "),e(s,{content:"\u5173\u8054\u5B50\u8868\u7684\u8868\u540D\uFF0C \u5982\uFF1Asys_user",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(v,{modelValue:t.info.subTableName,"onUpdate:modelValue":a[13]||(a[13]=n=>t.info.subTableName=n),placeholder:"\u8BF7\u9009\u62E9",onChange:B},{default:l(()=>[(d(!0),V(_,null,C(t.tables,(n,p)=>(d(),N(c,{key:p,label:n.tableName+"\uFF1A"+n.tableComment,value:n.tableName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{span:12},{default:l(()=>[e(m,null,{label:l(()=>[o(" \u5B50\u8868\u5173\u8054\u7684\u5916\u952E\u540D "),e(s,{content:"\u5B50\u8868\u5173\u8054\u7684\u5916\u952E\u540D\uFF0C \u5982\uFF1Auser_id",placement:"top"},{default:l(()=>[e(i,null,{default:l(()=>[e(r)]),_:1})]),_:1})]),default:l(()=>[e(v,{modelValue:t.info.subTableFkName,"onUpdate:modelValue":a[14]||(a[14]=n=>t.info.subTableFkName=n),placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(d(!0),V(_,null,C(T(I),(n,p)=>(d(),N(c,{key:p,label:n.columnName+"\uFF1A"+n.columnComment,value:n.columnName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)):U("v-if",!0)]),_:1},8,["model","rules"])}}},le=W(Y,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/tool/gen/genInfoForm.vue"]]);export{le as default};