123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <!--#include file="/inc/header.html"-->
- <!--电子档案模块-->
- <script type="text/javascript">
- window.renderHeader=function(e){
- var template="{{#childenList}}<li class=\"bif-nav-item\" style=\" width: auto\" data-fun=\"{{moduleUrl}}\" data-href=\"/pages/{{moduleUrl}}.html\">{{moduleName}}</li>{{/childenList}}";
- var views = Mustache.render(template, e);
- $("#bif-nav-ul").html(views);
- $(".tree-breadcrumb #nav-item-a").html($("#bif-nav-ul li:first-child").html());
- $("#bif-nav-ul li:first-child").addClass("active");
- };
- $(function(){
- var modules=JSON.parse(window.sessionStorage.getItem("modules"));
- if(window.treemap){
- renderHeader(window.treemap[19]);//电子档案ID16
- }else if(modules){
- renderHeader(modules.treemap[19]);
- }
- })
- </script>
- <div class="con-wrap">
- <div class="tree-breadcrumb">
- <span><a class="nav-prov">首页</a></span>>
- <span class="nav-prov">山东分公司</span>
- <span><a class="nav-city" href="javascript:;"></a></span>
- <span><a class="nav-grain" href="javascript:;"></a></span>
- <span class="nav-house"></span>
- </div>
- <div id="con-map" style="margin-top: 0px;position: relative;">
- <div class="bif-nav">
- <ul id="bif-nav-ul">
- </ul>
- </div>
- <div class="author-nav">
- <ul id="tree-tt">
- </ul>
- </div>
- <div class="author-nav-sidebar">隐藏菜单</div>
- <div class="bif-con">
- </div>
- </div>
- </div>
- <!--#include file="/inc/footer.html"-->
- <style>
- .bif-nav-item {
- width: 97px;
- text-align: center;
- }
- .author-nav-sidebar {
- box-sizing: border-box;
- padding-top: 227px;
- float: left;
- height: 554px;
- line-height: 25px;
- width: 25px;
- cursor: pointer;
- text-align: center;
- /*writing-mode: vertical-rl;*/
- /*writing-mode:tb-rl;*/
- /*-webkit-transform:rotate(90deg);
- -moz-transform:rotate(90deg);
- -o-transform: rotate(90deg);*/
- /*white-space:nowrap;*/
- /*text-indent: 7px;*/
- margin-top: 10px;
- color: #fff;
- background-color: #ccc;
- }
- </style>
- <script>
- /*获取到链接首页的url*/
- $(function(){
- $.ajax({
- type: "post",
- dataType: 'json',
- url: config.baseUrl + "/sys/jump",
- success: function(e) {
- $('.nav-prov').attr('href','/'+e.defaultHome);
- },
- error: function(e) {
- console.log(e);
- }
- });
- });
- $(function() {
- base.getTree();
- base.listAllTypeRemote();
- $(document).on('click','[data-fun]',function( e ) {
- // console.log(e);
- //获取当前激活状态的函数名称
- var activeFunc = $('.bif-nav .active').data('fun'),
- //获取当前点击目标的函数名
- fun = $(this).data('fun');
- //比较其是否为同一目标,防止重复点击
- if (activeFunc === fun) {
- return false;
- }
- $(this).addClass('active').siblings().removeClass('active');
- if(typeof funs[fun] == 'function') {
- funs[fun]($(this),e);
- //删除多余的dom结构
- $('.panel,.window-shadow, .window-mask').remove();
- } else {
- console.info('not found function '+fun);
- }
- });
- // var showCount = 0,
- // hideCount = 0;
- //隐藏
- $('.author-nav-sidebar').on('click',function(e){
- e.preventDefault();
- var wid = $('.bif-con').css('width');
- // var li = $('.tabs-selected').index();
- if( wid !== '1172px' ) {
- $(this).text('显示菜单');
- $('.author-nav').hide();
- $('.bif-con').css('width','1172px');
- // if( showCount == 0 ) {
- // showCount++;
- $.parser.parse('.bif-con');
- //再次加载当前页面
- $('[data-fun].active').removeClass('active').trigger('click');
- } else {
- $(this).text('隐藏菜单');
- $('.author-nav').show();
- $('.bif-con').css('width','970px');
- // if( hideCount == 0 ) {
- // hideCount++;
- $.parser.parse('.bif-con');
- //再次加载当前页面
- $('[data-fun].active').removeClass('active').trigger('click');
- // }
- }
- })
- });
- </script>
- </body>
- </html>
|