《avalon增删改查实现.docx》由会员分享,可在线阅读,更多相关《avalon增删改查实现.docx(10页珍藏版)》请在优知文库上搜索。
1、1 .W5tWavalon的js库文件引入相关页面,也可以运用cdn:2 .本例运用的是Springmvc.Onn:iBATIS,数据库:oracle:相关配置和avalon的运用没有关系这里不做介绍4.实体类公式端号公式内咨公式说明VBrXB250)DATEVAKMAB2(10),VAKXAB2(30),VAECHAfi2(3000),FOBU1.-J11JWEKFOBfIU1.ADETAI1.FOtflUUJlEFIARKFOBflU1.A_PERSOMFOFflVUlCTIBE犬SJ斫有名3.数据库表国袤FORMU1.AHE1.P四列M读IM棺亘团索引Iu权限171717317ER公式创
2、建时间I?I-D12345678901234567890123456789011111111111222222222233packagebjjj.admin.model;importjava.util.Date;publicclassFormuIaHeIpprivate1.ongid;privateStringformula_number;公式编号privateStringformula-detail;公式内容privateStringformula-remark;公式说明privateStringformula_person;公式求XA.privateDateformula-ctime;公式
3、创建时间public1.onggetld()returnid;PUbliCvoidsetId(1.ongid)this.id=id;publicStringgetFormula-number()returnformula_number;publicvoidsetFormula_number(StrlngformulaUmber)this.formula-number=formula-number;publicStringgetFormula.detail()returnformula-detail;)publicvoidsetFormula_detail(Stringformula_detai
4、l)this.formula_detall=formula-detall;publicStringgetFormula-remark()returnformula-remark;5.iBATlS映射配置typc!Aasanas-Qicry,fffm5IvPe-djHmanager.moac.typAhasalias-SysD&t9Recrf*type-bjjjcommonmzSufitoa9typeeT.mef.modef.DCdFinaoceMoaiSuptoa9*1arcCC,c.r4,C-A.-.a.l-rtllA*三1A1.,-*fKff*.1ff,-,rVl,fl*-fT1.l.,*
5、/l,If*f.,l.?-,yAlallwTxmufaHeptyp-1).11MrresultMpclass三Tormtdid三Vr11utolMapVreSMproperty-6mvto.nufcolumn-VORW1.-Mf7reultpfopcrtyaTbrmuAajcmef*columnTOMUUCRfMARK,)VreSWproperty-TbfWta-CCiW*columneFORMUU1.CTlMeyes5tMN6.查询:resutMapWNpfoResMXapclass三*bjjj.cwn_7,J一32”3436383934l4243444546474849bo5l52一Mm%
6、Z:xuen*Mf加,网flU%EI Vrctum*/iiRpqutMnpp4g(vae-o11nuhHplptolist)PUNkModeIAndVlewtoFormHelpllst()returnnewModeiAncMewCadmirVfocmuldHelp/lIsC);b三ilreRfMtll Oretum/CjReQuestMnppin(Xvalue-eAonnulaHeIpZIisf)9ResponseodyPUwkMpHMFOrmUaKelDUSuStnnQformulaRmbeGStrIno(omula-deUil)MapdataewHashMap,Object();1.ist
7、listfof11jaHelpScrvice.flfxlFormutaHelp1.ist(for11uAa.11umbcfrformula_dctail);data.put(*data*.list);returndata;-w-.*mu.cwr“.Wl).Z1.w.E*r3,.EXq311,mf:M3X4MW),(:am.nerW,.wly3:,ei.rr:.ewSq,X:,OrWad,1.:XJ.*m.wr.:n,.rwl1.*!W:3.,crwWru.m.,cru1.q,to:.3S.J,rwU_E-.:U4X4JWie.U*”J*ma.w),34scripttye)ext)2心VdrVr
8、n1:施avalon的Vm定义成全局变方便使用7890123456789012345678914.t41i44444S.44avao.ready(function()Vml-avalon.define(ObW1.?);1formu1a_number:公式话号页面加皱完后切始化aval。8谓列EttefindTableIfo();?);avalon.scan();忘婚集我界functionfindTableInfo()J.post(,SpathadmlnformulaHelpHst,formula_number:vml.formula_numberrfunction(data)console.l
9、og(JSON.stringify(data.data);vml.obj=data.data;);)主要能生成数据列表和Ji询使用的方法.页面初始化完后发ajax清求数据.然后将数据就值给avabn的VrnU*.*U.W*U*.*MM*.a4WU.ewre*M4AM*carwl,M*-*Ml4*,*4*U.CtIWMHlllljM)1WiWcWRAAVg公式2Verte%tdthi9(fcU7ff注今这:注常学谱笊建法的打1需,便用avIocF:标号msMtrhref正以引导中胃,耳曼的值上需使用(0)埼立赛达忒弃且,K娓字冷W3号引医索.nd4)。formuU_njmbvformuU.rmM
10、frmuh.iMMcn7bcCUwm*rwet*)oaAntpJtprW,Wxh1-difir*rOtII46ePc*w*oA-Co*afcl4mM6121S,r,/fr?,:i41./ig,,bmo.NOW421.HliI-kM2ilwtyIfcolor:rde11refabjjj-MnasrAdBiner*wlMXp.lctMd21-0f*w*tr*9*cj*ckf9fm,rjvcrairtdtpx3zfcmcX.ddlna一cad2.TldWIUrrg.qe_EMrS1faId*r.nUvXv4y“V-7VlnOut5t*WcWMhgCc*nrQjr-nght-5o*dwftw-4i*A4lvdamaftvmj11m*)irtl8bdI11ernMQ4hKt5fudMaftyc*5tn3IACtfvdw1CVW-