wfSearchResult_wev8.js
3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
* created by bpf in Oct,2013
**/
//页面初始化
jQuery(function(){
wfSearchManager.onload();
});
//运行wfSearchManager.loadFunctions中的全部函数
var wfSearchManager={onload:function(){
var loadFunctions=this.loadFunctions;
for(var xFn in loadFunctions){
var value=loadFunctions[xFn];
loadFunctions[xFn]();
}
},loadFunctions:{}
};
//complete的值是依据原来的代码找出来的
var doingTypes={
"flowAll":{complete:0}, //全部
"flowNew":{complete:3}, //新的
"flowResponse":{complete:4}, //反馈的
"flowOut":{complete:8} //超时的
};
function searchItem(){
var value=$("input[name='flowTitle']",parent.document).val();
$("input[name='requestname']").val(value);
document.frmmain.submit();
}
wfSearchManager.loadFunctions.hoverBtn = function(){
jQuery(".topMenuTitle td:eq(0)").html("<div id='tabblock' style='width:100%;overflow:hidden;height:40px;'>" + jQuery("#tabDiv").html() + "</div>");
jQuery("#tabDiv").remove();
jQuery("#hoverBtnSpan").hoverBtn();
var complete=jQuery("[name='complete']").val();
var doingTypesObj={
"0":"flowAll", //全部
"3":"flowNew", //新的
"4":"flowResponse", //反馈的
"8":"flowOut" //超时的
};
var selectedTitle=jQuery("[doingType='"+doingTypesObj[complete]+"']");
selectedTitle.addClass("selectedTitle");
selectedTitle.append("("+jQuery("#wfCount").val()+")");
//loadCounts();
}
function loadCounts(){
var doingElement = jQuery("[doingType]").not(".selectedTitle");
doingElement.each(function(i){
var doingTypeSpan=jQuery(this);
var doingType=doingTypeSpan.attr("doingType");
jQuery.ajax({
type:'POST',
url: "/workflow/search/WFSearchTemp.jsp?getCount=true&complete="+doingTypes[doingType].complete,
async:false,
data:jQuery("[name='frmmain']").serialize(),
success: function(html){
html=jQuery.trim(html.substring(html.length-8,html.length));
doingTypeSpan.append("("+html+")");
// if (i == doingElement.length -1) {
// //获取隐藏的元素
// //将元素clone一份,放入下面菜单中即可,页面resize的时候,再次调用此方法计算即可
// var overflowElements = getoverflowTabElement();
// }
},error:function(){
}
});
});
}
/**
*右侧横向菜单事件处理
**/
wfSearchManager.loadFunctions.dealrightTitle = function(){
/**
*右侧横向菜单点击事件
**/
jQuery("span[doingType]").click(function(){
var doingType=jQuery(this).attr("doingType");//
var doing=doingTypes[doingType];
var complete=doing.complete;
// var url="";
// //如果左侧二级菜单被选中
// if(window.parent.workflowid!=null){
// var workflowid=window.parent.workflowid;
// var nodeids=window.parent.nodeids;
// url="/workflow/search/WFSearchTemp.jsp?method=reqeustbywfidNode&workflowid="+workflowid+"&nodeids="+nodeids+"&complete="+complete;
// }else{//如果左侧一级菜单被选中
// if(window.parent.typeid!=null){
// var typeid=window.parent.typeid;
// url="/workflow/search/WFSearchTemp.jsp?method=reqeustbywftype&wftype="+typeid+"&complete="+complete;
// }else{
// var url="/workflow/search/WFSearchTemp.jsp?method=all&complete="+complete;
// }
// }
// window.location.reload();
jQuery("[name='complete']").val(complete);
jQuery("[name='frmmain']").attr("action","WFSearchTemp.jsp?reforward=true");
jQuery("[name='frmmain']").submit();
});
}
/**
*批量提交
**/
wfSearchManager.loadFunctions.batchSubmit = function(){
jQuery(".batchSubmit").click(function(){
alert("批量提交");
});
}
/**
*左侧菜单显示\隐藏功能
**/
wfSearchManager.loadFunctions.flowToggle = function(){
jQuery(".toggleLeft").click(function(){
jQuery(".leftTypeSearch,.flowMenusTd",window.parent.document).toggle();
});
}