2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{_ as j,O as P,u as q,r as c,d,o as g,k as x,w as t,e,f as r,P as G,c as R,G as O,H as S,l as h,x as E,m as N,s as H}from"./index.be11ec00.js";import{g as Q,u as K}from"./gen.a29079de.js";import{o as M}from"./type.72b5659c.js";import W from"./basicInfoForm.09d5c1b3.js";import z from"./genInfoForm.23f76028.js";import"./menu.e3b930ae.js";const A={style:{float:"left"}},J={style:{float:"right",color:"#8492a6","font-size":"13px"}},X={style:{"text-align":"center","margin-left":"-100px","margin-top":"10px"}},Y=P({name:"GenEdit"}),Z=Object.assign(Y,{setup(ee){const v=q(),{proxy:p}=H(),V=c("columnInfo"),k=c(document.documentElement.scrollHeight-245+"px"),y=c([]),w=c([]),U=c([]),i=c({});function C(){const m=p.$refs.basicInfo.$refs.basicInfoForm,n=p.$refs.genInfo.$refs.genInfoForm;Promise.all([m,n].map(F)).then(b=>{if(b.every(s=>!!s)){const s=Object.assign({},i.value);s.columns=w.value,s.params={treeCode:i.value.treeCode,treeName:i.value.treeName,treeParentCode:i.value.treeParentCode,parentMenuId:i.value.parentMenuId},K(s).then(a=>{p.$modal.msgSuccess(a.msg),a.code===200&&T()})}else p.$modal.msgError("\u8868\u5355\u6821\u9A8C\u672A\u901A\u8FC7\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u63D0\u4EA4\u5185\u5BB9")})}function F(m){return new Promise(n=>{m.validate(b=>{n(b)})})}function T(){const m={path:"/tool/gen",query:{t:Date.now(),pageNum:v.query.pageNum}};p.$tab.closeOpenPage(m)}return(()=>{const m=v.params&&v.params.tableId;m&&(Q(m).then(n=>{w.value=n.data.rows,i.value=n.data.info,y.value=n.data.tables}),M().then(n=>{U.value=n.data}))})(),(m,n)=>{const b=d("el-tab-pane"),u=d("el-table-column"),s=d("el-input"),a=d("el-option"),_=d("el-select"),f=d("el-checkbox"),B=d("el-table"),D=d("el-tabs"),I=d("el-button"),L=d("el-form"),$=d("el-card");return g(),x($,null,{default:t(()=>[e(D,{modelValue:r(V),"onUpdate:modelValue":n[0]||(n[0]=l=>G(V)?V.value=l:null)},{default:t(()=>[e(b,{label:"\u57FA\u672C\u4FE1\u606F",name:"basic"},{default:t(()=>[e(r(W),{ref:"basicInfo",info:r(i)},null,8,["info"])]),_:1}),e(b,{label:"\u5B57\u6BB5\u4FE1\u606F",name:"columnInfo"},{default:t(()=>[e(B,{ref:"dragTable",data:r(w),"row-key":"columnId","max-height":r(k)},{default:t(()=>[e(u,{label:"\u5E8F\u53F7",type:"index","min-width":"5%"}),e(u,{label:"\u5B57\u6BB5\u5217\u540D",prop:"columnName","min-width":"10%","show-overflow-tooltip":!0}),e(u,{label:"\u5B57\u6BB5\u63CF\u8FF0","min-width":"10%"},{default:t(l=>[e(s,{modelValue:l.row.columnComment,"onUpdate:modelValue":o=>l.row.columnComment=o},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u7269\u7406\u7C7B\u578B",prop:"columnType","min-width":"10%","show-overflow-tooltip":!0}),e(u,{label:"Java\u7C7B\u578B","min-width":"11%"},{default:t(l=>[e(_,{modelValue:l.row.javaType,"onUpdate:modelValue":o=>l.row.javaType=o},{default:t(()=>[e(a,{label:"Long",value:"Long"}),e(a,{label:"String",value:"String"}),e(a,{label:"Integer",value:"Integer"}),e(a,{label:"Double",value:"Double"}),e(a,{label:"BigDecimal",value:"BigDecimal"}),e(a,{label:"Date",value:"Date"}),e(a,{label:"Boolean",value:"Boolean"})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"java\u5C5E\u6027","min-width":"10%"},{default:t(l=>[e(s,{modelValue:l.row.javaField,"onUpdate:modelValue":o=>l.row.javaField=o},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u63D2\u5165","min-width":"5%"},{default:t(l=>[e(f,{"true-label":"1","false-label":"0",modelValue:l.row.isInsert,"onUpdate:modelValue":o=>l.row.isInsert=o},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u7F16\u8F91","min-width":"5%"},{default:t(l=>[e(f,{"true-label":"1","false-label":"0",modelValue:l.row.isEdit,"onUpdate:modelValue":o=>l.row.isEdit=o},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u5217\u8868","min-width":"5%"},{default:t(l=>[e(f,{"true-label":"1","false-label":"0",modelValue:l.row.isList,"onUpdate:modelValue":o=>l.row.isList=o},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u67E5\u8BE2","min-width":"5%"},{default:t(l=>[e(f,{"true-label":"1","false-label":"0",modelValue:l.row.isQuery,"onUpdate:modelValue":o=>l.row.isQuery=o},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u67E5\u8BE2\u65B9\u5F0F","min-width":"10%"},{default:t(l=>[e(_,{modelValue:l.row.queryType,"onUpdate:modelValue":o=>l.row.queryType=o},{default:t(()=>[e(a,{label:"=",value:"EQ"}),e(a,{label:"!=",value:"NE"}),e(a,{label:">",value:"GT"}),e(a,{label:">=",value:"GTE"}),e(a,{label:"<",value:"LT"}),e(a,{label:"<=",value:"LTE"}),e(a,{label:"LIKE",value:"LIKE"}),e(a,{label:"BETWEEN",value:"BETWEEN"})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u5FC5\u586B","min-width":"5%"},{default:t(l=>[e(f,{"true-label":"1","false-label":"0",modelValue:l.row.isRequired,"onUpdate:modelValue":o=>l.row.isRequired=o},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u663E\u793A\u7C7B\u578B","min-width":"12%"},{default:t(l=>[e(_,{modelValue:l.row.htmlType,"onUpdate:modelValue":o=>l.row.htmlType=o},{default:t(()=>[e(a,{label:"\u6587\u672C\u6846",value:"input"}),e(a,{label:"\u6587\u672C\u57DF",value:"textarea"}),e(a,{label:"\u4E0B\u62C9\u6846",value:"select"}),e(a,{label:"\u5355\u9009\u6846",value:"radio"}),e(a,{label:"\u590D\u9009\u6846",value:"checkbox"}),e(a,{label:"\u65E5\u671F\u63A7\u4EF6",value:"datetime"}),e(a,{label:"\u56FE\u7247\u4E0A\u4F20",value:"imageUpload"}),e(a,{label:"\u6587\u4EF6\u4E0A\u4F20",value:"fileUpload"}),e(a,{label:"\u5BCC\u6587\u672C\u63A7\u4EF6",value:"editor"})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),e(u,{label:"\u5B57\u5178\u7C7B\u578B","min-width":"12%"},{default:t(l=>[e(_,{modelValue:l.row.dictType,"onUpdate:modelValue":o=>l.row.dictType=o,clearable:"",filterable:"",placeholder:"\u8BF7\u9009\u62E9"},{default:t(()=>[(g(!0),R(O,null,S(r(U),o=>(g(),x(a,{key:o.dictType,label:o.dictName,value:o.dictType},{default:t(()=>[h("span",A,E(o.dictName),1),h("span",J,E(o.dictType),1)]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data","max-height"])]),_:1}),e(b,{label:"\u751F\u6210\u4FE1\u606F",name:"genInfo"},{default:t(()=>[e(r(z),{ref:"genInfo",info:r(i),tables:r(y)},null,8,["info","tables"])]),_:1})]),_:1},8,["modelValue"]),e(L,{"label-width":"100px"},{default:t(()=>[h("div",X,[e(I,{type:"primary",onClick:n[1]||(n[1]=l=>C())},{default:t(()=>[N("\u63D0\u4EA4")]),_:1}),e(I,{onClick:n[2]||(n[2]=l=>T())},{default:t(()=>[N("\u8FD4\u56DE")]),_:1})])]),_:1})]),_:1})}}}),de=j(Z,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/tool/gen/editTable.vue"]]);export{de as default};
|