123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <!--#include file="/inc/header.html"-->
- <script type="text/javascript">
- window.renderHeader=function(e)
- {
- var template="{{#childenList}}<li class=\"bif-nav-item\" data-fun=\"{{moduleUrl}}\" data-href=\"/pages/statistic/{{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").eq(1).html());
- $("#bif-nav-ul li").eq(1).addClass("active");
- };
- $(function(){
- var modules=JSON.parse(window.sessionStorage.getItem("modules"));
- if(window.treemap){
- renderHeader(window.treemap[4]);//基本信息ID 6
- }else if(modules){
- renderHeader(modules.treemap[4]);
- }
- })
- </script>
- <div class="con-wrap">
- <div class="tree-breadcrumb">
- <span class="nav-prov">首页</span>>
- <span class="nav-prov">山东省</span>>
- <span class="nav-city" id="nav-item-a"></span>
- </div>
- <div id="con-map" style="margin-top:0px;">
- <div class="bif-nav">
- <ul id="bif-nav-ul">
- </ul>
- </div>
- <div class="bif-container" >
- <div class="bif-con panel-noscroll" style="width:1200px">
- </div>
- </div>
- </div>
- </div>
- <!--#include file="/inc/footer.html"-->
- <style>
- .bif-nav-item{
- width: 97px;
- text-align: center;
- }
- .bif-con{
- margin-left:0px;
- }
- </style>
- <script>
- $(function() {
- base.listAllTypeRemote();
- // base.getTree();
- $(document).on('click','[data-fun]',function(e) {
- //获取当前激活状态的函数名称
- var activeFunc = $('.bif-nav .active').data('fun'),
- //获取当前点击目标的函数名
- fun = $(this).data('fun');
- //比较其是否为同一目标,防止重复点击
- if (activeFunc === fun) {
- return false;
- }
- $(this).addClass('active').siblings().removeClass('active');
- $(".tree-breadcrumb #nav-item-a").html($(this).text());
- if(typeof statfuns[fun] == 'function') {
- statfuns[fun]($(this),e);
- //删除多余的dom结构
- $('.panel,.window-shadow, .window-mask').remove();
- } else {
- console.info('not found function '+fun);
- }
- });
- // 默认第一项展示
- //init
- var first=$("#bif-nav-ul li").eq(1);
- var func=first.data("fun");
- if(typeof statfuns[func] == 'function') {
- statfuns[func](first);
- }
- // var href=first.data("href");
- // var func=first.data("fun");
- // $('.bif-con').load(href,function(e) {
- // $.parser.parse('.bif-con');
- // statfuns[fun]
- // window.statInfo.init();
- });
- var getGrainData = {};
- $.ajax({
- type: "get",
- dataType: 'json',
- async: false,
- url: config.baseUrl + config.organization.getAllGrainList,
- success: function(e) {
- getGrainData = e.data.data;
- // if( getGrainData.length == 1 ) return;
- // getGrainData.unshift({
- // id: "全部",
- // name: "全部",
- // type: "0"
- // })
- },
- error: function(e) {
- console.log(e);
- }
- });
- </script>
- <script src="/src/lib/highcharts.js"></script>
- </body>
- </html>
|