list.jsp
10.7 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="weaver.hrm.*" %>
<%@page import="weaver.general.Util"%>
<%@page import="weaver.file.FileUpload"%>
<%@page import="java.net.URLDecoder"%>
<%@page import="java.util.Map"%>
<%@page import="weaver.fullsearch.MobileSchemaBean"%>
<%@page import="weaver.fullsearch.MobileSchemaUtil"%>
<%@page import="java.util.HashMap"%>
<%@page import="weaver.mobile.plugin.ecology.service.FullSearchService"%>
<%@page import="weaver.mobile.plugin.ecology.service.FullSearchConditionBean"%>
<%@page import="java.util.Iterator"%>
<%@page import="weaver.systeminfo.SystemEnv"%>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Cache-Control" content="no-siteapp">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<!-- viewport -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="screen-orientation" content="portrait">
<meta name="full-screen" content="yes">
<meta name="x5-orientation" content="portrait">
<meta name="x5-fullscreen" content="true">
<link rel="stylesheet" href="/mobile/plugin/fullsearch/css/index.css">
<title></title>
<%
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
User user = HrmUserVarify.getUser (request , response) ;
if(user == null) return ;
FileUpload fu = new FileUpload(request);
String module = Util.null2String((String)fu.getParameter("module"));
String scope = Util.null2String((String)fu.getParameter("scope"));
String titleurl = Util.null2String((String)request.getParameter("title"));
String title = URLDecoder.decode(titleurl,"UTF-8");
String clienttype = Util.null2String((String)fu.getParameter("clienttype"));
String clientlevel = Util.null2String((String)fu.getParameter("clientlevel"));
String sessionkey = Util.null2String(fu.getParameter("sessionkey"));
String viewmodule = Util.null2String(fu.getParameter("viewmodule"));
//外部传入快速搜索key
String sKey = Util.null2String(fu.getParameter("sKey"));
String sType = Util.null2String(fu.getParameter("sType"));
boolean hideHead="1".equals(Util.null2String(fu.getParameter("hideHead")));
if(!"".equals(sKey)){
sKey=URLDecoder.decode(sKey,"UTF-8");
}
//对标准模块权限放开 start
Map<String,MobileSchemaBean > urlMap=MobileSchemaUtil.getInstance().getSchemaUrlMap();
Map<String,MobileSchemaBean > cusMap=MobileSchemaUtil.getInstance().getSchemaCusMap();
Map<String,MobileSchemaBean> pageMap = new HashMap<String,MobileSchemaBean>();
pageMap.putAll(urlMap); //深拷贝
String authModule=viewmodule;//"1,2,4,6,13,14,15";
String authModules[]=authModule.split(",");
for(int i=0;i<authModules.length;i++){
if(Util.getIntValue(authModules[i],-1)>=-1) continue;
//判断有没有自定义(建模),可以替换标准模块的跳转
if(cusMap.containsKey(authModules[i])){
MobileSchemaBean msb=cusMap.get(authModules[i]);
pageMap.put(msb.getSechma(),msb);
}
}
//对标准模块权限放开 end
String contentType="ALL";
String keyword = "";
if(!"".equals(sKey)){
keyword=sKey;
}
if(!"".equals(sType)){
contentType=sType;
}
String pageindex="1";//指backIndex
int pagesize=10;
FullSearchService fs=new FullSearchService();
//设置每页显示条数
fs.setPageSize(pagesize);
String back=Util.null2o(fu.getParameter("fromES"));
if("true".equals(back)){
FullSearchConditionBean fsc=fs.gutSessionCondition(sessionkey);
//如果是从其他页面返回过来,从session中获取数据
if(fsc!=null){
title=fsc.getTitle();
pageindex=fsc.getPageindex();
keyword=fsc.getKeyword();
contentType=fsc.getContentType();
hideHead=fsc.isHideHead();
}
}
boolean intoFAQ=false;
RecordSet.execute("select sValue from FullSearch_EAssistantSet where sKey='ALLOWSUBMITFAQ'");
if(RecordSet.next()){
intoFAQ="1".equals(RecordSet.getString("sValue"));
}
%>
<style type="text/css">
.am-search{
background: #3496FC !important;
}
.am-search-cancel{
color: #FFFFFF !important;
}
#hotDiv .am-flexbox-item{
margin-bottom: 8px !important;
}
#resultDiv .am-list-content{
font-size: 14px;
color: #58657b;
}
#resultDiv .am-list-content .am-list-brief{
font-size: 12px;
color: #a8a8a8;
}
/*热点样式*/
.hottd{
border: 1px solid #848484;
color:#848484;
text-align :center;
width: 65px;
margin-bottom: 8px;
line-height:35px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
border-radius: 10px 10px 10px 10px;
font-size: 14px;
}
.hottd a{
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
.am-result:after{
border-bottom: none !important;
}
B{
color:red;
}
.searchDiv{
top: 0px;
width: 100%;
z-index: 99;
}
.resultDiv{
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.ul-li-div{
float:left;
margin-left: 60px;
margin-top: 2px;
width: 85%;
}
.ul-li-div-img{
float:left;
position: absolute;
}
.ul-li-div-img img{
width:44px;
height:44px;
border-radius:44px;
}
.ul-li-div-img .imgDiv{
width:44px;
height:44px;
border-radius:44px;
line-height: 44px;
text-align: center;
background: #6495e6;
color: #FFFFFF;
text-align: center;
font-size: 15px;
}
.ui-li-span{
font-size: 16px;
font-weight: 100 !important;
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
color: #a8a8a8;
float: left;
width: 45%;
font-size: 12px;
}
.ui-li-span-heading{
font-size: 14px;
color: #58657b;
}
.ul-li-div-first{
height: 20px;
}
.ul-li-div-second{
height: 20px;
margin-top: 3px;
}
.am-list-view-scrollview-content{
position:static !important;
}
</style>
</head>
<body style="background-color: #FFFFFF;overflow: hidden;">
<input type="hidden" id="pageindex" name="pageindex" value="<%=pageindex %>">
<input type="hidden" id="back" name="back" value="<%=back %>">
<input type="hidden" id="contentType" name="contentType" value="<%=contentType%>">
<input type="hidden" id="keyword" name="keyword" value="<%=keyword%>">
<input type="hidden" id="hideHead" name="hideHead" value="<%=hideHead%>">
<input type="hidden" id="title" name="title" value="<%=title%>">
<input type="hidden" id="userid" name="userid" value="<%=user.getUID()%>">
<!-- 以下用于js页面的多语言显示 -->
<input type="hidden" id="promptStr" value="<%=SystemEnv.getHtmlLabelName(32933,user.getLanguage())%>">
<input type="hidden" id="searchStr" value="<%=SystemEnv.getHtmlLabelName(197,user.getLanguage())%>">
<input type="hidden" id="loadStr" value="<%=SystemEnv.getHtmlLabelName(31230,user.getLanguage())%>...">
<input type="hidden" id="loadMoreStr" value="<%=SystemEnv.getHtmlLabelName(128560,user.getLanguage())%>">
<input type="hidden" id="allStr" value="<%=SystemEnv.getHtmlLabelName(332,user.getLanguage())%>">
<input type="hidden" id="hotStr1" value="<%=SystemEnv.getHtmlLabelName(81783,user.getLanguage())%>">
<input type="hidden" id="hotStr2" value="<%=SystemEnv.getHtmlLabelName(83445,user.getLanguage())%>">
<input type="hidden" id="hotStr3" value="<%=SystemEnv.getHtmlLabelName(81790,user.getLanguage())%>">
<input type="hidden" id="tipStr" value="<%=SystemEnv.getHtmlLabelName(558,user.getLanguage())%>">
<div id="root"></div>
<%if(intoFAQ){ %>
<div style="position: absolute;right: 20px;bottom: 15px;width: 40px;height: 40px;background-image: url(/mobile/plugin/fullsearch/img/customerService3_wev8.png);background-position: center;background-repeat: no-repeat;background-size: 100%;display: inline-block;" onclick="intoFAQ()"></div>
<%} %>
<script type="text/javascript" src="/cloudstore/resource/mobile/react/react-with-addons.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/cloudstore/resource/mobile/react/react-dom.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/mobile/plugin/fullsearch/js/promise.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/mobile/plugin/fullsearch/js/fetch.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/mobile/plugin/fullsearch/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="/mobile/plugin/fullsearch/js/index.js" charset="utf-8"></script>
<script type="text/javascript" src="/mobilemode/js/fastclick/fastclick.min_wev8.js" charset="utf-8"></script>
<script>
FastClick.attach(document.body);
function goPage(detailid,schema,url) {
detailid=detailid.replaceAll("\\\\","");
<%
Iterator<String> it=pageMap.keySet().iterator();
while(it.hasNext()){
String key=it.next();
String url=pageMap.get(key).getUrl();
url=url.replaceAll("\\{ID\\}","\"+detailid+\"");
%>
if(schema=="<%=key%>"){
location="<%=url%>";
return;
}
<% }
%>
}
<%if(intoFAQ){ %>
var commit=false;
//提交查询结果不是想要的
function intoFAQ() {
if(commit){
return;
}
commit=true;
var key=getElementsByClassName("input","am-search-value")[0].value;
if(key==""){
alert("<%=SystemEnv.getHtmlLabelName(391097,user.getLanguage())%>");//您还未查询,不能提交
commit=false;
return;
}
var a=confirm("<%=SystemEnv.getHtmlLabelName(391098,user.getLanguage())%>");//不是我想要的答案\n确认提交?
if(a){
fetch("/mobile/plugin/fullsearch/ajaxVoice.jsp?type=insertFAQ&commitTag=2&ask="+key, {
method: 'POST',
mode: 'same-origin',
headers: {'Content-Type': 'application/json; charset=utf-8'},
credentials: 'include'
}).then(function(res) {
commit=false;
}).catch(function(e) {
commit=false;
});
}else{
commit=false;
}
}
function getElementsByClassName(strTagName, strClassName){
var arrElements = (strTagName == "*" && document.all)? document.all : document.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
strClassName = strClassName.replace(/\-/g, "\\-");
var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
var oElement;
for(var i=0; i < arrElements.length; i++){
oElement = arrElements[i];
if(oRegExp.test(oElement.className)){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
<%}%>
String.prototype.replaceAll = function(s1,s2){
return this.replace(new RegExp(s1,"gm"),s2);
}
</script>
</body>
</html>