从功能树上打开功能,标题默认只是显示的功能名称,不会显示一级目录、二级目录等目录层级的名称
如果要显示完整的层级目录的名称可以如下实现
1./UI2/portal/pc3/index.js中修改doCreateFunctionTree函数中点击打开功能的实现

1
2
3
4
5
6
7
8
9
var me = this;
$('li>a', $content).click(function() {
    var el = $(this), pageKey = el.attr('pageKey');
    if (pageKey) {             
        $(".func-open", $content).removeClass("func-open");
        el.parent().addClass("func-open");
        me.showPage(pageKey);
    }
});

修改为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var me = this;
$('li>a', $content).click(function() {
    var el = $(this), pageKey = el.attr('pageKey'),title = el.attr('title');
    if (pageKey) {
        var parents = el.parents(".treeview");
        var parentstitle = "";
        if(parents){
            for(var i = parents.length-1;i>=0;i--){                                             
                parentstitle += parents[i].firstChild.text+"/";
            }
            el.attr("title",parentstitle+title);
            localStorage.setItem("title", parentstitle+title);
        }
        $(".func-open", $content).removeClass("func-open");
        el.parent().addClass("func-open");
        me.showPage(pageKey);
    }
});

2.修改doActivePage函数中设置标题的实现

1
this.setTitle(event.title);

修改为:

1
2
3
4
5
6
var title = $("a[pageKey='"+event.pageID+"']").attr("title");
if(event.pageID.indexOf("$model")>-1){
    this.setTitle(title);          
}
else
    this.setTitle(event.title);