function initScroll() { return; var $content = $("#tabs .tabs-ul"); $("#tabs .scroll-left").click(function () { if (!$content.is(":animated")) { $content.animate({ left: "30px" }, 600); } }); $("#tabs .scroll-right").click(function () { //if ($content[0].offsetLeft < 40) // return; if (!$content.is(":animated")) { $content.animate({ left: "-=96px" }, 600); } }); } $(function () { var bodyWidth = document.body.clientWidth; var bodyHeight = document.body.clientHeight; $(".skin-container").css({ 'min-height':'500px', 'min-width': '1000px' }); var containerHeight = bodyHeight - 40 - 1; // $("#menu-container,#tabs").height(containerHeight); $('#menu-tree').slimScroll({ width: '200px', color: '#C7BBBB', height: bodyHeight - 41 + 'px', size: '3px' }); $(".skin-content").show(); var tabs = $("#tabs").jqTabs([{ title: '首页', text: '
\ \
'}]); var $tabsBody = $(".tabs-body:eq(0)", $(tabs)); $tabsBody.height(containerHeight - $(".title-nav").height() - 5); //$("#tabs .tabs-ul").before('
'); //$("#tabs .tabs-ul").after('
'); initScroll(); var menuNode = $("#menu-tree").jqTree({ data: menuList, rootIcon: null }); menuNode.jqTree('onSelect', function (obj, nodeData) { var url = nodeData.url; if (!url || url == '.' || url == '/') return true; url = url.replace("#Menu_Id#", nodeData.id); if (nodeData.haschild || !url) return true; $.message('项目已迁移至vue', 'red'); return false; tabs.jqTabs([{ title: nodeData.name, show: true, text: '
\
\ 正在加载.............\
\ \
'}]); }); $("#menu-tree > li > div:eq(0)").click(); var $MPWindow, $taskWindow, pwdData = {}; function modifyPwd() { var $pwds = $MPWindow.find('.pwd-box input'); pwdData.oldPwd = $pwds[0].value.trim(); if (!pwdData.oldPwd) { $pwds[0].focus(); $.message('旧密码不能为空', 'red'); return false; } pwdData.newPwd = $pwds[1].value.trim(); if (!pwdData.newPwd || pwdData.newPwd.length < 6) { $pwds[1].focus(); $.message('新密码不能为空并且长度至少为6位', 'red'); return false; } pwdData.newPwd1 = $pwds[2].value.trim(); if (!pwdData.newPwd1 || pwdData.newPwd1.length < 6) { $pwds[2].focus(); $.message('确认密码不能为空并且长度至少为6位', 'red'); return false; } if (pwdData.newPwd.length != pwdData.newPwd1.length) { $.message('新密码与确认密码长度不致', 'red'); return false; } if (pwdData.newPwd != pwdData.newPwd1) { $.message('新密码与确认密码必须相同', 'red'); return false; } helper.post('/Sys_User/ModifyPwd', pwdData, function (data) { $.message(data.Desc) if (data.Status) { $MPWindow.jqWindow('close'); } }); } function initPwdBox() { $MPWindow = $("
").jqWindow({ title: '修改密码', titleIcon: 'icon-lock', width: '460', headStyle: 'background: #00847e;', height: '273', text: '
\
\
', buttons: [{ text: '确认修改', icon: 'btn btn-danger icon-file-alt', handler: function (_evenWin, winHtml) { modifyPwd(); } }] }); } function getAuditQty(tb) { if (!auditInfo || auditInfo.length == 0) { return 0; } for (var i = 0; i < auditInfo.length; i++) { if (auditInfo[i].tb == tb) { return auditInfo[i].qty; } } return 0; } function initTaskBox() { $taskWindow = $("
").jqWindow({ title: '任务列表', titleIcon: 'icon-laptop', width: '660', headStyle: 'background: #e26000;', height: '390', showFooter: false, text: '
\
\
\ \
\ '+ getAuditQty("App_Expert") + '\ 专家申请审核\
\
\ 查看\
\
\
\
\
\ \
\ '+ getAuditQty("App_Question") + '\ 提问记录审核\
\
\ 查看\
\
\
\
\
\ \
\ '+ getAuditQty("App_ReportPrice") + '\ 肉牛上报记录审核\
\
\ 查看\
\
\
\
\
\ \
\ '+ getAuditQty("App_CompanyAuthor") + '\ 肉企认证\
\
\ 查看\
\
\
\
\
\ \
\ '+ getAuditQty("App_BeefTransaction") + '\ 活牛交易\
\
\ 查看\
\
\
\
' }); } $("#head-right .modifyPwd").click(function () { if ($MPWindow) { $MPWindow.find('input').val(''); $MPWindow.jqWindow('open'); } else { initPwdBox(); } }); $("#head-right .task-message").click(function () { if ($taskWindow) { $taskWindow.jqWindow('open'); } else { if ($(this).hasClass('bounce')) { $(this).removeClass('bounce'); } initTaskBox(); } }); })