|

楼主 |
发表于 2019-3-25 10:49:48
|
显示全部楼层
在pc3/index.w里面登录完成后事件里面加的,代码如下:
Model.prototype.afterLogin = function() {
this.__logined = true;
var context = this.getContext();
this.isDebugMode = context.isDebug();
var me = this;
// 控制开发模式刷新
$(selectors.reload)[this.isDebugMode ? 'show' : 'hide']();
// 显示登陆者名称
var userName = context.getCurrentPersonName();
$(selectors.username).html(userName);
// 获取代办任务数
var waitTaskCfg = this._cfg.waitTask;
if (!waitTaskCfg.disabled) {
$(selectors.waitTask).on('click', function() {
me.showPage(waitTaskCfg.xid);
});
this.refreshWaitTaskCount();
}
// 登录后完成
if (this.hasListener('onLogin')) {
var eData = {
source : this,
context : context
};
this.fireEvent('onLogin', eData);
}
// 初始化代理
this.createAgent();
// 初始化功能树
this.createFunctionTree();
// 加载主页面
var loginDtdResolve = function() {
if (me.loginDtd)
me.loginDtd.resolve();
};
// 系统登录成功后就打开图纸查看模块
justep.Portal.openWindow("/UI2/yjgs/graphinfo/process/graphinfo/stt_TZCKGL_Activity.w?process=/yjgs/graphinfo/process/graphinfo/graphinfoProcess&activity=stt_TZCKGL_Activity");
|
|