Ext蒙板效果

var mk = new Ext.LoadMask(tree.id, {
msg: '正在更新数据,请稍候!',
removeMask: true //完成后移除
});
mk.show(); //显示
Ext.Ajax.request({
url: 'roleAction.evi', // 发送get请求.
method: 'GET',
success: function() {
mk.hide(); //关闭
},
failure: function() { mk.hide(); }
});


var waitMask = new Ext.LoadMask(Ext.getBody(), { msg: "系统正在处理数据,请稍候..." }); //定义一个
waitMask.show();//show方法显示
btnGenerate.disable();

Ext.Ajax.request(

{

method: 'POST',

url: Vars.Url,

success: function(response) {

//转成对象
var obj = Ext.decode(response.responseText);

if (obj.success) {

Twi.Msg.Info(null, "原始记录单生成成功!");

}

else {

Twi.Msg.Info('操作失败', obj.message);

}

btnGenerate.enable();

waitMask.hide(); //hide()方法隐藏
},

failure: function(response, action) {

Twi.Msg.Error(null, '提交失败,系统发生异常,异常类别为:' + action.failureType);

btnGenerate.enable();

waitMask.hide();//隐藏
},

params:

{

sign: 'GenerateOriginalList',

MgscType: Vars.MgscType,

TaskID: Vars.TaskID,

TestItemID: Vars.TestItemID

}

});

posted @ 2013-04-27 17:30  赵雪丹  阅读(401)  评论(0编辑  收藏