downloadbypost: function (obj) {
var me = this,
fileUri = obj.Url,
arrParams = obj.PostParams,
path = Ext.getPath(obj.Url),
oIpt;
if (me.isNullOrWhiteSpace(fileUri)) {
return;
}
//创建一个form元素
var oForm = document.createElement("form");
oForm.id = "forPost";
oForm.method = "post";
oForm.action = path;
oForm.target = "_self";
for (var tmpName in arrParams) {
oIpt = document.createElement("input");
oIpt.type = "hidden";
oIpt.name = tmpName;
oIpt.value = arrParams[tmpName];
oForm.appendChild(oIpt);
}
document.body.appendChild(oForm);
oForm.submit();
//删除创建的form
var oOldFrm = document.getElementById("forPost");
if (oOldFrm) {
document.body.removeChild(oOldFrm);
}
},
调用:this.downloadbypost({ Url: url, PostParams: store.paramHold.params });