|
发表于 2023-8-7 11:16:38
|
显示全部楼层
debugger;
if(this.session.user.identityList){
var data = {};
data["title"] = "办公用品";
data["categoryId"] = "2432b5f6-5937-47ac-9dd8-99a383e3249b";
data["identity"] = this.session.user.identityList[0].distinguishedName;
var action = this.Actions.load("x_cms_assemble_control");
action.DocumentAction.persist_save(//平台封装好的方法
data,//body请求参数
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
data = json.data; //为变量data赋值
debugger;
var hp = this.Actions.getHost();
var url = hp+"/x_desktop/app.html?app=cms.Document&status={%22documentId%22:%22"+data.id+"%22,%22readonly%22:false,%22autoSave%22:true,%22saveOnClose%22:true,%22appId%22:%22cms.Document"+data.id+"%22}"
view_pending_window_open(url,this.form.get("view"));
}.bind(this),
function( json ){ //服务调用失败的回调函数, json为服务传回的数据
data = json.data; //为变量data赋值
}.bind(this),
false //同步执行
);
/*
this.form.createDocument("办公用品管理", "办公用品信息", {"subject": "办公用品信息"}, this.session.user.identityList[0].distinguishedName, function(json){
this.form.notice("创建成功!", "success");
this.form.get("view").reload();
}.bind(this));
*/
}else{
this.form.notice("当前登录人没有身份!", "error");
}
function view_pending_window_open(url,dom) {
var pendingTimer;
window_pending_handle = window.open(url);
if (pendingTimer) {
clearInterval(pendingTimer);
}
pendingTimer = setInterval(function() {
//console.log("检测中。。。")
if (window_pending_handle.closed) {
//刷新
dom.reload();
clearInterval(pendingTimer);
}
}, 500);
} |
|