fieldset2 = new Ext.form.FieldSet({
xtype : 'fieldset' ,
title : " 微型营养评价 (MNA)- 第二部分 " ,
layout : 'form' ,
collapsible : true ,
collapsed : true ,
autoHeight : true ,
autoScroll : true ,
// buttonAlign : "center",
frame : true ,
……………………………………………………………………………………..}) // 符合条件将要被显示的页面布局
handler : function () {
forms.form.submit({
url : 'patientinsert.do?method=mna1Test' ,
success : function (form, action) {
mess = action.result.counta; // 这里有另一个知识点就是利用 success : function (form, action) 方法将后台的值传到 js
if (parseInt(mess) >= 12) {
texs.setValue(mess+ " 分,无营养不良的状况 " );
} else {
texs.setValue(mess+ " 分,可能存在营养不良,请做第二部分题目继续进行评价 " );
forms.add(fieldset2);
forms.doLayout();
fieldset2.form = forms.getForm(); // 这里为符合 else 条件的就会将 fieldset2 所在的布局内容显示出来
forms.initFields.call(fieldset2);
}
},
failure : function (form, action) {
Ext.Msg.alert( ' 系统消息 ' ,
action.result.msg);