// JavaScript Document
|
|
/*知识库分类展开*/
|
$(function(){
|
var typeBtn = $('p.klzd'),
|
typeCon = $('div.kltypewrap');
|
typeBtn.click(function(){
|
/*var ds = typeCon.css('display');
|
if(ds == 'block'){
|
$(this).children('em').removeClass('open');
|
typeCon.slideUp();
|
}else{
|
$(this).children('em').addClass('open');
|
typeCon.slideDown();
|
}*/
|
typeCon.animate({height:'toggle'});
|
$(this).children('em').toggleClass("open");
|
});
|
})
|
/*知识库详情展开*/
|
$(function(){
|
var klBtn = $('.kldetailrela h2'),
|
klCon = $('.kldetailrela div');
|
klBtn.click(function(){
|
/*var ds = klCon.css('display');
|
if(ds == 'block'){
|
$(this).children('span').removeClass('close');
|
klCon.slideUp();
|
}else{
|
$(this).children('span').addClass('close');
|
klCon.slideDown();
|
}*/
|
klCon.animate({height:'toggle'});
|
$(this).children('span').toggleClass("close");
|
});
|
$(".kldetail").click( function() {
|
klCon.slideUp();
|
});
|
})
|
/*搜索下拉*/
|
$(function(){
|
var searchBtn = $('.worklistsearch span'),
|
searchCon = $('div.wlsdrop');
|
searchBtn.click(function(){
|
/*var ds = searchCon.css('display');
|
if(ds == 'block'){
|
$(this).children('em').removeClass('open');
|
searchCon.slideUp();
|
}else{
|
$(this).children('em').addClass('open');
|
searchCon.slideDown();
|
}*/
|
searchCon.animate({height:'toggle'});
|
$(this).children('em').toggleClass("open");
|
});
|
searchCon.children('a').click(function(){
|
searchCon.slideUp();
|
});
|
$("section").click(function(){
|
searchCon.slideUp();
|
});
|
})
|
|
/*工单详情下拉*/
|
$(function(){
|
var searchBtn = $('.kltit label.dropmenu'),
|
searchCon = $('div.wlsdrop2');
|
searchBtn.click(function(){
|
/*var ds = searchCon.css('display');
|
if(ds == 'block'){
|
$(this).children('em').removeClass('open');
|
searchCon.slideUp();
|
}else{
|
$(this).children('em').addClass('open');
|
searchCon.slideDown();
|
}*/
|
searchCon.animate({height:'toggle'});
|
$(this).children('em').toggleClass("open");
|
});
|
searchCon.children('a').click(function(){
|
searchCon.slideUp();
|
});
|
$("div").click(function(){
|
searchCon.slideUp();
|
});
|
$("section").click(function(){
|
searchCon.slideUp();
|
});
|
})
|
|
/*类型巡检展开*/
|
$(function(){
|
$(".redtit").click(function(){
|
var i = $(".redtit").index(this);
|
$(".cwrap").eq(i).animate({height: 'toggle'});
|
$(this).children('em').toggleClass("close");
|
});
|
});
|
|
/*查询条件 - 项目名称展开*/
|
$(function(){
|
$(".tasksearchlist2 h2").click(function(){
|
var i = $(".tasksearchlist2 h2").index(this);
|
$(".projectname").eq(i).animate({height: 'toggle'});
|
});
|
});
|
|
/*登录按钮提示*/
|
$(function() {
|
$('#password').focus(function() {
|
$('#button').children("span").addClass("white");
|
});
|
$('#password').blur(function() {
|
var str = $(this).val();
|
if(str == ""){
|
$('#button').children("span").removeClass("white");}
|
});
|
})
|
|
/*作业计划-查询-右侧弹出*/
|
$(function(){
|
$(".taskoption").click(function(){
|
var i=$(".taskoption").index(this);
|
var taskcon = $(".tasksearchdate");
|
taskcon.eq(i).animate({width: 'toggle'});
|
/*taskcon.eq(i).animate({
|
right:parseInt(taskcon.css('right'),10)==0 ? -taskcon.outerWidth() : 0
|
}); */
|
$(".tasksearchdate h2").delay(300).fadeIn();
|
$(".tasksearchcon").delay(300).fadeIn();
|
taskcon.eq(i).next(".el_popmask").fadeIn();
|
});
|
|
$(".taskclose").click(function(){
|
var taskcon = $(this).parents("div.tasksearchdate");
|
taskcon.animate({width: 'toggle'});
|
$(".tasksearchdate h2").fadeOut();
|
$(".tasksearchcon").fadeOut();
|
/*taskcon.animate({
|
right:parseInt(taskcon.css('right'),10)==0 ? -taskcon.outerWidth() : 0 });*/
|
taskcon.next(".el_popmask").fadeOut();
|
});
|
|
$(".el_popmask").click(function(){
|
var taskcon = $(this).prev("div");
|
taskcon.animate({width: 'toggle'});
|
$(".tasksearchdate h2").fadeOut();
|
$(".tasksearchcon").fadeOut();
|
/*taskcon.animate({
|
right:parseInt(taskcon.css('right'),10)==0 ? -taskcon.outerWidth() : 0});*/
|
$(this).fadeOut();
|
|
});
|
})
|
|
|
/*标签切换屏幕左右滑动导航字数过多*/
|
$(document).ready(function () {
|
n=$('.kltwowrap2 a').size();
|
var wh=100*n+"%";
|
$('.kltwowrap2').width(wh);
|
var lt=(100/n/3);
|
var lt_li=lt+"%";
|
$('.kltwowrap2 a').width(lt_li);
|
$(".kltwowrap2 a").on('touchstart mousedown',function(e){
|
e.preventDefault()
|
$(".kltwowrap2 .active").removeClass('active');
|
$(this).addClass('active');
|
tabsSwiper.slideTo($(this).index());
|
});
|
|
$(".kltwowrap2 a").click(function(e){
|
e.preventDefault();
|
});
|
|
|
|
var tabsSwiper = new Swiper(".swiper-container",{
|
setWrapperSize :true,
|
onSlideChangeStart: function(sw){
|
$(".kltwowrap2 .active").removeClass('active');
|
$(".kltwowrap2 a").eq(tabsSwiper.activeIndex).addClass('active');
|
|
//sw.width
|
var currTab = $(".kltwowrap2 a").eq(tabsSwiper.activeIndex);
|
/*if(currTab.width()*sw.activeIndex +10 > sw.width){
|
currTab.parent().css("left",-currTab.width()*sw.activeIndex);
|
}else{
|
currTab.parent().css("left",0);
|
}*/
|
currTab.parent().css("left",-parseInt(sw.activeIndex/3)*sw.width);
|
}
|
});
|
})
|
/*标签切换屏幕左右滑动*/
|
$(document).ready(function () {
|
n=$('.kltwowrap a').size();
|
var wh=100*n+"%";
|
$('.kltwowrap').width(wh);
|
var lt=(100/n/4);
|
var lt_li=lt+"%";
|
$('.kltwowrap a').width(lt_li);
|
$(".kltwowrap a").on('touchstart mousedown',function(e){
|
e.preventDefault()
|
$(".kltwowrap .active").removeClass('active');
|
$(this).addClass('active');
|
tabsSwiper.slideTo($(this).index());
|
});
|
|
$(".kltwowrap a").click(function(e){
|
e.preventDefault();
|
});
|
|
|
var tabsSwiper = new Swiper(".swiper-container",{
|
setWrapperSize :true,
|
onSlideChangeStart: function(sw){
|
$(".kltwowrap .active").removeClass('active');
|
$(".kltwowrap a").eq(tabsSwiper.activeIndex).addClass('active');
|
|
//sw.width
|
var currTab = $(".kltwowrap a").eq(tabsSwiper.activeIndex);
|
/*if(currTab.width()*sw.activeIndex +10 > sw.width){
|
currTab.parent().css("left",-currTab.width()*sw.activeIndex);
|
}else{
|
currTab.parent().css("left",0);
|
}*/
|
currTab.parent().css("left",-parseInt(sw.activeIndex/4)*sw.width);
|
}
|
});
|
})
|
|
|
// JavaScript Document
|
/*新加js*/
|
/*选择客户名称展开*/
|
$(function(){
|
$(".nameone").click(function(){
|
var i = $(".nameone").index(this);
|
$(".wrap-1").eq(i).animate({height: 'toggle'});
|
});
|
});
|
|
/*选择角色鼠标点击变换样式*/
|
$(function() {
|
$(".nameone-3").click(function() {
|
$(".nameone-3").removeClass("foucs-2"); //Remove any "active" class
|
$(this).addClass("foucs-2"); //Add "active" class to selected tab
|
});
|
})
|
/*鼠标点击变换样式*/
|
$(function() {
|
$(".nameone-2").click(function() {
|
$(this).addClass("h2.foucs-2"); //Remove any "active" class
|
});
|
});
|
/*选择处理人鼠标点击变换样式*/
|
$(function() {
|
$(".select-assign em i").click(function() {
|
$(".select-assign em i").removeClass("foucs-3"); //Remove any "active" class
|
$(this).addClass("foucs-3"); //Add "active" class to selected tab
|
});
|
|
})
|
/*驻场监督服务卡*/
|
$(document).ready(function () {
|
$(".resident-box select").change(function(){
|
var getSelectVal = $(this).children("option:selected").text();
|
$(".resident-box span").text(getSelectVal);
|
});
|
});
|