123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=0, maximum-scale=0, user-scalable=yes,shrink-to-fit=no">
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>{:get_config('web_site_title')}</title>
- <link rel="icon" href="./favicon.png">
- <meta name="keywords" content="" />
- <meta name="description" content="" />
- <link rel="shortcut icon" href="/favicon.ico">
- <link rel="stylesheet" href="/static/hplus/css/bootstrap.min.css">
- <link rel="stylesheet" href="/static/hplus/css/font-awesome.min.css?v=4.4.0" />
- <link rel="stylesheet" href="/static/hplus/css/animate.css"/>
- <link rel="stylesheet" href="/static/hplus/css/style.css?v=4.1.0">
- <link rel="stylesheet" href="/static/hplus/css/jquery.contextMenu.min.css"/>
- <link rel="stylesheet" href="/static/elementui2.15.5/index.css"/>
- <link rel="stylesheet" href="/admin/css/common.css">
- <link rel="stylesheet" href="/admin/css/index.css">
- <script src="/static/hplus/js/jquery.min.js?v=2.1.4"></script>
- <style>
- .nav.navbar-right > li > a {
- display: inline-block;
- }
- #orderNums{
- /*vertical-align: middle;*/
- color: red;
- position: relative;
- top: -3px;
- }
- .nn:focus, .nn:hover{
- background-color:#fff !important;
- }
- .navbar-title{
- display: inline-block;
- font-size: 26px;
- padding-left: 20px;
- line-height: 60px;
- float: left;
- font-weight: bold;
- }
- .navbar-header{
- width: 550px!important;
- }
- .sidebox{
- width: 100%;
- height: 100%;
- position: relative;
- }
- .side-box-switch{
- width: 28px;
- height: 168px;
- position: absolute;
- z-index: 10;
- top: 50%;
- right: -28px;
- /*background-color: red !important;*/
- margin-top: -84px;
- cursor: pointer;
- }
- .side-box-switch .switch-img{
- width: 100%;
- height: 100%;
- }
- .main-box-padding-left{
- padding-left: 120px !important;
- }
- .main-box-padding-left1{
- padding-left: 280px !important;
- }
- .main-box-padding-left3{
- padding-left: 0px !important;
- }
- .menusub-box{
- width: 100%;
- height: 100%;
- overflow: hidden;
- }
- </style>
- </head>
- <body class="fixed-sidebar full-height-layout gray-bg fixed-nav pace-done">
- <nav class="navbar navbar-fixed-top" role="navigation">
- <div class="navbar-title">{:get_config('web_site_title')}</div>
- <div class="navbar-header">
- {if $userInfo.type==1}
- <!--{:get_config('web_site_title')} | -->
- <div data-width="60%" data-title="切换组织" url="{:url('Index/changeOrg')}" onclick="layer_open(this,2)" style="cursor: pointer;display: inline-block;">
- {:session('orgName')} <span class="glyphicon glyphicon-menu-down" style="font-size: 16px;" aria-hidden="true"></span>
- </div>
- {else}
- <!--{:get_config('web_site_title')} | -->
- <div data-width="60%" style="display: inline-block;">
- {:session('orgName')}
- </div>
- {/if}
- </div>
- <ul class="nav navbar-top-links navbar-right">
- <!--<li class="dropdown">
- <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#"> <i class="fa fa-bell"></i> <span class="label label-primary">8</span> </a>
- <ul class="dropdown-menu dropdown-alerts">
- <li>
- <a href="mailbox.html">
- <div>
- <i class="fa fa-envelope fa-fw"></i> 您有16条未读消息
- <span class="pull-right text-muted small">4分钟前</span>
- </div>
- </a>
- </li>
- <li class="divider"></li>
- <li>
- <a href="profile.html">
- <div>
- <i class="fa fa-qq fa-fw"></i> 3条新回复
- <span class="pull-right text-muted small">12分钟前</span>
- </div>
- </a>
- </li>
- <li class="divider"></li>
- <li>
- <div class="text-center link-block">
- <a class="J_menuItem" href="notifications.html" data-index="89">
- <strong>查看所有 </strong>
- <i class="fa fa-angle-right"></i>
- </a>
- </div>
- </li>
- </ul>
- </li>-->
- <li class="dropdown">
- <!-- {if ($isDispatch == 1)}-->
- <!-- <a href="javascript:;" id="goOrder" url="{:url('Index/ordersList')}?mode=0&order_mode=1" onclick="layer_open_dispatch(this,2)" class="glyphicon glyphicon-bell">-->
- <!-- <text id="orderNums">{if condition="$orderNums > 0"}({$orderNums}){/if}</text>-->
- <!-- </a>-->
- <!-- <a href="javascript:;" class="nn" onclick="offNotice()" id="offNotice" >-->
- <!-- <text id="offNoticeBtn">关闭通知</text>-->
- <!-- </a>-->
- <!-- <input type="hidden" id="offNoticeVal" value="0">-->
- <!-- {/if}-->
- <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:;">欢迎,{:session('user_auth.real_name')} </a>
- <ul class="dropdown-menu animated fadeInRight m-t-xs">
- <li><a class="JmenuItem" href="{:url('User/modifyPass')}">修改密码</a></li>
- <li><a href="{:url('Common/logout')}">安全退出</a></li>
- </ul>
- </li>
- </ul>
- </nav>
- <div id="vueapphhq">
- <div class="sidebar-box sidebar-box-h2 menuall" id="sidebar-box-h2">
- <div class="sidebox">
- <div class="side-box-switch switch-open" onclick="toggleSide(this)">
- <img class="switch-img switch-img-open" style="display: none" src="/admin/img/open.png" alt="">
- <img class="switch-img switch-img-close" src="/admin/img/close.png" alt="">
- </div>
- <div class="menusub-box">
- <div class="sidebar-box-sub">
- <div class="sidebar-collapse bg-theme">
- <div class="sidenav" id="side-menu">
- {volist name="menus" id="v"}
- <div class="side-list">
- <a id="menu{$v.id}" class="Jiframe" data-id="{$v.id}" data-url="{$v.url}" href="javascript:;">
- {notempty name="v['icons']"}<i class="{$v.icons}"></i>{/notempty}
- <span>{$v.title}</span>
- </a>
- </div>
- {/volist}
- <!--<div class="side-list">
- <a class="" href="layouts.html"><i class="fa fa-columns"></i> <span>首页</span></a>
- </div>
- <div class="side-list">
- <a class="active" href="layouts.html"><i class="fa fa-columns"></i> <span>订单</span></a>
- </div>
- <div class="side-list">
- <a class="" href="layouts.html"><i class="fa fa-columns"></i> <span>工单</span></a>
- </div>
- <div class="side-list">
- <a class="" href="layouts.html"><i class="fa fa-columns"></i> <span>日常工作</span></a>
- </div>
- <div class="side-list">
- <a class="" href="layouts.html"><i class="fa fa-columns"></i> <span>设备台账</span></a>
- </div>-->
- </div>
- </div>
- </div>
- <div class="sidebar-box-sub sidebar-box-sub2">
- <div class="sidebar-collapse">
- <div class="sidenavsub" id="side-menu2" style="padding-top: 10px;">
- <!--<div class="side-group">
- <div class="side-group-label">系统设置</div>
- <div class="side-list">
- <a class="J_iframe" href="layouts.html"><span>项目管理</span></a>
- </div>
- <div class="side-list">
- <a class="J_iframe active" href="layouts.html"><span>部门管理</span></a>
- </div>
- <div class="side-list">
- <a class="J_iframe" href="layouts.html"><span>用户管理</span></a>
- </div>
- </div>
- <div class="side-list">
- <a class="J_iframe active" href="layouts.html"><span>权限管理</span></a>
- </div>
- <div class="side-list">
- <a class="J_iframe" href="layouts.html"><span>报修类型管理</span></a>
- </div>
- <div class="side-list">
- <a class="J_iframe" href="layouts.html"><span>地点管理</span></a>
- </div>
- <div class="side-list">
- <a class="J_iframe" href="layouts.html"><span>运送类型管理</span></a>
- </div>
- <div class="side-list">
- <a class="J_iframe" href="layouts.html"><span>时间代码管理</span></a>
- </div>-->
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="main-box main-box-h2" id="main-iframe">
- <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="{:url($curUrl)}" frameborder="0" data-id="index_v1.html" seamless></iframe>
- <!--</div>-->
- <script src="/static/hplus/js/bootstrap.min.js?v=3.3.7"></script>
- <script src="/static/layer3.2.0/layer.js"></script>
- <script src="/static/hplus/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
- <script src="/static/hplus/js/plugins/metisMenu/jquery.metisMenu.js"></script>
- <script src="/static/hplus/js/plugins/contextMenu/jquery.contextMenu.min.js"></script>
- <script src="/static/hplus/js/hplus.js?v=4.1.0"></script>
- <script type="text/javascript" src="/static/hplus/js/contabs.js"></script>
- <!-- 第三方插件 -->
- <script src="/static/hplus/js/plugins/pace/pace.min.js"></script>
- <script src="/static/elementui2.15.5/vue-2.6.14.js"></script>
- <script src="/static/elementui2.15.5/index.js"></script>
- <script src="/admin/js/common.js"></script>
- {if condition="is_login() and !is_admin(is_login()) and btnAuth(is_login(),'PhoneMonitor/show')"}
- <textarea style="display: none;" id="StatusArea" rows="13" name="S1" class="form-control" readonly></textarea>
- <script language="javascript" type="text/javascript" src="/static/phonejs/qnviccub.js"></script>
- <script language="javascript" type="text/javascript" src="/static/phonejs/qnvfunc.js"></script>
- <script language="javascript" type="text/javascript" src="/static/phonejs/json2.js"></script>
- <script language="javascript" type="text/javascript" src="/static/phonejs/deviceapi.js"></script>
- <script>
- var fp;
- $(document).ready(function(){
- TV_Initialize();
- getEvent(T_GetEvent);
- });
- $(window).unload(function(){
- TV_Disable();
- });
- setInterval(function () {
- OpenDevice(ODT_LBRIDGE,function(nResult){AppendStatus('打开设备.');});
- },30000);
- //离开页面
- $(window).bind('beforeunload',function(){
- TV_Disable();
- });
- function openPhone() {
- // let gphone = "13838379499";
- // let fp = "d:\\wyluyin\\" + getCurrentDate(3) + "_" + gphone + ".wav";
- // check_phone(gphone,fp);
- }
- function playBtn() {
- // let path = "d:\\wyluyin\\20220608191204_13027625915.wav";
- // console.log('path:',path);
- PlayFile(1,QNV_PLAY_FILE_START,0,PLAYFILE_MASK_REPEAT,path,function(id){
- console.log('play:',id);
- });
- }
- function check_phone(gphone,fp) {
- fp = base64encode(fp);
- var url = '{:url("orders/phone")}?phone=' + gphone + '&fp='+fp;
- var title = '添加订单';
- layer.open({
- type: 2,
- shade: 0.8,
- title: title,
- area: ['800px', '400px'],
- fix: false, //不固定
- maxmin: true,
- content: url,
- skin: 'layer-ext-moon',
- success: function(layero, index) {
- layer.iframeAuto(index);
- },
- // btn: ['取消']
- });
- return false;
- }
- function AppendStatus(szStatus)
- {
- // console.log(szStatus);
- // $("#StatusArea").append(szStatus+"\r\n" );
- // var scrollTop = $("#StatusArea")[0].scrollHeight;
- // $("#StatusArea").scrollTop(scrollTop);
- }
- function AppendStatusEx(uID,szStatus)
- {
- uID=uID+1;
- AppendStatus("通道"+uID+":"+szStatus);
- }
- function T_GetEvent(uID,uEventType,uHandle,uResult,szdata)
- {
- // console.log(uID,uEventType,uHandle,uResult,szdata);
- //var vValueArray=qnviccub.QNV_Event(0,2,0,"","",1024);
- if(uEventType == -1)
- return;
- var vValue=" type="+uEventType+" Handle="+uHandle+" Result="+uResult+" szdata="+szdata;
- switch(uEventType)
- {
- case BriEvent_PhoneHook:// 本地电话机摘机事件
- AppendStatusEx(uID,"本地电话机摘机"+vValue);
- TV_StartRecordFile(uID,fp);
- break;
- case BriEvent_PhoneDial:// 只有在本地话机摘机,没有调用软摘机时,检测到DTMF拨号
- AppendStatusEx(uID,"本地话机拨号"+vValue);
- break;
- case BriEvent_PhoneHang:// 本地电话机挂机事件
- TV_HangUpCtrl(uID);
- AppendStatusEx(uID,"本地电话机挂机"+vValue);
- TV_StopRecordFile(uID);
- break;
- case BriEvent_CallIn:// 外线通道来电响铃事件
- AppendStatusEx(uID,"外线通道来电响铃事件"+vValue);
- break;
- case BriEvent_GetCallID://得到来电号码
- AppendStatusEx(uID,"得到来电号码"+vValue);
- fp = "d:\\wyluyin\\" + getCurrentDate(3) + "_" + szdata + ".wav";
- check_phone(szdata,fp);
- break;
- case BriEvent_StopCallIn:// 对方停止呼叫(产生一个未接电话)
- AppendStatusEx(uID,"对方停止呼叫(产生一个未接电话)"+vValue);
- break;
- case BriEvent_DialEnd:// 调用开始拨号后,全部号码拨号结束
- AppendStatusEx(uID,"调用开始拨号后,全部号码拨号结束"+vValue);
- break;
- case BriEvent_PlayFileEnd:// 播放文件结束事件
- AppendStatusEx(uID,"播放文件结束事件"+vValue);
- break;
- case BriEvent_PlayMultiFileEnd:// 多文件连播结束事件
- AppendStatusEx(uID,"多文件连播结束事件"+vValue);
- break;
- case BriEvent_PlayStringEnd://播放字符结束
- AppendStatusEx(uID,"播放字符结束"+vValue);
- break;
- case BriEvent_RepeatPlayFile:// 播放文件结束准备重复播放
- AppendStatusEx(uID,"播放文件结束准备重复播放"+vValue);
- break;
- case BriEvent_SendCallIDEnd:// 给本地设备发送震铃信号时发送号码结束
- AppendStatusEx(uID,"给本地设备发送震铃信号时发送号码结束"+vValue);
- break;
- case BriEvent_RingTimeOut://给本地设备发送震铃信号时超时
- AppendStatusEx(uID,"给本地设备发送震铃信号时超时"+vValue);
- break;
- case BriEvent_Ringing://正在内线震铃
- AppendStatusEx(uID,"正在内线震铃"+vValue);
- break;
- case BriEvent_Silence:// 通话时检测到一定时间的静音.默认为5秒
- AppendStatusEx(uID,"通话时检测到一定时间的静音"+vValue);
- break;
- case BriEvent_GetDTMFChar:// 线路接通时收到DTMF码事件
- AppendStatusEx(uID,"线路接通时收到DTMF码事件"+vValue);
- break;
- case BriEvent_RemoteHook:// 拨号后,被叫方摘机事件
- AppendStatusEx(uID,"拨号后,被叫方摘机事件"+vValue);
- break;
- case BriEvent_RemoteHang://对方挂机事件
- TV_HangUpCtrl(uID);
- AppendStatusEx(uID,"对方挂机事件"+vValue);
- TV_StopRecordFile(uID);
- break;
- case BriEvent_Busy:// 检测到忙音事件,表示PSTN线路已经被断开
- AppendStatusEx(uID,"检测到忙音事件,表示PSTN线路已经被断开"+vValue);
- break;
- case BriEvent_DialTone:// 本地摘机后检测到拨号音
- AppendStatusEx(uID,"本地摘机后检测到拨号音"+vValue);
- break;
- case BriEvent_RingBack:// 电话机拨号结束呼出事件。
- AppendStatusEx(uID,"电话机拨号结束呼出事件"+vValue);
- break;
- case BriEvent_MicIn:// MIC插入状态
- AppendStatusEx(uID,"MIC插入状态"+vValue);
- break;
- case BriEvent_MicOut:// MIC拔出状态
- AppendStatusEx(uID,"MIC拔出状态"+vValue);
- break;
- case BriEvent_FlashEnd:// 拍插簧(Flash)完成事件,拍插簧完成后可以检测拨号音后进行二次拨号
- AppendStatusEx(uID,"拍插簧(Flash)完成事件,拍插簧完成后可以检测拨号音后进行二次拨号"+vValue);
- break;
- case BriEvent_RefuseEnd:// 拒接完成
- AppendStatusEx(uID,"拒接完成"+vValue);
- break;
- case BriEvent_SpeechResult:// 语音识别完成
- AppendStatusEx(uID,"语音识别完成"+vValue);
- break;
- case BriEvent_FaxRecvFinished:// 接收传真完成
- AppendStatusEx(uID,"接收传真完成"+vValue);
- break;
- case BriEvent_FaxRecvFailed:// 接收传真失败
- AppendStatusEx(uID,"接收传真失败"+vValue);
- break;
- case BriEvent_FaxSendFinished:// 发送传真完成
- AppendStatusEx(uID,"发送传真完成"+vValue);
- break;
- case BriEvent_FaxSendFailed:// 发送传真失败
- AppendStatusEx(uID,"发送传真失败"+vValue);
- break;
- case BriEvent_OpenSoundFailed:// 启动声卡失败
- AppendStatusEx(uID,"启动声卡失败"+vValue);
- break;
- case BriEvent_UploadSuccess://远程上传成功
- AppendStatusEx(uID,"远程上传成功"+vValue);
- break;
- case BriEvent_UploadFailed://远程上传失败
- AppendStatusEx(uID,"远程上传失败"+vValue);
- break;
- case BriEvent_EnableHook:// 应用层调用软摘机/软挂机成功事件
- AppendStatusEx(uID,"应用层调用软摘机/软挂机成功事件"+vValue);
- break;
- case BriEvent_EnablePlay:// 喇叭被打开或者/关闭
- AppendStatusEx(uID,"喇叭被打开或者/关闭"+vValue);
- break;
- case BriEvent_EnableMic:// MIC被打开或者关闭
- AppendStatusEx(uID,"MIC被打开或者关闭"+vValue);
- break;
- case BriEvent_EnableSpk:// 耳机被打开或者关闭
- AppendStatusEx(uID,"耳机被打开或者关闭"+vValue);
- break;
- case BriEvent_EnableRing:// 电话机跟电话线(PSTN)断开/接通
- AppendStatusEx(uID,"电话机跟电话线(PSTN)断开/接通"+vValue);
- break;
- case BriEvent_DoRecSource:// 修改录音源
- AppendStatusEx(uID,"修改录音源"+vValue);
- break;
- case BriEvent_DoStartDial:// 开始软件拨号
- AppendStatusEx(uID,"开始软件拨号"+vValue);
- break;
- case BriEvent_RecvedFSK:// 接收到FSK信号,包括通话中FSK/来电号码的FSK
- AppendStatusEx(uID,"接收到FSK信号,包括通话中FSK/来电号码的FSK"+vValue);
- break;
- case BriEvent_PlugOut:
- AppendStatusEx(uID,"设备移除");
- // alert('设备移除');
- break;
- case BriEvent_DevErr://设备错误
- AppendStatusEx(uID,"设备错误"+ decodeURIComponent(vValue) );
- // alert('设备错误');
- break;
- default:
- if(uEventType < BriEvent_EndID)
- AppendStatusEx(uID,"忽略其它事件发生:ID=" + uEventType+ vValue);
- break;
- }
- }
- </script>
- {/if}
- <!-- {if condition="$isDispatch eq 1"}-->
- <!-- <audio id="dingdantixing" src="/static/tixing.mp3" controls="controls" style="display: none;"></audio>-->
- <!-- <script>-->
- <!-- var time1;-->
- <!-- var audio = document.getElementById('dingdantixing');-->
- <!-- $(function () {-->
- <!-- var interval = function () {-->
- <!-- var url = "{:url('Index/order')}";-->
- <!-- $.get(url,function (data) {-->
- <!-- if(data.code == 1){-->
- <!-- var audio = document.getElementById('dingdantixing');-->
- <!-- audio.play();-->
- <!-- if(data.data > 0){-->
- <!-- document.getElementById('orderNums').innerHTML ='('+data.data +')';-->
- <!-- }-->
- <!-- // layer.msg('您有新的订单请及时处理',{time:3000});-->
- <!-- }-->
- <!-- });-->
- <!-- }-->
- <!-- time1 = setInterval(interval,30000);-->
- <!-- $("#offNoticeBtn").click(function () {-->
- <!-- var off = parseInt($("#offNoticeVal").val());-->
- <!-- if(off==0){-->
- <!-- clearInterval(time1);-->
- <!-- $("#offNoticeVal").val(1)-->
- <!-- $("#offNoticeBtn").html('开启通知');-->
- <!-- audio.pause();-->
- <!-- }else {-->
- <!-- $("#offNoticeVal").val(0)-->
- <!-- time1 = setInterval(interval,30000);-->
- <!-- $("#offNoticeBtn").html('关闭通知');-->
- <!-- }-->
- <!-- })-->
- <!-- })-->
- <!-- </script>-->
- <!-- {/if}-->
- <script>
- var menus = {:json_encode($menus)};
- $(function () {
- // $('#side-menu').slimScroll({
- // height: ($('.sidebar-box').height() + 40) + 'px'
- // });
- // $('#side-menu2').slimScroll({
- // height: $('.sidebar-box').height() + 'px'
- // });
- $('#sidebar-box-h2').removeClass('sidebar-box-h2');
- $('#main-iframe').addClass('main-box-h2');
- $('#menu-1').addClass('active');
- // $('.sidenav .side-list a').hover(
- // function () {
- // $(this).addClass("hover");
- // let id = $(this).attr('data-id');
- // initSubMenu(id);
- // },
- // function () {
- // $(this).removeClass("hover");
- // }
- // );
- $(document).on('click','#side-menu .Jiframe',function () {
- let id = $(this).attr('data-id');
- let url = $(this).attr('data-url');
- $('#main-iframe').removeClass('main-box-padding-left');
- $('#main-iframe').removeClass('main-box-padding-left1');
- $('#main-iframe').removeClass('main-box-padding-left3');
- // var width2 = localStorage.getItem("width1");
- // console.log(width2,'xxxxxxxxxxxxxxxx')
- // if(width2 == 120){
- // $('#main-iframe').css('padding-left','120px');
- // }
- // if(width2 == 280){
- // $('#main-iframe').css('padding-left','280px');
- // }
- if(url){
- if(id==485 || id==467 || id==488 || id==489){
- $('#sidebar-box-h2').removeClass('sidebar-box-h2');
- $('#main-iframe').addClass('main-box-h2');
- window.open(url);
- }else {
- $('#sidebar-box-h2').removeClass('sidebar-box-h2');
- $('#main-iframe').addClass('main-box-h2');
- let str = '<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="'+url+'" frameborder="0" data-id="'+url+'" seamless></iframe>';
- $('#main-iframe').html(str);
- }
- }else{
- $('#sidebar-box-h2').addClass('sidebar-box-h2');
- $('#main-iframe').removeClass('main-box-h2');
- }
- $(this).addClass("hover");
- initSubMenu(id);
- $('#side-menu .Jiframe').removeClass('active');
- $(this).addClass('active');
- });
- $(document).on('click','#side-menu2 .Jiframe',function () {
- $('#main-iframe').removeClass('main-box-padding-left');
- $('#main-iframe').removeClass('main-box-padding-left1');
- $('#main-iframe').removeClass('main-box-padding-left3');
- let pid = $(this).attr('data-pid');
- let url = $(this).attr('data-url');
- let str = '<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="'+url+'" frameborder="0" data-id="'+url+'" seamless></iframe>';
- $('#main-iframe').html(str);
- $('#side-menu2 .Jiframe').removeClass('active');
- $(this).addClass('active');
- // 寻找父级元素
- $('#side-menu .Jiframe').removeClass('active');
- $('#menu'+pid).addClass('active');
- });
- $(document).on('click','.JmenuItem',function () {
- $('#main-iframe').removeClass('main-box-padding-left');
- $('#main-iframe').removeClass('main-box-padding-left1');
- $('#main-iframe').removeClass('main-box-padding-left3');
- let url = $(this).attr('href');
- let str = '<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="'+url+'" frameborder="0" data-id="'+url+'" seamless></iframe>';
- $('#main-iframe').html(str);
- return false;
- });
- });
- function initSubMenu(id) {
- $('#main-iframe').removeClass('main-box-padding-left');
- $('#main-iframe').removeClass('main-box-padding-left1');
- $('#main-iframe').removeClass('main-box-padding-left3');
- let submenus = [];
- for (let o in menus){
- if(id == menus[o].id){
- submenus = menus[o].child;
- break;
- }
- }
- if(submenus.length > 0){
- $('#sidebar-box-h2').addClass('sidebar-box-h2');
- $('#main-iframe').removeClass('main-box-h2');
- }else{
- $('#sidebar-box-h2').removeClass('sidebar-box-h2');
- $('#main-iframe').addClass('main-box-h2');
- }
- let str = '';
- for (let o in submenus){
- if(submenus[o].child.length > 0){
- // <div class="side-group">
- // <div class="side-group-label">系统设置</div>
- // <div class="side-list">
- // <a class="J_iframe" href="layouts.html"><span>项目管理</span></a>
- // </div>
- // </div>
- str += '<div class="side-group">';
- str += '<div class="side-group-label">'+submenus[o].title+'</div>';
- let children = submenus[o].child;
- for(let n in children){
- str += '<div class="side-list">';
- str += '<a class="Jiframe" id="menu'+children[n].id+'" data-id="'+children[n].id+'" data-pid="'+submenus[o].pid+'" data-url="'+children[n].url+'" href="javascript:;"><span>'+children[n].title+'</span></a>';
- str += '</div>';
- }
- str += '</div>';
- }else{
- // <div class="side-list">
- // <a class="J_iframe active" href="layouts.html"><span>权限管理</span></a>
- // </div>
- str += '<div class="side-list">';
- str += '<a class="Jiframe" id="menu'+submenus[o].id+'" data-id="'+submenus[o].id+'" data-pid="'+submenus[o].pid+'" data-url="'+submenus[o].url+'" href="javascript:;"><span>'+submenus[o].title+'</span></a>';
- str += '</div>';
- }
- }
- $('#side-menu2').html(str);
- }
- function add_highlight(url){
- console.log('url',url);
- $('.side-list a').removeClass('active');
- for (let o in menus){
- if(menus[o].url && menus[o].url == url){
- $('#menu'+menus[o].id).addClass('active');
- break;
- }
- let child1 = menus[o].child;
- let flag = false;
- let id = 0;
- if(child1.length > 0){
- for (let m in child1){
- if(child1[m].url && child1[m].url == url){
- flag = true;
- id = child1[m].id;
- break;
- }
- let child2 = child1[m].child;
- for (let n in child2){
- if(child2[n].url && child2[n].url == url){
- flag = true;
- id = child2[n].id;
- break;
- }
- }
- if(flag){
- break;
- }
- }
- }
- console.log('flag11',flag,id);
- if(flag){
- initSubMenu(menus[o].id);
- $('#menu'+menus[o].id).addClass('active');
- $('#menu'+id).addClass('active');
- break;
- }
- }
- }
- // $(document).on('click','#goOrder',function () {
- // let url = $(this).attr('href');
- // let str = '<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="'+url+'" frameborder="0" data-id="'+url+'" seamless></iframe>';
- // $('#main-iframe').html(str);
- // return false;
- // });
- function layer_open_dispatch(_self,flag){
- var url = $(_self).attr('url');
- var title = $(_self).attr('data-title');
- var width = $(_self).attr('data-width')?$(_self).attr('data-width'):'90%';
- var height = $(_self).attr('data-height')?$(_self).attr('data-height'):'90%';
- layer.open({
- type: 2,
- title: title,
- shadeClose: true,
- shade: 0.3,
- maxmin: true,
- area: [width, height],
- content: url,
- end: function () {
- update_order_count();
- }
- });
- }
- function update_order_count() {
- let url = "{:url('Index/ocount')}";
- $.post(url,function (res) {
- if(res.code == 1){
- let count = res.data.count;
- if(count > 0){
- $('#orderNums').html('('+count+')');
- }else{
- $('#orderNums').html('');
- }
- }
- });
- }
- function toggleSide(_self) {
- var width = $('.menuall').width();
- if(Number(width) > 1){
- var width1 = Number(width);
- localStorage.setItem("width1",width1);
- }
- if ( $(_self).hasClass('switch-open') ) {
- $(_self).removeClass('switch-open');
- $(_self).find('.switch-img-open').show();
- $(_self).find('.switch-img-close').hide();
- $('.menuall').css('width','0');
- $('.menusub-box').css('display','none');
- $('#main-iframe').addClass('main-box-padding-left3');
- }else{
- $(_self).addClass('switch-open');
- $(_self).find('.switch-img-open').hide();
- $(_self).find('.switch-img-close').show();
- $('.menuall').css('width','');
- $('.menusub-box').css('display','block');
- $('#main-iframe').removeClass('main-box-padding-left3');
- var width2 = localStorage.getItem("width1");
- if(width2 == 120){
- // $('#main-iframe').css('padding-left','120px');
- $('#main-iframe').addClass('main-box-padding-left');
- }
- if(width2 == 280){
- // $('#main-iframe').css('padding-left','280px');
- $('#main-iframe').addClass('main-box-padding-left1');
- }
- localStorage.removeItem("width1");
- }
- }
- </script>
- </body>
- </html>
|