|
-
- window.master = {
- loadcss:function(src){
- var head=document.getElementsByTagName("head")[0];
- var link = document.createElement('link');
- link.href = src;
- link.rel = "stylesheet";
- link.type = "text/css";
- head.appendChild(link);
- },
-
- loadModul:function(ev){
- var src = $(this).attr("load-href");
- if($(".control-show").find('.'+src).length===0){
- master.loadcss("css/"+src+".css")
- $.ajax({
- url:src+".html",
- success:function(text){
- $(".control-show").append(text);
- console.log(text);
- $("#x_guanli0").css("color","#000");
- },
- dataType:"html",
- });
- $.getScript("js/"+src+".js");
-
- }else{
- console.log(1)
-
- }
- },
- dropDown:function(){
- $('.dropdown-toggle').on("click",function(){
- $(this).next().slideToggle(200).parent().toggleClass("open");
- })
- }
- //filterData:function(dom,){}
-
- };
-
- $(document).ready(function(){
- //$('.loadModul').on('click',master.loadModul);\
- var ht_user_id=$.cookie('ht_user_role');
- var menu_file = "./leftmenu"+ht_user_id+".html";
- // document.getElementById('version_txt').innerText = "V1.1.2";
-
- $.ajax({
- url:menu_file,
- success:function(data){
- $(".control-bar").html(data);
- $("#show_html").show();
- // master.dropDown();
- master.dropDown()
- }
- })
-
-
- });
-
- // onClick="showIframe('http://yii2.com/hotel/report/purchase',460,280)"
- function showIframe(url){
- //添加iframe
-
- $("title").html('酒店业务统计');
- var if_w = $(window).width() - $('.control-bar').width();
- var if_h = $(window).height();
- //allowTransparency='true' 设置背景透明
- $('.control-show').empty();
- $("<iframe width='" + 1433 + "' height='" + if_h + "' id='YuFrame1' name='YuFrame1' style='position:absolute;z-index:4;' frameborder='no' marginheight='0' marginwidth='0' allowTransparency='true'></iframe>").prependTo('.control-show');
- $(".navbar").width(1626);
- $("#YuFrame1").attr("src", url)
- }
-
-
|