gateHome.home_小许修改前.jsp 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997
  1. <%@ page import="ss.WebC" %>
  2. <html>
  3. <head>
  4. <title>${sessionScope.projectUrlDesc}</title>
  5. <%-- 先去掉,应该没用到。Lin
  6. <wd:write type="skin" t="dialog" />
  7. <wd:write type="skin" t="menu" />
  8. --%>
  9. <skin.ss file="/ss/gate"/>
  10. <js.ss file="/ss/appauthority.js"/>
  11. <js.ss file="/ss/qrcode/qrcode.js"/>
  12. <js.ss file="/ss/qrcode/jquery.qrcode.js"/>
  13. <%-- 先去掉,应该没用到。Lin
  14. <script type="text/javascript" src="mobile/js/iscroll.js"></script>
  15. --%>
  16. <js.ss file="/ss/touch.min.js"/>
  17. </head>
  18. <style>
  19. *{
  20. margin: 0px;
  21. padding: 0px;
  22. }
  23. body{
  24. width: 100%;
  25. height: 100%;
  26. }
  27. #ascrail2009{
  28. display:none!important;
  29. }
  30. video {
  31. position: fixed;
  32. max-width: 100%;
  33. min-height: 100%;
  34. height: auto;
  35. width: 100%;
  36. object-fit:fill;
  37. z-index: -999;
  38. }
  39. .login-pageBackground {
  40. background:none!important;
  41. }
  42. input::-webkit-input-placeholder{
  43. color:#fff!important;
  44. }
  45. .content-largeText td{
  46. width: 410px;
  47. padding-left: 60px;
  48. }
  49. .selectedStyle{
  50. width: 388px;
  51. margin: 1px 0px 0px 1px;
  52. font-family: Microsoft YaHei;
  53. padding: 0px 0 0 5px;
  54. line-height: 40px;
  55. height: 50px;
  56. border: 2px solid #cccccc;
  57. border-radius: 2px;
  58. appearance: none;
  59. font-size:36px ;
  60. -moz-appearance: none;
  61. -webkit-appearance: none;
  62. background: url("/skin/easy/image/dialog-select-icon.png") no-repeat 360px 18px;
  63. overflow:auto !important;
  64. }
  65. .selectedStyle option{
  66. font-size:30px !important;
  67. }
  68. select::-webkit-scrollbar {
  69. cursor: url("/skin/easy/image/cur.ico"), default !important; /* (zgz/theme/EasyUses/image/cur.ico),。Lin */
  70. width: 8px;
  71. }
  72. select::-webkit-scrollbar-track {
  73. background-color: none;
  74. border-radius: 5px;
  75. cursor: url("/skin/easy/image/cur.ico"), default !important; /* (zgz/theme/EasyUses/image/cur.ico),。Lin */
  76. }
  77. select::-webkit-scrollbar-thumb {
  78. background: #b7b7b7;
  79. cursor: url("/skin/easy/image/cur.ico"), default !important; /* (zgz/theme/EasyUses/image/cur.ico),。Lin */
  80. border-radius: 5px;
  81. }
  82. div#ryxxlb::-webkit-scrollbar {
  83. display: none;
  84. }
  85. #jcjllb::-webkit-scrollbar{
  86. width: 0 !important;
  87. }
  88. .ryxxlb-child{
  89. z-index: -3!important;
  90. }
  91. .jcjllb-child{
  92. z-index: -3!important;
  93. }
  94. /* 绿色 */
  95. .mainState-green {
  96. background-color: #cdecdf!important;
  97. }
  98. /*红色*/
  99. .mainState-red {
  100. background-color: #f9dcdb!important;
  101. }
  102. </style>
  103. <body style="margin:0px;padding:0px;" id="body">
  104. <input name="sbbs" type="hidden" value='dm'/> <%-- ='4OBKLLHDgszyEqmf5vFmuw=='。改为 .场地号。Lin --%>
  105. <input name="sbmc" type="hidden" />
  106. <video id="videoID" class="lj" muted autoplay="autoplay" loop="loop" style="display:block;overflow: hidden;">
  107. <source src="/skin/easy/hugeLogo.mov" > <%-- ="${sessionScope['XMMC']}/video/logo/hugeLogo.mov"。Lin --%>
  108. </video>
  109. <div class="login-pageBackground" style="display: flex;justify-content: center;align-items: center;">
  110. <div id="zzc" style="position: absolute;width: 100%;height: 100%;background: #888; z-index: 10000;opacity: 0;display: none;"></div>
  111. <%--显示时间--%>
  112. <div id="getDateInfo" class="getDateInfo lj">
  113. <span></span><span></span>
  114. </div>
  115. <div id="ryxx" style="width:800px; height:450px; display:none;position: absolute;color:black;border:1px white solid;border-radius:5px;background:#fff;z-index: 99999;">
  116. <div style="display:flex;width:680px;margin-left:60px;margin-top:61px;padding-bottom: 50px; border-bottom: 1px solid #cccccc;">
  117. <div>
  118. <input type="hidden" name="ryid" value="${ryid}" class="input-text input-number" />
  119. <img id="zjz" src="" onerror="this.src='/skin/easy/image/default-photo.png'" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius: 2px;"></img> <%-- ='${sessionScope["XMMC"]}/theme/EasyUses/image/default-photo.png'"。Lin --%>
  120. </div>
  121. <table class='xm content-largeText' style="color:#000;">
  122. <tr>
  123. <td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"><span id="xm"></span></td>
  124. </tr>
  125. <tr>
  126. <td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"><span id="bj" ></span></td>
  127. </tr>
  128. <tr>
  129. <td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"><span id="xh" ></span></td>
  130. </tr>
  131. <tr>
  132. <td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;">
  133. <span id="lxlb" class="content-largeWarningText" style="vertical-align: top;"></span>
  134. <span id="lxlbts" class="content-largeWarningText" style="display:none;vertical-align: top;">
  135. <img src="/skin/easy/image/warning.gif" style=" width: 60px;height: 60px;top: -2px;position: relative; "/> <%-- ="${sessionScope['XMMC']}/theme/EasyUses/image/warning.gif"。Lin --%>
  136. </span>
  137. </td>
  138. </tr>
  139. </table>
  140. </div>
  141. <div style="width: 100%;padding-top: 30px;text-align: center;">
  142. <input type="button" class="bottom-button " value="离校" id="leave" />
  143. <input type="button" class="bottom-button " value="返校" id="back" />
  144. <input type="button" class="bottom-button " value="取消" id="cancle" />
  145. </div>
  146. </div>
  147. <%--预约来访--%>
  148. <div id="yylf" style=" width:800px; height:385px; display:none;position: absolute;color:black;border:1px white solid;border-radius:5px;background:#fff;z-index: 99999;">
  149. <div style="display:flex;width:690px;margin-left:55px;margin-top:25px;padding-bottom: 50px; border-bottom: 1px solid #cccccc;">
  150. <table class='content-largeText' style="line-height: 50px;">
  151. <tr>
  152. <th>姓名</th>
  153. <td><span id="yylfxm" name="xm" ></span></td>
  154. </tr>
  155. <tr>
  156. <th>身份证号</th>
  157. <td><span id="yylfsfzh" name="sfzh" ></span></td>
  158. </tr>
  159. <tr>
  160. <th>人数</th>
  161. <td><span id="yylfrs" name="rs" ></span></td>
  162. </tr>
  163. <tr>
  164. <th>预约时间</th>
  165. <td><span id="yylfyysj" name="yysj" format="yyyy-MM-dd HH:mm:ss" miniDate="false"></span></td> <%-- 等 新UI 弄好了再改。Lin --%>
  166. </tr>
  167. </table>
  168. </div>
  169. <div style="width: 100%;padding-top: 25px;text-align: center;">
  170. <%-- 去掉,移到录入来访信息界面了 -- "确定" 按钮改为 "进入" 了。Lin
  171. <in@put type="button" class="bottom-button " value="进入" id="yylf_come" style="width: 150px;height: 50px;font-size: 30px;margin-right: 100px;" />
  172. --%>
  173. <input type="button" class="bottom-button " value="离开" id="yylf_leave" style="width: 150px;height: 50px;font-size: 30px;margin-right: 100px;" />
  174. <input type="button" class="bottom-button " value="取消" id="yylf_cancle" style="width: 150px;height: 50px;font-size: 30px;"/>
  175. </div>
  176. </div>
  177. <%--来访信息--%>
  178. <div id="lfxx" style=" display:none;width: 640px; height: 560px; position: absolute; color: black; border: 1px white solid; border-radius: 5px;background: #fff;padding: 50px 40px 28px 40px;z-index: 99999;">
  179. <div style="display: flex; width: 100%;padding-bottom: 50px;border-bottom: 1px solid #cccccc;justify-content: flex-end;">
  180. <table class='content-largeText' style="width:100%; line-height: 52px;">
  181. <tr>
  182. <th>姓名</th>
  183. <td><input id="jfxm" name="xm"/></td>
  184. </tr>
  185. <tr>
  186. <th>性别</th>
  187. <td>
  188. <input id="jfxbm" name="xbm" type="hidden" />
  189. <objp.ss name="xbm" cb="xb" inp="true"/>
  190. </td>
  191. </tr>
  192. <tr>
  193. <th>身份证号</th>
  194. <td><input id="jfsfzh" name="sfzh"/></td>
  195. </tr>
  196. <tr>
  197. <th>接访部门</th>
  198. <td>
  199. <input id="jfbmid" name="jfbmid" type="hidden"/>
  200. <objp.ss name="jfbmid" cb="jfbm" inp="true"/>
  201. </td>
  202. </tr>
  203. <tr>
  204. <th>接访班级</th>
  205. <td>
  206. <input id="jfbjid" name="jfbjid" type="hidden" />
  207. <objp.ss name="jfbjid" cb="jfbj" inp="true"/>
  208. </td>
  209. </tr>
  210. <tr>
  211. <th>接访人</th>
  212. <td>
  213. <div id="jfr-div">
  214. <div class="input-div input-s">
  215. <input name="jfryid" id="jfryid" type="hidden"/>
  216. <input name="jfryna" id="jfryna" style="margin: 0;"/>
  217. <span id="jfryid_button" class="smallButton icon-down" style="top: 5px !important;" onselectstart="return false;"></span>
  218. </div>
  219. <div id="jfryid_option" class="popup-div hLine-highlightBlod objectPickerOption scrollbar" style="display:none;max-height: 250px;z-index: 10000;" onselectstart="return false;">
  220. </div>
  221. </div>
  222. </td>
  223. </tr>
  224. <tr>
  225. <th>事由</th>
  226. <td>
  227. <textarea id="jfsy" class="smallScrollbar" style="overflow:hidden;padding-left: 5px;margin-left:-5px;position: absolute;resize: none;margin-top: 2px;height: 51px !important;width: 401px !important;z-index: 1;background: white;"></textarea>
  228. <script type="text/javascript" charset="utf-8">
  229. wd.edit.initGrowHigh('jfsy','null',{},null,false);
  230. </script>
  231. <span></span>
  232. <input id="syid" name="syid" type="hidden"/>
  233. <objp.ss name="syid" cb="lfsy" inp="true" add="true"/>
  234. </td>
  235. </tr>
  236. <tr>
  237. <th>人数</th>
  238. <td>
  239. <input id="jfrs" name="rs" value= "1" oninput="value=value.replace(/[^\d]/g,'')"/>
  240. </td>
  241. </tr>
  242. </table>
  243. </div>
  244. <div style="width:100%;padding-top:25px;text-align:center;">
  245. <%-- "确定" 改为 "进入",去掉后面的来访者离校的办理界面里的 "进入" 按钮(只有 "离开" 按钮) -- 填写来访信息时,就进入(增加写 来访.接访开始时间)。Lin
  246. <in@put id="lfqd" type="button" class="bottom-button " value="确定" style="width: 150px;height: 50px;font-size: 30px;margin-right: 100px;" /> --%>
  247. <input id="lfqd" type="button" class="bottom-button " value="进入" style="width: 150px;height: 50px;font-size: 30px;margin-right: 100px;" />
  248. <input type="button" class="bottom-button " value="取消" id="jf_cancle" style="width: 150px;height: 50px;font-size: 30px;"/>
  249. </div>
  250. </div>
  251. <div id="scannerDiv" style="opacity: 0;">
  252. <input id="scanner"/>
  253. </div>
  254. <%--录入人员--%>
  255. <div id="lrry" class="lj" style="display:none;position: absolute;bottom: 28px;left:50%;margin-left:-365px; font-family: 'SIL Hei';color:#6c9ed7;line-height:18px;font-size:20px;">
  256. <table class='xm' style="color:#000;">
  257. <tr>
  258. <td>
  259. <input type="text" tabindex="1" name="sfzh" id="sfzh" placeholder="身份证号/学号" style="margin-right:18px;font-size: 20px; width:389px; height: 43px;color: #ffffff;border:1px solid #dae6eb;padding:10px 0 13px 19px;opacity: 0.65;" />
  260. </td>
  261. <td style="text-align: center;">
  262. <input type="button" class="mobileLogin-button" style="outline:#6c9ed7;position: absolute;width: 90px; height: 43px; background: transparent;color: #ffffff; border: 1px solid #dae6eb; font-size: 20px;opacity: 0.65;border-radius: 3px;" value="确定" id="qd" />
  263. </td>
  264. <td style="text-align: center;padding-left: 100px;">
  265. <input type="button" class="mobileLogin-button" style="outline:#6c9ed7;position: absolute;width: 90px; height: 43px; background: transparent;color: #ffffff; border: 1px solid #dae6eb; font-size: 20px;opacity: 0.65;border-radius: 3px;" value="清除" id="qc" />
  266. </td>
  267. </tr>
  268. </table>
  269. </div>
  270. <div id="ryxxlb" style="width:800px; height: calc(100% - 60px); position: absolute;color:black;z-index:-1;display: grid;align-content: center;overflow-y: auto; overflow-x: hidden;"></div>
  271. <div id="jcjllb" style="width: 800px;height: calc(100% - 60px);position: absolute;color:black;z-index:-1;display: grid;align-content: center;overflow-y: auto;overflow-x: hidden;display: block;color: black;right: 30px;"></div>
  272. <div id="SFrefresh" style=" width:460px; height:245px; display:none;position: absolute;color:black;border:1px white solid;border-radius:5px;background:#fff;bottom: 29px;right: 29px;z-index: 99999;">
  273. <div class='content-largeText' style="width: 420px;display:flex;margin-left:20px;margin-top:25px;align-items: center;justify-content: center;height: 120px; border-bottom: 1px solid #cccccc;">
  274. 是否重启?
  275. </div>
  276. <div style="width: 100%;padding-top: 25px;text-align: center;">
  277. <input type="button" class="bottom-button " value="是" id="SFrefresh_qr" style="width: 150px;height: 50px;font-size: 30px;margin-right: 100px;" />
  278. <input type="button" class="bottom-button " value="否" id="SFrefresh_cancle" style="width: 150px;height: 50px;font-size: 30px;"/>
  279. </div>
  280. </div>
  281. <div class="bottomright" id="qrcodeBox" style="z-index: -2; display:block;">
  282. <%--默认图片--%>
  283. <equal.ss val='${empty sessionScope.ssUser}' val2="true"> <%-- ='${empty sessionScope["wd.yh"]}'。Lin --%>
  284. <div id="login-before" style="width:110px;height:144px;background:rgba(255,255,255,0.4);border-radius:2px;margin-bottom: -7px; ">
  285. <img src='/skin/easy/image/default-photo.png' style="margin:20px 23px 7px 23px;width:64px;height:88px;"/> <%-- ='${sessionScope["XMMC"]}/theme/EasyUses/image/default-photo.png'。Lin --%>
  286. <div class="xx">
  287. <div class="qrcode-text " style="color: #000;" >未登录</div>
  288. </div>
  289. </div>
  290. </equal.ss>
  291. <%--未登录显示二维码--%>
  292. <equal.ss val='${empty sessionScope.ssUser}' val2="true"> <%-- ='${empty sessionScope["wd.yh"]}'。Lin --%>
  293. <div style="display: none;" id="login-qrcode">
  294. <div style="height: 30px;">
  295. <span class="qrcode-text">扫一扫登录</span>
  296. </div>
  297. <div id="qrcode" style="width:110px;height:110px;z-index: 9999 !important;border: 5px solid #FFF;margin-bottom: -7px;">
  298. <div class='qrcode'> </div>
  299. </div>
  300. </div>
  301. </equal.ss>
  302. <div style="display: none;position:absolute;z-index:11111;" id="confirm-qrcode">
  303. <div style="height: 30px;">
  304. <span class="qrcode-text">扫一扫</span>
  305. </div>
  306. <div id="qrcode-confirm" style="width:110px;height:110px;z-index: 9999 !important;border: 5px solid #FFF;margin-bottom: -7px;">
  307. <div class='qrcode-confirm'> </div>
  308. </div>
  309. </div>
  310. <%--已登录显示头像,点击头像退出登录--%>
  311. <equal.ss val='${empty sessionScope.ssUser}' val2="false"> <%-- ='${empty sessionScope["wd.yh"]}'。Lin --%>
  312. <div id="login-after" class="lj" style="width:110px;height:144px;background:rgba(255,255,255,0.4);border-radius:2px;margin-bottom: -7px; ">
  313. <%-- 改,独立出 gateExit,简单处理。Lin
  314. <img onclick="clearInterval(zmxxhq);wd.display.exit();" --%>
  315. <img onclick="clearInterval(zmxxhq);window.location=&quot;<serv.ss name='gateExit'/>&quot;;"
  316. <%-- 改。Lin
  317. onerror="this.src='${sessionScope["XMMC"]}/theme/EasyUses/image/default-photo.png'" style="margin: 10px 23px 7px 23px;width:64px;height:88px;"
  318. src='@service{name:"getData",param:{path:"${sessionScope['env.ry'].zjzwj}"}}@' /> --%>
  319. onerror="this.src='/skin/easy/image/default-photo.png'" style="margin: 10px 23px 7px 23px;width:64px;height:88px;"
  320. src="<serv.ss name='dlByHttp' parm='{path:"${sessionScope.ssUser.zjzwj}"}'/>"/>
  321. <div class="xx">
  322. <div class="qrcode-text" style="color: #000;">${sessionScope.ssUser.xm}</div> <%-- ['env.ry'].。Lin --%>
  323. <div class="qrcode-text" style="color: #000;">${sessionScope.ssUser.ryh}</div> <%-- ['env.ry'].。Lin --%>
  324. </div>
  325. </div>
  326. </equal.ss>
  327. </div>
  328. </div>
  329. <equal.ss val='${empty sessionScope.ssUser}' val2="false"> <%-- ='${empty sessionScope["wd.yh"]}'。Lin --%>
  330. <script type="text/javascript">
  331. var ryInfo = "${sessionScope.ssUser}"; <%-- ['env.ry']}。Lin --%>
  332. </script>
  333. </equal.ss>
  334. <script>
  335. function login() {
  336. var sbbs = $("input[name=sbbs]").val();
  337. var sbmc = $("input[name=sbmc]").val();
  338. $.post("<serv.ss name='runGateLoginByQrcode'/>", { // :'scanGateLoginSuccess'。Lin
  339. sbbs: sbbs,
  340. sbmc: sbmc
  341. }, function(result) {
  342. if(result.code != 1) {
  343. wd.display.alert(result.msg);
  344. } else {
  345. window.location.href = "/gateHome.jsp"; //? = "/"。临时改,为了测试。Lin
  346. }
  347. }, "json")
  348. }
  349. function utf16to8(str) {
  350. var out, i, len, c;
  351. out = "";
  352. len = str.length;
  353. for(i = 0; i < len; i++) {
  354. c = str.charCodeAt(i);
  355. if((c >= 0x0001) && (c <= 0x007F)) {
  356. out += str.charAt(i);
  357. } else if(c > 0x07FF) {
  358. out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
  359. out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
  360. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  361. } else {
  362. out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
  363. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  364. }
  365. }
  366. return out;
  367. }
  368. function qrcode() {
  369. $.ajax({
  370. type: "post",
  371. url: "<serv.ss name='wrQrcodeLoginKey'/>", // :'getPrivateKey'。Lin
  372. async: true,
  373. dataType: "json",
  374. success: function(data) {
  375. var sbbs = $("input[name='sbbs']").val();
  376. /* 再改,直接拼 ss:xx,yy:"zz",... -- 不用 JSON.stringify(,会生成 "ss":2...。Lin
  377. var json = {
  378. ss:2, // 增加,2 = gate login -- ss:xx,yy:"zz",...。Lin
  379. k: data.k, // .privateKey,。ATR_keyByQrcodeLoginName = "k"。Lin
  380. d: sbbs
  381. };
  382. qrCodeGenerate(".qrcode", "@hdGl" + JSON.stringify(json) + "@", 110, 110, "canvas");
  383. */ qrCodeGenerate(".qrcode", "ss:2,k:\""+ data.k +"\",d:\""+ sbbs +"\"", 110, 110, "canvas");
  384. }
  385. });
  386. }
  387. function qrCodeGenerate(ele, text, width, height, render) {
  388. var option = {
  389. render: "canvas",
  390. text: text,
  391. width: width || "200",
  392. height: height || "200",
  393. correctLevel: QRErrorCorrectLevel.M
  394. };
  395. $(ele).empty()
  396. $(ele).qrcode(option);
  397. }
  398. var stop = 2 * 60 * 1000; //两分钟后停止
  399. var begin;
  400. var end;
  401. function getLoginStatus() {
  402. //end = new Date().getTime();
  403. //if ((end - begin) > stop) {
  404. // stopInterval();
  405. // return;
  406. //}
  407. var sbbs = $("input[name=sbbs]").val();
  408. if(!sbbs)return;
  409. $.ajax({
  410. type: "post",
  411. url:"<serv.ss name='ifWrQrcodeLoginParmBySess' parm='{type:"gate"}'/>", // :'resetCookie',。Lin
  412. async: true,
  413. data:{sbbs:sbbs},
  414. dataType: "json",
  415. success: function(data) {
  416. if(data.code == 200 && window.loginStatus == '0') {
  417. stopInterval();
  418. //$("input[name='mm']").val("");
  419. //$("form[name='Form1'").submit();
  420. login();
  421. }
  422. if(data.code == 1) {
  423. stopInterval();
  424. var url = "<%=WebC.PPATH_errMsg%>?msg="+ data.msg; // = "/wd/page/rs.jsp?msg=" +。Lin
  425. var title = "提示";
  426. wd.display.showComponent({
  427. show: ["wdDialog"],
  428. hide: [],
  429. url: url,
  430. title: title,
  431. width: 500,
  432. high: 300,
  433. form: ""
  434. })
  435. } else if(data.code == 0) {
  436. console.log(data.msg);
  437. } else if(data.msg) {
  438. wd.display.alert(data.msg)
  439. }
  440. }
  441. });
  442. }
  443. var getLoginInterval;
  444. if(window.loginStatus == '0') {
  445. startInterval();
  446. }
  447. function startInterval() {
  448. qrcode();
  449. //$("#qrcodeBox").css("display", "block");
  450. //$("#trianglebottomright").css("display", "none");
  451. begin = new Date().getTime();
  452. if(!getLoginInterval) {
  453. getLoginInterval = setInterval(getLoginStatus, 3 * 1000);
  454. }
  455. }
  456. function stopInterval() {
  457. $("#qrcodeBox").css("display", "none");
  458. clearInterval(getLoginInterval);
  459. getLoginInterval = null;
  460. }
  461. $(function() {
  462. try {
  463. if(beacon && beacon.getComputerName) {
  464. $("input[name=sbmc]").val(beacon.getComputerName());
  465. }
  466. if(beacon && beacon.getMacAddress) {
  467. $("input[name=sbbs]").val(beacon.getMacAddress());
  468. }
  469. } catch(err) {
  470. console.log(err);
  471. }
  472. })
  473. </script>
  474. </body>
  475. <script type="text/javascript">
  476. /**
  477. *
  478. * 原来下面全部JS为拼音缩写而且无注解
  479. * 注解都是之后非作者补充的,可能有不正确
  480. *
  481. */
  482. var qrcodestr = '';
  483. var direction;
  484. var mjdid = '';
  485. var sfzh = '';
  486. var lfid = '';
  487. var globalJfryna = '';
  488. var globalJfryid = '';
  489. $(function(){
  490. try{
  491. lf_jfr_cx(false,false);
  492. /* 改,直接用页面写死的 sbbs(<input name="sbbs") -- 因抛出错误 "beacon is not defined",后面的程序被越过。Lin
  493. getMjdid(beacon.getMacAddress());
  494. */ getMjdid($("input[name=sbbs]").val());
  495. // bindMwid(); // 再去掉,没用到,也不用 < 打开 gateHome.home.jsp 时,写到 门禁点.门卫ID。此时,写入的 .门卫ID 为空(还没登录) < 也不能每次换班都写。Lin
  496. if(!beacon || !beacon.initIdcardDevice()){
  497. alert("初始化失败。检查是否安装驱动")
  498. }
  499. ///
  500. }catch(err){
  501. console.log(err);
  502. }
  503. /**
  504. * 接访人na
  505. */
  506. $('#jfryna').blur(function(){
  507. $('#jfryna').val(globalJfryna);
  508. $('#jfryid').val(globalJfryid);
  509. });
  510. /**
  511. * 接访人na
  512. */
  513. $('#jfryna').on('input',function(){
  514. if($('#jfryna').val() == ''){
  515. $('#jfryid_option').hide();
  516. return;
  517. }
  518. lf_jfr_cx(true,true);
  519. $('#jfryid_option').show();
  520. });
  521. $('#jfryid_option').on('click','.popupList',function(){
  522. var ryid = $(this).attr('value');
  523. var xm = $(this).text();
  524. $('#jfryna').val(xm);
  525. $('#jfryid').val(ryid).change();
  526. $('#jfryid_option').hide();
  527. });
  528. $('#jfryid').change(function(){
  529. var jfryid = $(this).val();
  530. if(jfryid == ''){
  531. globalJfryid = '';
  532. globalJfryna = '';
  533. return;
  534. }
  535. if(globalJfryid == jfryid){
  536. return;
  537. }
  538. globalJfryid = jfryid;
  539. globalJfryna = $('#jfryna').val();
  540. $.ajax({
  541. type: "post",
  542. /* 改,把参数统一移到 data:{} 里。Lin
  543. url: '@service{name:"lf_bjbm_cx"}@&ryid=' + jfryid,
  544. */
  545. url: "<serv.ss name='gate_selBmAndBjByRyid'/>",
  546. data: {
  547. ryid: jfryid,
  548. },
  549. async: true,
  550. dataType: "json",
  551. success: function(data) {
  552. console.log(data);
  553. if (data.error == '1') {
  554. wd.display.alert(data.msg);
  555. } else {
  556. wd.edit.objectPicker.getInstance("jfbmid").initValue(data.bmid,{triggerChange:false});
  557. wd.edit.objectPicker.getInstance("jfbjid").initValue(data.bjid,{triggerChange:false});
  558. }
  559. }
  560. });
  561. });
  562. $('#jfryna').focus(function(){
  563. if($('#jfryna').val() == ''){
  564. return;
  565. }
  566. lf_jfr_cx(true,true);
  567. $('#jfryid_option').show();
  568. });
  569. $('#jfr-div').click(function(){
  570. return false;
  571. });
  572. $('#jfryid_button').click(function(){
  573. $('.popup-div:not(#jfryid_option)').hide();
  574. if($('#jfryid_option').is(':hidden')){
  575. lf_jfr_cx(true,false);
  576. }
  577. $('#jfryid_option').toggle();
  578. });
  579. setInterval(function(){
  580. $.ajax({
  581. type: "post",
  582. url: '@service{name:"wd.probe"}@',
  583. async: true,
  584. dataType: "json",
  585. success: function(data) {
  586. console.log(data);
  587. }
  588. });
  589. }, 1000 * 600);
  590. $('#zzc').click(function(){
  591. return false;
  592. });
  593. $('#SFrefresh_qr').click(function(){
  594. window.location.reload();
  595. });
  596. $('#SFrefresh_cancle').click(function(){
  597. $('#SFrefresh').hide();
  598. $('#zzc').hide();
  599. $('.lj').css('filter','blur(0px)');
  600. return false;
  601. });
  602. var refresh;
  603. $('#login-after').mousedown(function(e){
  604. // if('IMG' == $(e.target).prop('tagName')){
  605. // console.log("长按头像不触发刷新");
  606. // return;
  607. // }
  608. refresh = setInterval(function(){
  609. $('#SFrefresh').show();
  610. clearInterval(refresh);
  611. $('#zzc').show();
  612. $('.lj').css('filter','blur(20px)');
  613. }, 2000);
  614. return false;
  615. });
  616. $('#login-after').mouseup(function(){
  617. console.log("清除定时器");
  618. clearInterval(refresh);
  619. return false;
  620. });
  621. $('#login-after').mouseout(function(){
  622. console.log("清除定时器");
  623. clearInterval(refresh);
  624. });
  625. $('#login-before').mousedown(function(e){
  626. refresh = setInterval(function(){
  627. $('#SFrefresh').show();
  628. clearInterval(refresh);
  629. $('.lj').css('filter','blur(20px)');
  630. }, 2000);
  631. return false;
  632. });
  633. $('#login-before').mouseup(function(){
  634. console.log("清除定时器");
  635. clearInterval(refresh);
  636. return false;
  637. });
  638. $('#login-before').mouseout(function(){
  639. console.log("清除定时器");
  640. clearInterval(refresh);
  641. });
  642. $('#login-before').click(function(){
  643. $(this).hide();
  644. $('#login-qrcode').show();
  645. /// 临时增加,模拟 APP/小程序 扫码确认???Lin
  646. /* 去掉,来真的了。Lin
  647. $.ajax({
  648. type: "post",
  649. url: "<serv.ss name='gateLoginByQrcode'/>",
  650. async: true,
  651. dataType: "json",
  652. success: function(data) {
  653. }
  654. });
  655. */
  656. ///
  657. return false;
  658. });
  659. var lrryClose;
  660. var lrryCloseTime = 60 * 1000;
  661. $(document).on('mousedown',function(e){
  662. if($(e.target).parents('#jcjllb').length == 0){
  663. if(e.target.id == "jcjllb"){
  664. return;
  665. }
  666. if($(e.target).parents('.ryxxlb-child').length>0||e.target.className.indexOf("ryxxlb-child")>-1){
  667. if($(e.target).parents('.ryxxlb-child').length>0){
  668. $(e.target).parents('.ryxxlb-child').remove();
  669. }
  670. if(e.target.className.indexOf("ryxxlb-child")>-1){
  671. $(e.target).remove();
  672. }
  673. return;
  674. }
  675. clearTimeout(hideJcjllb);
  676. isDrag = false;
  677. handleHide("jcjllb");
  678. if(lrryClose){
  679. clearInterval(lrryClose);
  680. lrryClose = setInterval(function(){
  681. hideLrry();
  682. }, lrryCloseTime);
  683. }
  684. }
  685. });
  686. $(document).on('keydown mousemove',function(){
  687. if(lrryClose){
  688. clearInterval(lrryClose);
  689. lrryClose = setInterval(function(){
  690. hideLrry();
  691. }, lrryCloseTime);
  692. }
  693. });
  694. $('#qc').click(function(){
  695. $('#sfzh').val('');
  696. });
  697. $('body').click(function(e){
  698. e.stopPropagation();
  699. $('#jfryid_option').hide();
  700. if($(e.target).parents('#lrry').length > 0){
  701. return false;
  702. }
  703. if($('#zzc').is(':visible')){
  704. return false;
  705. }
  706. if(!isDrag){//如果是拖动就不触发
  707. $('#lrry').stop(true).fadeToggle(function(){
  708. if($('#lrry').is(':visible')){
  709. var zIndex = Number($("#jcjllb").css("z-index"))<0?2:Number($("#jcjllb").css("z-index"))+1;
  710. $("#lrry").css("z-index",zIndex);
  711. $("#sfzh").focus();
  712. console.log('设置定时器');
  713. clearInterval(lrryClose);
  714. lrryClose = setInterval(function(){
  715. console.log('定时器运行');
  716. hideLrry();
  717. }, lrryCloseTime);
  718. }else{
  719. $("#scanner").val("");
  720. $("#scanner").focus();
  721. clearInterval(lrryClose);
  722. lrryClose = null;
  723. }
  724. });
  725. }
  726. });
  727. $('#jf_cancle').click(function() {
  728. handleHide("lfxx");
  729. $('#lrry').show()
  730. return false;
  731. });
  732. $('#syid').change(function(){
  733. $('#jfsy').val($('#objectPickergrowheightsyid').val());
  734. $('[name="jfsy"]').val($('#objectPickergrowheightsyid')[0].srcText);
  735. });
  736. $('#yylf_come').click(function(){
  737. createLfJcjl(11);
  738. handleHide("yylf")
  739. return false;
  740. });
  741. $('#yylf_leave').click(function(){
  742. createLfJcjl(51);
  743. handleHide("yylf");
  744. return false;
  745. });
  746. $('#yylf_cancle').click(function() {
  747. handleHide("yylf");
  748. $('#lrry').show();
  749. /*$('#yylf').hide();
  750. $('#zzc').hide();
  751. $('.lj').css('filter','blur(0px)');*/
  752. return false;
  753. });
  754. $('#lfqd').click(function(){
  755. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  756. wd.display.alert("请先登录!");
  757. return false;
  758. }
  759. var jfsfzh = $('#jfsfzh').val();
  760. var jfxm = $('#jfxm').val();
  761. var jfxbm = $('#jfxbm').val();
  762. var jfbmid = $('#jfbmid').val();
  763. var jfbjid = $('#jfbjid').val();
  764. var jfryid = $('#jfryid').val();
  765. var rs = $('#jfrs').val();
  766. if(jfxm == '' || jfxbm == '' || jfryid == ''){
  767. wd.display.alert("请补全信息");
  768. return false;
  769. }
  770. if(jfsfzh != '' && jfsfzh.length != 15 && jfsfzh.length != 18){
  771. wd.display.alert("请输入正确的身份证号!");
  772. return false;
  773. }
  774. $.ajax({
  775. type: "post",
  776. url: "<serv.ss name='gate_insTempLf'/>", // :"lf_zj"。Lin
  777. async: true,
  778. dataType: "json",
  779. data:{
  780. sfzh:jfsfzh,
  781. xm:jfxm,
  782. xbm:jfxbm,
  783. jfbmid:jfbmid,
  784. jfbjid:jfbjid,
  785. jfryid:jfryid,
  786. sy:$('[name="jfsy"]').val(),
  787. syid:$('#syid').val(),
  788. mjdid:mjdid,
  789. mwid:"${sessionScope.ssUser.ryid}", // ['env.ry'].。Lin
  790. rs:rs
  791. },
  792. success: function(data) {
  793. console.log(data);
  794. wd.display.alert(data.msg);
  795. handleHide("lfxx");
  796. /*
  797. $('#lfxx').hide();
  798. $('#zzc').hide();
  799. $('.lj').css('filter','blur(0px)');
  800. lfxxClear();*/
  801. }
  802. });
  803. return false;
  804. });
  805. $('#jfsfzh').blur(function(){
  806. $(this).val($(this).val().replace(/\s+/g,""));
  807. });
  808. $('#jfxm').blur(function(){
  809. $(this).val($(this).val().replace(/\s+/g,""));
  810. });
  811. $('#qd').click(function(){
  812. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  813. wd.display.alert("请先登录!");
  814. return;
  815. }
  816. sfzh = $('#sfzh').val();
  817. if(sfzh == ''){
  818. wd.display.alert("请输入身份证号或学号!");
  819. return;
  820. }
  821. $.ajax({
  822. type: "post",
  823. <%-- 改,sfzh 用 data{sfzh:sfzh} 去传输。Lin
  824. url: '@service{name:"jcjl_lfx_zjhcx"}@&sfzh=' + sfzh,
  825. --%>
  826. url: "<serv.ss name='gate_initMpByKey'/>",
  827. data: {
  828. sfzh:sfzh
  829. },
  830. async: true,
  831. dataType: "json",
  832. success: function(data) {
  833. console.log(data);
  834. if (data.error == '1') {
  835. wd.display.alert(data.msg);
  836. $('#jfsfzh').val(sfzh);
  837. if(sfzh.length == 15){
  838. wd.edit.objectPicker.getInstance("xbm").initValue(sfzh.substring(14,15)%2==0?2:1);
  839. }
  840. if(sfzh.length == 18){
  841. wd.edit.objectPicker.getInstance("xbm").initValue(sfzh.substring(16,17)%2==0?2:1);
  842. }
  843. sfzh = '';
  844. handleShow("lfxx");
  845. } else {
  846. if(data.lb == 0){
  847. <%-- 改。Lin
  848. $('#zjz').attr('src','@service{name:"getData"}@&path=' + data.zjzwj); --%>
  849. $('#zjz').attr('src','/service?ssServ=dlByHttp&path='+ data.zjzwj);
  850. $('#xm').text(data.xm == null ? '' : data.xm);
  851. $('#xh').text(data.ryh == null ? '' : data.ryh);
  852. $('#bj').text(data.bjmc == null ? '' : data.bjmc);
  853. $('#lxlb').text(data.lxlb == null ? '' : data.lxlb);
  854. $('#lxlbts').hide();
  855. if(data.lxlb == '请假' && data.ylkcs >= data.zdlkcs){
  856. $('#lxlb').text('次数已超出('+ data.ylkcs +')');
  857. $('#lxlbts').show();
  858. }
  859. $('#ryxx').show();
  860. $('#zzc').show();
  861. $('.lj').css('filter','blur(20px)');
  862. //bug
  863. $("#ryxx").height("450px");
  864. $("#cancle").show();
  865. $('#leave').show();
  866. $('#back').show();
  867. $("#ryxx").removeClass("mainState-green").removeClass("mainState-red");
  868. }else{
  869. $('#lfxx').hide();
  870. handleShow("yylf");
  871. $('#yylfxm').text(data.xm);
  872. $('#yylfsfzh').text(data.ryh);
  873. $('#yylfrs').text(data.rs);
  874. $('#yylfyysj').text(new Date(data.yysj).toLocaleString('chinese', { hour12: false }).replace(/\//g,'-'));
  875. lfid = data.ryid;
  876. }
  877. }
  878. }
  879. });
  880. });
  881. $('#cancle').click(function(){
  882. handleHide("ryxx");
  883. $('#lrry').show();
  884. /*
  885. $('#ryxx').hide();
  886. sfzh = '';
  887. $('#zzc').hide();
  888. $('.lj').css('filter','blur(0px)');
  889. $("#scanner").focus();
  890. $("#confirm-qrcode").hide();*/
  891. return false;
  892. });
  893. $('#back').click(function(){
  894. createJcjl(11);
  895. handleHide("ryxx");
  896. /*
  897. $('#ryxx').hide();
  898. sfzh = '';
  899. $('#zzc').hide();
  900. $('.lj').css('filter','blur(0px)');*/
  901. return false;
  902. });
  903. $('#leave').click(function(){
  904. createJcjl(51);
  905. handleHide("ryxx");
  906. /*$('#ryxx').hide();
  907. sfzh = '';
  908. $('#zzc').hide();
  909. $('.lj').css('filter','blur(0px)');*/
  910. return false;
  911. });
  912. $('#ryxxlb').on('click','.ryxxlb-child',function(){
  913. $(this).remove();
  914. });
  915. });
  916. /**
  917. * 根据设备标识查询mjdid
  918. */
  919. function getMjdid(sbbs){
  920. console.log(sbbs);
  921. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  922. wd.display.alert("请先登录!");
  923. return;
  924. }
  925. $.ajax({
  926. type: "post",
  927. url: "<serv.ss name='gate_selMjdidBySbbs'/>", // :"mjd_mjdid_cx"。Lin
  928. async: true,
  929. dataType: "json",
  930. data:{
  931. sbbs:sbbs
  932. },
  933. success: function(data) {
  934. console.log(data);
  935. if (data.error == '1') {
  936. wd.display.alert(data.msg);
  937. mjdid = '';
  938. } else {
  939. console.log(data.mjdid);
  940. mjdid = data.mjdid;
  941. }
  942. }
  943. });
  944. }
  945. /**
  946. * 离返校学员信息增加
  947. */
  948. function createJcjl(jcfx){
  949. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  950. wd.display.alert("请先登录!");
  951. return;
  952. }
  953. var url = '';
  954. /* 改,把参数统一移到 data:{} 里。Lin
  955. if(sfzh == ''){
  956. url = '@service{name:"jcjl_lfx_zj"}@&code=' + qrcodestr;
  957. }else{
  958. url = '@service{name:"jcjl_lfx_zj"}@&sfzh=' + sfzh
  959. }
  960. */ url = "<serv.ss name='gate_insJcjlByMp'/>";
  961. $.ajax({
  962. type: "post",
  963. url: url,
  964. data:{
  965. /// 增加,把上面写在 URL 里的参数统一移到这。Lin
  966. code: qrcodestr,
  967. sfzh: sfzh,
  968. ///
  969. jcfx:jcfx,
  970. mwid:"${sessionScope.ssUser.ryid}", // ['env.ry'].。Lin
  971. mjdid:mjdid
  972. },
  973. async: true,
  974. dataType: "json",
  975. success: function(data) {
  976. console.log(data);
  977. wd.display.alert(data.msg);
  978. }
  979. });
  980. }
  981. /**
  982. * 来访进出记录增加
  983. * @param {Object} jcfx
  984. */
  985. function createLfJcjl(jcfx){
  986. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  987. wd.display.alert("请先登录!");
  988. return;
  989. }
  990. $.ajax({
  991. type: "post",
  992. url: "<serv.ss name='gate_updTempLfByExit'/>", // :"jcjl_lf_zj"。Lin
  993. data:{
  994. jcfxm:jcfx,
  995. mwid:"${sessionScope.ssUser.ryid}", // ['env.ry'].。Lin
  996. mjdid:mjdid,
  997. dxid:lfid
  998. },
  999. async: true,
  1000. dataType: "json",
  1001. success: function(data) {
  1002. console.log(data);
  1003. wd.display.alert(data.msg);
  1004. }
  1005. });
  1006. }
  1007. //扫描抢输入事件,监听到扫描枪输入后会调用
  1008. function onScanInput(str) {
  1009. console.log(str.toLowerCase());
  1010. if(str.indexOf("@entrance@")>-1||str.indexOf("@exit@")>-1){
  1011. //带有前缀的扫码器
  1012. if(str.match(/@entrance@/)){
  1013. direction = "entrance";
  1014. str = str.split("@entrance@")[1];
  1015. }else if(str.match(/@exit@/)){
  1016. direction = "exit";
  1017. str = str.split("@exit@")[1];
  1018. }else{
  1019. $("#scanner").val("");
  1020. return;
  1021. }
  1022. }else{
  1023. //没有前缀的扫码器
  1024. //@hdO{n:"ry",k:"a5c8247c075141279dbd853bbf741853"}@
  1025. if(str.length != 50&&str.split(".")[1].length !=35){
  1026. $("#scanner").val("");
  1027. return;
  1028. }
  1029. direction=null;
  1030. }
  1031. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  1032. wd.display.alert("请先登录!");
  1033. $("#scanner").val("");
  1034. return;
  1035. }
  1036. var hdObj = eval('('+str.substr(4,str.length - 5)+')');
  1037. if(hdObj.n != 'ry'){
  1038. $("#scanner").val("");
  1039. return;
  1040. }
  1041. str = hdObj.k;
  1042. clearTimeout(hideRyxxTimeout);
  1043. if(direction){
  1044. $.ajax({
  1045. type: "post",
  1046. url: '@service{name:"jcjl_lfx_cx_sg"}@&code=' + str.toLowerCase(),
  1047. async: true,
  1048. dataType: "json",
  1049. data:{direction:direction,mjdid:mjdid},
  1050. success: function(data) {
  1051. console.log(data);
  1052. if (data.error == '1') {
  1053. wd.display.alert(data.msg)
  1054. } else {
  1055. //qrcodestr = str.toLowerCase();
  1056. qrcodestr = data.yhid;
  1057. sfzh = '';
  1058. <%-- 改。Lin
  1059. $('#zjz').attr('src','@service{name:"getData"}@&path=' + data.zjzwj); --%>
  1060. $('#zjz').attr('src','/service?ssServ=dlByHttp&path='+ data.zjzwj);
  1061. $('#xm').text(data.xm == null ? '' : data.xm);
  1062. $('#xh').text(data.ryh == null ? '' : data.ryh);
  1063. $('#bj').text(data.bjmc == null ? '' : data.bjmc);
  1064. if(direction == 'entrance'){
  1065. $("#ryxx").addClass("mainState-green").removeClass("mainState-red");
  1066. // $('#lxlb').text("进校:"+(data.lxlb == null ? '' : data.lxlb)+(data.MSG?"("+data.MSG+")":""));
  1067. $('#lxlb').text(""+(data.lxlb == null ? '' : data.lxlb)+(data.MSG?"("+data.MSG+")":""));
  1068. }else{
  1069. $("#ryxx").addClass("mainState-red").removeClass("mainState-green");
  1070. // $('#lxlb').text("离校:"+(data.lxlb == null ? '' : data.lxlb)+(data.MSG?"("+data.MSG+")":""));
  1071. $('#lxlb').text(""+(data.lxlb == null ? '' : data.lxlb)+(data.MSG?"("+data.MSG+")":""));
  1072. }
  1073. $('#lxlbts').hide();
  1074. if(data.lxlb == '请假'){
  1075. var outnumber=false;
  1076. if(direction == 'entrance'){
  1077. outnumber=data.ylkcs > data.zdlkcs;
  1078. }else{
  1079. outnumber=data.ylkcs >= data.zdlkcs;
  1080. }
  1081. if(outnumber){
  1082. $('#lxlb').text('次数已超出('+ data.ylkcs +')');
  1083. $('#lxlbts').show();
  1084. }
  1085. }
  1086. $('#zzc').show();
  1087. $('.lj').css('filter','blur(20px)');
  1088. if(data.warn){
  1089. //要显示二维码给保安扫
  1090. showRyxx({k:data.randomKey,d:$("input[name='sbbs']").val()});
  1091. }else{
  1092. showRyxx();
  1093. }
  1094. }
  1095. }
  1096. });
  1097. }else{
  1098. $("#ryxx").removeClass("mainState-green").removeClass("mainState-red");
  1099. $.ajax({
  1100. type: "post",
  1101. url: '@service{name:"jcjl_lfx_cx"}@&code=' + str.toLowerCase(),
  1102. async: true,
  1103. dataType: "json",
  1104. success: function(data) {
  1105. console.log(data);
  1106. if (data.error == '1') {
  1107. wd.display.alert(data.msg)
  1108. } else {
  1109. //qrcodestr = str.toLowerCase();
  1110. qrcodestr = data.yhid;
  1111. sfzh = '';
  1112. <%-- 改。Lin
  1113. $('#zjz').attr('src','@service{name:"getData"}@&path=' + data.zjzwj); --%>
  1114. $('#zjz').attr('src','/service?ssServ=dlByHttp&path='+ data.zjzwj);
  1115. $('#xm').text(data.xm == null ? '' : data.xm);
  1116. $('#xh').text(data.ryh == null ? '' : data.ryh);
  1117. $('#bj').text(data.bjmc == null ? '' : data.bjmc);
  1118. $('#lxlb').text(data.lxlb == null ? '' : data.lxlb);
  1119. $('#lxlbts').hide();
  1120. if(data.lxlb == '请假' && data.ylkcs >= data.zdlkcs){
  1121. $('#lxlb').text('次数已超出('+ data.ylkcs +')');
  1122. $('#lxlbts').show();
  1123. }
  1124. showRyxx();
  1125. $('#zzc').show();
  1126. $('.lj').css('filter','blur(20px)');
  1127. }
  1128. }
  1129. });
  1130. }
  1131. }
  1132. var lxConfirmInterval;
  1133. var hideRyxxTimeout;
  1134. /**
  1135. * 获取轮询结果
  1136. * @param {Object} k
  1137. */
  1138. function jcjl_getScanResult(k){
  1139. $.ajax({
  1140. type: "post",
  1141. url: '@service{name:"jcjl_getScanResult"}@',
  1142. async: true,
  1143. dataType: "json",
  1144. data:{
  1145. privateKey:k
  1146. },
  1147. success: function(data) {
  1148. if(data.status){
  1149. clearInterval(lxConfirmInterval);
  1150. alert(data.msg);
  1151. handleHide("ryxx");
  1152. }
  1153. }
  1154. });
  1155. }
  1156. /**
  1157. * 移除标识
  1158. * @param {Object} k
  1159. */
  1160. function removePrivateKey(k){
  1161. $.ajax({
  1162. type: "post",
  1163. url: '@service{name:"jcjl_removeScanConfirmMap"}@',
  1164. async: true,
  1165. dataType: "json",
  1166. data:{
  1167. privateKey:k
  1168. },
  1169. success: function(data) {
  1170. if(data.status){
  1171. }
  1172. }
  1173. })
  1174. }
  1175. function showRyxx(data){
  1176. $("#confirm-qrcode").hide();
  1177. handleShow("ryxx");
  1178. if(data){
  1179. $("#ryxx").height("339px");
  1180. $("#cancle").hide();
  1181. $('#leave').hide();
  1182. $('#back').hide();
  1183. $("#qrcodeBox").css("z-index",Number($("#jcjllb").css("z-index"))+1);
  1184. qrCodeGenerate(".qrcode-confirm", "@hdGc" + JSON.stringify(data) + "@", 110, 110, "canvas");
  1185. $("#confirm-qrcode").show();
  1186. lxConfirmInterval = setInterval(function(){
  1187. jcjl_getScanResult(data.k);
  1188. },500);
  1189. }else{
  1190. if(direction){
  1191. $("#ryxx").height("339px");
  1192. $('#leave').hide();
  1193. $('#back').hide();
  1194. $("#cancle").hide();
  1195. if(direction == "entrance"){
  1196. createJcjl(11);
  1197. }else{
  1198. createJcjl(51);
  1199. }
  1200. }else{
  1201. $("#ryxx").height("450px");
  1202. $("#cancle").val("取消").show();
  1203. $('#leave').show();
  1204. $('#back').show();
  1205. }
  1206. }
  1207. $("#zzc").click(function(){
  1208. if(data){
  1209. clearInterval(lxConfirmInterval);
  1210. removePrivateKey(data.k);
  1211. }
  1212. handleHide("ryxx");
  1213. });
  1214. hideRyxxTimeout = setTimeout(function(){
  1215. handleHide("ryxx");
  1216. },1000 * 20)
  1217. }
  1218. function hideLrry(){
  1219. $('#lrry').stop(true).fadeOut();
  1220. /* 先去掉,if(lrryClose) 会抛出错误 ReferenceError: lrryClose is not defined,导致不执行后面的语句。Lin
  1221. * clearInterval(lrryClose) 在调用 hideLrry() 前都有调用
  1222. * lrryClose 会被马上赋值:lrryClose = setInterval(function(){hideLrry();}, lrryCloseTime);
  1223. */
  1224. if(lrryClose){
  1225. clearInterval(lrryClose);
  1226. lrryClose = null;
  1227. }
  1228. /* */
  1229. $("#scanner").val("");
  1230. $("#scanner").focus();
  1231. }
  1232. var y = 0;
  1233. /**
  1234. * 根据设备标识获取进出记录
  1235. */
  1236. function showJcjllb(){
  1237. $("#lrry").hide();
  1238. $("#scanner").focus();
  1239. //下拉
  1240. $.ajax({
  1241. type: "post",
  1242. url: '@service{name:"getJcjlBySbbs"}@',
  1243. async: true,
  1244. dataType: "json",
  1245. data:{
  1246. sbbs:beacon.getMacAddress(),
  1247. },
  1248. success: function(data) {
  1249. handleShow("jcjllb");
  1250. if(data.length>0&&$("#ryxx").is(":hidden")){
  1251. $("#jcjllb").css("z-index",Number($("#qrcodeBox").css("z-index"))+1);
  1252. }
  1253. for(var i=startrn;i<data.length&&i<endrn;i++){
  1254. jcjlEmpty = false;
  1255. var jcjl = data[i];
  1256. var mainState="";
  1257. if(jcjl.jcfxm == 11){
  1258. mainState = "mainState-green";
  1259. }else if(jcjl.jcfxm == 51){
  1260. mainState = "mainState-red";
  1261. }else if(jcjl.jcfxm == 81){
  1262. mainState = "mainState-inportantrRed";
  1263. }else{
  1264. mainState = "mainState-red";
  1265. }
  1266. var html = '<div class="jcjllb-child '+mainState+'" style="width:99%; height:350px;position: relative;border:1px white solid;border-radius:5px;background:#fff;'+($(".jcjllb-child").length > 0?"margin-bottom:25px;":"")+'">'
  1267. + '<div style="display:flex;width:680px;margin-left:60px;margin-top:61px;padding-bottom: 50px;">'
  1268. + '<div>'
  1269. + '<input type="hidden" name="ryid" value="'+ jcjl.ryid +'" class="input-text input-number" />';
  1270. if(jcjl.zjzwj){
  1271. <%-- 改。Lin
  1272. html += '<img id="zjz" src="@service{name:"getData"}@&path='+ jcjl.zjzwj +'" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius:3px;"></img>'; --%>
  1273. html += '<img id="zjz" src="/service?ssServ=dlByHttp&path="'+ jcjl.zjzwj +'" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius:3px;"></img>';
  1274. }else{
  1275. <%-- 改。Lin
  1276. html += '<img id="zjz" src="${sessionScope["XMMC"]}/theme/EasyUses/image/default-photo.png" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius:3px;"></img>'; --%>
  1277. html += '<img id="zjz" src="/skin/easy/image/default-photo.png" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius:3px;"></img>';
  1278. }
  1279. html += '</div>'
  1280. + '<table class="xm content-largeText" style="color:#000;">';
  1281. if(jcjl.xm != null){
  1282. html += '<tr>'
  1283. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"> ';
  1284. if(jcjl.dxm&&jcjl.dxm == 'lf'){
  1285. html+= '<span id="xm">'+ jcjl.xm +'(来访)</span> '
  1286. + '</td>'
  1287. + '</tr>';
  1288. }else{
  1289. html += '<span id="xm">'+ jcjl.xm +'</span> '
  1290. + '</td>'
  1291. + '</tr>';
  1292. }
  1293. }
  1294. if(jcjl.bjmc != null){
  1295. html += '<tr>'
  1296. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"> '
  1297. + '<span id="bj" >'+ jcjl.bjmc +'</span> '
  1298. + '</td>'
  1299. + '</tr>';
  1300. }
  1301. if(jcjl.jcsj != null){
  1302. html += '<tr>'
  1303. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;">'
  1304. + '<span id="xh" >'+ new Date(jcjl.jcsj).format("yyyy-MM-dd hh:mm:ss") +'</span> '
  1305. + '</td>'
  1306. + '</tr>';
  1307. }
  1308. html += '<tr>'
  1309. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"> ';
  1310. //1 请假
  1311. //51 走读
  1312. //91 无原由
  1313. //所有拒绝的进出记录显示为无原由
  1314. if(jcjl.jcfxm == 81){
  1315. html+='<span class="content-largeWarningText" style="vertical-align: top;">不允许离校</span> ';
  1316. }else{
  1317. if(jcjl.lkyym == 1){//请假
  1318. html += '<span class="content-largeWarningText" style="vertical-align: top;color:black;">请假</span>';
  1319. }else if (jcjl.lkyym == 51){
  1320. html+='<span class="content-largeWarningText" style="vertical-align: top;color:black;">走读生</span> ';
  1321. }else{//无原有
  1322. html+='<span class="content-largeWarningText" style="vertical-align: top;">无原由</span> ';
  1323. }
  1324. if(jcjl.tw != null){
  1325. if(jcjl.tw < 37.3){
  1326. html += '<span class="content-largeWarningText" style="color:black;">'+ jcjl.tw +'℃</span>';
  1327. }else{
  1328. html += '<span class="content-largeWarningText" style="color:red;">'+ jcjl.tw +'℃</span>';
  1329. }
  1330. }
  1331. }
  1332. html += '</td></tr>';
  1333. html += '</table>'
  1334. + '</div> '
  1335. + '</div>';
  1336. $('#jcjllb').prepend(html);
  1337. if(startrn==0){
  1338. $('#jcjllb').scrollTop($('#jcjllb')[0].scrollHeight);
  1339. }
  1340. }
  1341. if(data.length>endrn){
  1342. startrn += endrn;
  1343. }else{
  1344. startrn += data.length;
  1345. }
  1346. endrn+=10;
  1347. clearTimeout(hideJcjllb);
  1348. hideJcjllb = setTimeout(function(){
  1349. //取消虚化
  1350. // handleHide("jcjllb");
  1351. },1000 * 20);
  1352. }
  1353. });
  1354. }
  1355. var isDrag = false;
  1356. $(function(e) {
  1357. stylesheetData.ryxxlb_left = $("#ryxxlb").css("left");
  1358. stylesheetData.ryxx_right = $("#ryxx").css("right");
  1359. stylesheetData.lfxx_right = $("#lfxx").css("right");
  1360. stylesheetData.yylf_right = $("#yylf").css("right");
  1361. //2020-12-17添加分辨率兼容的事件
  1362. if (screen.width == 1280&&screen.height == 960){
  1363. // $("#videoID").css({"max-width":"none","width":"1706","margin-left":"-194px"});
  1364. $("#videoID").css({"max-width":"none","width":"1920","margin-left":"-320px"});
  1365. $("#lrry").css("left","55%");
  1366. }
  1367. //2020-10-29添加下滑的事件
  1368. $("#jcjllb").on('touchstart',function(e){
  1369. y = e.originalEvent.touches["0"].screenY;
  1370. });
  1371. $("#jcjllb").on('touchend',function(e){
  1372. e.stopPropagation();
  1373. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  1374. return;
  1375. }
  1376. if(e.originalEvent.changedTouches["0"].screenY>y){
  1377. showJcjllb()
  1378. }
  1379. });
  1380. $("#jcjllb").css("z-index",Number($("#qrcodeBox").css("z-index"))-1);
  1381. touch.on('#jcjllb', 'touchend', function (e) {
  1382. e.stopPropagation();
  1383. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  1384. return;
  1385. }
  1386. if(e.y>y){
  1387. isDrag = true;
  1388. showJcjllb()
  1389. }else{
  1390. isDrag = false;
  1391. }
  1392. });
  1393. document.onmousedown = function(e) {
  1394. var nextTime = new Date().getTime();
  1395. lastTime = nextTime;
  1396. /*
  1397. var nextTime = new Date().getTime();
  1398. var code = e.which;
  1399. var char = String.fromCharCode(code);
  1400. if (codeString == "") {
  1401. codeString += char;
  1402. } else if (nextTime - lastTime <= 30) {
  1403. codeString += char;
  1404. }
  1405. lastTime = nextTime;*/
  1406. };
  1407. touch.on('#jcjllb', 'touchstart', function (event) {
  1408. y = event.y;
  1409. });
  1410. getDatesInfo()
  1411. var codeString = "";
  1412. //定时器每隔200ms 清空codeString
  1413. /*var scanTimeer = setInterval(function() {
  1414. var now = new Date().getTime();
  1415. if (now - lastTime > 200) {
  1416. if (codeString.length > 0) {
  1417. onScanInput(codeString.replace(/\s+/g,""));
  1418. }
  1419. codeString = "";
  1420. }
  1421. }, 200);*/
  1422. var scanTimeer = setInterval(function() {
  1423. var now = new Date().getTime();
  1424. if (now - lastTime > 500) {
  1425. if ($("#scanner").val().length > 0) {
  1426. onScanInput($("#scanner").val().replace(/\s+/g,""));
  1427. $("#scanner").val("");
  1428. }
  1429. //codeString = "";
  1430. }
  1431. }, 500);
  1432. var lastTime;
  1433. var caseFormat = false;
  1434. document.onkeydown = function(e) {
  1435. var nextTime= new Date().getTime();
  1436. lastTime = nextTime;
  1437. /*var code = e.which;
  1438. var char = String.fromCharCode(code);
  1439. if (codeString == "") {
  1440. codeString += char;
  1441. } else if (nextTime - lastTime <= 30) {
  1442. codeString += char;
  1443. }
  1444. lastTime = nextTime;*/
  1445. };
  1446. $("#scanner").focus();
  1447. window.onbeforeunload= function(event) {
  1448. if(!beacon){
  1449. return;
  1450. }
  1451. beacon.shutDownIdcardDevice();
  1452. }
  1453. });
  1454. /**
  1455. * 显示时间
  1456. */
  1457. function getDatesInfo() {
  1458. var date=new Date();
  1459. var dates=date.getDate(),month=date.getMonth()+1,hours=date.getHours(),seconds=date.getMinutes(),year=date.getFullYear();
  1460. if(hours<10){
  1461. hours="0"+hours
  1462. }
  1463. if(seconds<10){
  1464. seconds="0"+seconds;
  1465. }
  1466. $("#getDateInfo").children("span")[0].innerHTML= year+"/" + month + "/" + dates;
  1467. $("#getDateInfo").children("span")[1].innerHTML = "" + hours + ":" + seconds;
  1468. }
  1469. setInterval(function () {
  1470. getDatesInfo()
  1471. },1000)
  1472. /**
  1473. *
  1474. * 未知功能
  1475. */
  1476. top.changeIdcard = function(idCardInfo){
  1477. if(${empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  1478. wd.display.alert("请先登录!");
  1479. return;
  1480. }
  1481. idCardInfo = JSON.parse(idCardInfo);
  1482. var idCardNo = idCardInfo.sfzh;
  1483. console.log(idCardNo);
  1484. $.ajax({
  1485. type: "post",
  1486. url: '@service{name:"lf_yyxx_cx"}@',
  1487. async: true,
  1488. dataType: "json",
  1489. data:{
  1490. sfzh:idCardNo,
  1491. },
  1492. success: function(data) {
  1493. console.log(data);
  1494. if (data.error == '1') {
  1495. wd.display.alert(data.msg);
  1496. $('#yylf').hide();
  1497. handleShow("lfxx");
  1498. $('#jfsfzh').val(idCardNo);
  1499. $('#jfxm').val(idCardInfo.xm.replace(/\s+/g,""));
  1500. if(idCardNo.length == 15){
  1501. wd.edit.objectPicker.getInstance("xbm").initValue(idCardNo.substring(14,15)%2==0?2:1);
  1502. }else{
  1503. wd.edit.objectPicker.getInstance("xbm").initValue(idCardNo.substring(16,17)%2==0?2:1);
  1504. }
  1505. } else {
  1506. $('#lfxx').hide();
  1507. $('#yylf').show();
  1508. $('#yylfxm').text(idCardInfo.xm.replace(/\s+/g,""));
  1509. $('#yylfsfzh').text(idCardNo);
  1510. $('#yylfrs').text(data.rs);
  1511. $('#yylfyysj').text(new Date(data.yysj).toLocaleString('chinese', { hour12: false }).replace(/\//g,'-'));
  1512. lfid = data.lfid;
  1513. $('#zzc').show();
  1514. $('.lj').css('filter','blur(20px)');
  1515. }
  1516. }
  1517. });
  1518. }
  1519. /**
  1520. *
  1521. * 接访人查询
  1522. * @param {Object} isjfr
  1523. * @param {Object} usexm 搜索姓名
  1524. */
  1525. function lf_jfr_cx(isjfr,usexm){
  1526. var jfbmid = $('#jfbmid').val();
  1527. var jfbjid = $('#jfbjid').val();
  1528. var jfryna = $('#jfryna').val();
  1529. $.ajax({
  1530. url: "<serv.ss name='gate_selRyOptByBjidOrBmid'/>", // :"lf_jfr_cx"。Lin
  1531. type: 'post',
  1532. dataType: 'json',
  1533. data: {
  1534. bmid: jfbmid,
  1535. bjid: jfbjid,
  1536. xm: usexm ? jfryna : ''
  1537. },
  1538. success: function(data) {
  1539. console.log(data);
  1540. /// 增加,显示错误信息。Lin
  1541. if (data.error == '1') {
  1542. wd.display.alert(data.msg);
  1543. return;
  1544. }
  1545. ///
  1546. $('#jfryid_option').empty();
  1547. $('#jfryid_option').append('<div class="popupList" status="noitem" checkstate="unselected" value=""></div>');
  1548. for(var i = 0; i < data.length; i++){
  1549. $('#jfryid_option').append('<div class="popupList" status="people" value="'+ data[i].ryid +'" index="'+ i +'" checkstate="unselected">'+ data[i].xm +'</div>');
  1550. }
  1551. if(!isjfr){
  1552. $('#jfryna').val('');
  1553. $('#jfryid').val('');
  1554. globalJfryna = '';
  1555. globalJfryid = '';
  1556. }
  1557. }
  1558. });
  1559. }
  1560. wd.edit.objectPicker.getInstance("jfbmid").onchange = function(){
  1561. lf_jfr_cx(false,false);
  1562. }
  1563. wd.edit.objectPicker.getInstance("jfbjid").onchange = function(){
  1564. lf_jfr_cx(false,false);
  1565. }
  1566. function lfxxClear(){
  1567. $('jfsfzh').val('');
  1568. $('#jfxm').val('');
  1569. wd.edit.objectPicker.getInstance("jfbmid").initValue();
  1570. wd.edit.objectPicker.getInstance("xbm").initValue();
  1571. wd.edit.objectPicker.getInstance("jfbjid").initValue();
  1572. wd.edit.objectPicker.getInstance("syid").initValue();
  1573. $('#jfrs').val('1');
  1574. }
  1575. var jcjlcxsj;
  1576. var dsscjcjl;
  1577. /**
  1578. * 有gate2的情况下:不显示历史进出记录;gate1在左边,gata2右边
  1579. * 有gata1的情况下:历史进出记录列表在右边
  1580. *
  1581. * @return {[type]} [description]
  1582. */
  1583. var stylesheetData = {};
  1584. function handleShow(type){
  1585. $('.lj').css('filter','blur(20px)');
  1586. if(type == "ryxx"){
  1587. $('#ryxx').show();
  1588. handleHide("lfxx");
  1589. handleHide("yylf");
  1590. if($(".ryxxlb-child").length>0){
  1591. handleHide("jcjllb");
  1592. $("#ryxxlb").css("left","30px");
  1593. $("#ryxx").css("right","30px");
  1594. }else if($(".jcjllb-child").length>0){
  1595. $("#ryxx").css("left","30px");
  1596. }else{
  1597. $("#ryxx").css("left","");
  1598. $("#ryxx").css("right",stylesheetData.ryxx_right);
  1599. }
  1600. }else if(type == "ryxxlb"){
  1601. if($("#ryxx").is(":visible")){
  1602. $("#ryxxlb").css("left","30px");
  1603. $("#ryxx").css("right","30px");
  1604. }else if($("#lfxx").is(":visible")){
  1605. $("#ryxxlb").css("left","30px");
  1606. $("#lfxx").css("right","30px");
  1607. }else if($("#yylf").is(":visible")){
  1608. $("#ryxxlb").css("left","30px");
  1609. $("#yylf").css("right","30px");
  1610. }else if($(".jcjllb-child").length>0){
  1611. $("#ryxxlb").css("left","30px");
  1612. }else{
  1613. $("#ryxxlb").css("left",stylesheetData.ryxxlb_left);
  1614. }
  1615. }else if(type == "jcjllb"){
  1616. //ryxxlb左移
  1617. $("#ryxxlb").css("left","30px");
  1618. }else if(type == "lfxx"){
  1619. $('#zzc').show();
  1620. $('#lfxx').show();
  1621. handleHide("ryxx");
  1622. handleHide("yylf");
  1623. handleHide("jcjllb");
  1624. if($(".ryxxlb-child").length>0){
  1625. $("#ryxxlb").css("left","30px");
  1626. $("#lfxx").css("right","30px");
  1627. }else if($(".jcjllb-child").length>0){
  1628. $("#lfxx").css("left","30px");
  1629. }else{
  1630. $("#lfxx").css("right",stylesheetData.lfxx_right);
  1631. $("#lfxx").css("left","");
  1632. }
  1633. }else if(type == "yylf"){
  1634. $('#yylf').show();
  1635. $('#zzc').show();
  1636. handleHide("ryxx");
  1637. handleHide("lfxx");
  1638. handleHide("jcjllb");
  1639. if($(".ryxxlb-child").length>0){
  1640. $("#ryxxlb").css("left","30px");
  1641. $("#yylf").css("right","30px");
  1642. }else if($(".jcjllb-child").length>0){
  1643. $("#yylf").css("left","30px");
  1644. }else{
  1645. $("#yylf").css("right",stylesheetData.yylf_right);
  1646. $("#yylf").css("left","");
  1647. }
  1648. }
  1649. }
  1650. var startrn = 0;
  1651. var endrn = 10;
  1652. var hideJcjllb;
  1653. var jcjlEmpty = true;
  1654. setInterval(function(){
  1655. if($("#ryxx").is(":hidden")&&jcjlEmpty&&$(".ryxxlb-child").length == 0&&$("#lfxx").is(":hidden")&&$("#yylf").is(":hidden")){
  1656. $('.lj').css('filter','blur(0px)');
  1657. }
  1658. },50);
  1659. /**
  1660. * 主要用来去掉虚化的背景
  1661. * @param {[type]} flag [description]
  1662. * @return {[type]} [description]
  1663. */
  1664. function handleHide(type){
  1665. if(type == "ryxx"){
  1666. $('#ryxx').hide();
  1667. sfzh = '';
  1668. $("#scanner").focus();
  1669. $("#confirm-qrcode").hide();
  1670. $("#jcjllb").css("z-index",Number($("#qrcodeBox").css("z-index"))+1);
  1671. if($(".ryxxlb-child").length>0){
  1672. $("#ryxxlb").css("left",stylesheetData.ryxxlb_left);
  1673. }else if($("#lfxx").is(":hidden")&&$("#yylf").is(":hidden")&&jcjlEmpty){
  1674. $('#zzc').hide();
  1675. $('.lj').css('filter','blur(0px)');
  1676. }
  1677. }else if(type == "ryxxlb"){
  1678. if($("#ryxx").is(":visible")){
  1679. $("#ryxx").css("right",stylesheetData.ryxx_right);
  1680. }else if($("#lfxx").is(":visible")){
  1681. $("#lfxx").css("right",stylesheetData.lfxx_right);
  1682. }else if($("#yylf").is(":visible")){
  1683. $("#yylf").css("right",stylesheetData.lfxx_right);
  1684. }else if (jcjlEmpty){
  1685. $('.lj').css('filter','blur(0px)');
  1686. }
  1687. }else if(type == "jcjllb"){
  1688. if($(".ryxxlb-child").length == 0&&$("#ryxx").is(":hidden")&&$("#lfxx").is(":hidden")){
  1689. $('.lj').css('filter','blur(0px)');
  1690. }
  1691. $("#jcjllb").css("z-index",Number($("#qrcodeBox").css("z-index"))-1);
  1692. $("#jcjllb").empty();
  1693. jcjlEmpty = true;
  1694. startrn = 0;
  1695. endrn = 10;
  1696. if($("#ryxx").is(":hidden")&&$("#lfxx").is(":hidden")&&$("#yylf").is(":hidden")){
  1697. $("#ryxxlb").css("left",stylesheetData.ryxxlb_left);
  1698. }
  1699. }else if(type == "lfxx"){
  1700. $('#lfxx').hide();
  1701. if($(".ryxxlb-child").length>0){
  1702. $("#ryxxlb").css("left",stylesheetData.ryxxlb_left);
  1703. }else if($("#ryxx").is(":hidden")&&$("#yylf").is(":hidden")&&jcjlEmpty){
  1704. $('.lj').css('filter','blur(0px)');
  1705. $('#zzc').hide();
  1706. }
  1707. lfxxClear();
  1708. }else if(type == "yylf"){
  1709. $('#yylf').hide();
  1710. if($(".ryxxlb-child").length>0){
  1711. $("#ryxxlb").css("left",stylesheetData.ryxxlb_left);
  1712. }else if($("#ryxx").is(":hidden")&&$("#lfxx").is(":hidden")&&jcjlEmpty){
  1713. $('.lj').css('filter','blur(0px)');
  1714. $('#zzc').hide();
  1715. }
  1716. }
  1717. }
  1718. /**
  1719. * 获取闸门进出记录+显示
  1720. */
  1721. function getAutodoorInfo(){
  1722. $.ajax({
  1723. url: "<serv.ss name='gate_selIoHstByTime'/>", // :"jcjl_zm_cx"。Lin
  1724. type: 'post',
  1725. dataType: 'json',
  1726. data: {
  1727. mjdid: mjdid,
  1728. jcjlcxsj: jcjlcxsj
  1729. },
  1730. success: function(data) {
  1731. handleShow("ryxxlb");
  1732. if(data.length > 0){
  1733. $("#ryxxlb").css("z-index",Number($("#jcjllb").css("z-index"))+1);
  1734. $(".ryxxlb-child:last").css("margin-bottom","25px");
  1735. }
  1736. for(var i = 0; i < data.length; i++){
  1737. $('.lj').css('filter','blur(20px)');
  1738. var jcjl = data[i];
  1739. var marginBottom = "margin-bottom:25px;";
  1740. if($(".ryxxlb-child").length >0&&i == data.length-1){
  1741. //已经存在,则最后一条不要加外边距
  1742. marginBottom = "";
  1743. }
  1744. var mainState="";
  1745. if(jcjl.jcfxm == 11){
  1746. mainState = "mainState-green";
  1747. }else if(jcjl.jcfxm == 51){
  1748. mainState = "mainState-red";
  1749. }else if(jcjl.jcfxm == 81){
  1750. mainState = "mainState-inportantrRed";
  1751. }else{
  1752. mainState = "mainState-red";
  1753. }
  1754. var html = '<div class="ryxxlb-child '+mainState+'" style="width:99%; height:350px;position: relative;border:1px white solid;border-radius:5px;background:#fff;'+marginBottom+'">'
  1755. + '<div style="display:flex;width:680px;margin-left:60px;margin-top:61px;padding-bottom: 50px;">'
  1756. + '<div>'
  1757. + '<input type="hidden" name="ryid" value="'+ jcjl.ryid +'" class="input-text input-number" />';
  1758. if(jcjl.zjzwj){
  1759. <%-- 改。Lin
  1760. html += '<img id="zjz" src="@service{name:"getData"}@&path='+ jcjl.zjzwj +'" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius:3px;"></img>'; --%>
  1761. html += '<img id="zjz" src="/service?ssServ=dlByHttp&path='+ jcjl.zjzwj +'" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius:3px;"></img>';
  1762. }else{
  1763. <%-- 改。Lin
  1764. html += '<img id="zjz" src="${sessionScope["XMMC"]}/theme/EasyUses/image/default-photo.png" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius: 3px;"></img>'; --%>
  1765. html += '<img id="zjz" src="/skin/easy/image/default-photo.png" style="margin-left:10px; width:162px;height:226px;border: 1px solid #cccccc;border-radius: 3px;"></img>';
  1766. }
  1767. html += '</div><table class="xm content-largeText" style="color:#000;">';
  1768. if(jcjl.xm != null){
  1769. html += '<tr>'
  1770. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"> '
  1771. + '<span id="xm">'+ jcjl.xm +'</span> '
  1772. + '</td>'
  1773. + '</tr>';
  1774. }
  1775. if(jcjl.bjmc != null){
  1776. html += '<tr>'
  1777. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"> '
  1778. + '<span id="bj" >'+ jcjl.bjmc +'</span> '
  1779. + '</td>'
  1780. + '</tr>';
  1781. }
  1782. if(jcjl.ryh != null){
  1783. html += '<tr>'
  1784. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;">'
  1785. + '<span id="xh" >'+ jcjl.ryh +'</span> '
  1786. + '</td>'
  1787. + '</tr>';
  1788. }
  1789. html += '<tr>'
  1790. + '<td style="width: 425px;height: 50px;word-break: break-all;overflow: hidden;display: inline-block;"> ';
  1791. // if(jcjl.lxlb == "请假" && jcjl.ylkcs >= jcjl.zdlkcs){
  1792. // html += '<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;">'+ jcjl.jcfx + ":" + '次数已超出('+ jcjl.ylkcs +')</span> '
  1793. // + '<span id="lxlbts" class="content-largeWarningText" style="vertical-align: top;">'
  1794. // + '<img src="$@{sessionScope["XMMC"]}/theme/EasyUses/image/warning.gif" style=" width: 60px;height: 60px;top: -2px;position: relative; "/>'
  1795. // + '</span>';
  1796. // }else if (jcjl.lxlb == '走读生'){
  1797. // // html+='<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;color:black;">'+ jcjl.jcfx + ':' + jcjl.lxlb +'</span> ';
  1798. // html+='<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;color:black;">'+ jcjl.lxlb +'</span> ';
  1799. // }else{
  1800. // // html+='<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;">'+ jcjl.jcfx + ':' + jcjl.lxlb +'</span> ';
  1801. // html+='<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;">'+ jcjl.lxlb +'</span> ';
  1802. // }
  1803. //jcjl.lkyym
  1804. //1 请假
  1805. //51 走读
  1806. //91 无原由
  1807. //所有拒绝的进出记录显示为无原由
  1808. if(jcjl.jcfxm == 81){
  1809. html+='<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;">不允许离校</span> ';
  1810. }else {
  1811. if(jcjl.lkyym==1){
  1812. html += '<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;">请假</span> ';
  1813. }else if (jcjl.lkyym==51){
  1814. html+='<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;color:black;">走读生</span> ';
  1815. }else{
  1816. html+='<span id="lxlb" class="content-largeWarningText" style="vertical-align: top;">无原由</span> ';
  1817. }
  1818. //体温
  1819. if(jcjl.tw&&jcjl.tw < 37.3){
  1820. html += '<span class="content-largeWarningText" style="color:black;">'+ jcjl.tw +'℃</span>';
  1821. }else{
  1822. html += '<span class="content-largeWarningText" style="color:red;">'+ (jcjl.tw||'') +'℃</span>';
  1823. }
  1824. }
  1825. html += '</td></tr>';
  1826. html += '</table>'
  1827. + '</div> '
  1828. + '</div>';
  1829. $('#ryxxlb').append(html);
  1830. $('#ryxxlb').scrollTop($('#ryxxlb')[0].scrollHeight);
  1831. if(i == data.length - 1){
  1832. jcjlcxsj = new Date(jcjl.jcsj);
  1833. jcjlcxsj.setTime(jcjlcxsj.getTime() + 1000);
  1834. jcjlcxsj = jcjlcxsj.toLocaleString('chinese', { hour12: false }).replace(/\//g,'-');
  1835. console.log(jcjlcxsj);
  1836. }
  1837. if(dsscjcjl == null){
  1838. dsscjcjl = setInterval(function(){
  1839. if($('.ryxxlb-child').length > 0){
  1840. $('.ryxxlb-child')[0].remove();
  1841. if($('.ryxxlb-child').length == 0){
  1842. handleHide("ryxxlb");
  1843. clearInterval(dsscjcjl);
  1844. dsscjcjl = null;
  1845. }
  1846. }
  1847. },1000 * 20);
  1848. }
  1849. }
  1850. }
  1851. });
  1852. }
  1853. var zmxxhq;
  1854. if(${not empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  1855. zmxxhq = setInterval(getAutodoorInfo,1000);
  1856. }
  1857. /**
  1858. * 绑定门卫id
  1859. */
  1860. /* 再去掉,没用到,也不用 < 打开 gateHome.home.jsp 时,写到 门禁点.门卫ID。此时,写入的 .门卫ID 为空(还没登录) < 也不能每次换班都写。Lin
  1861. function bindMwid(){
  1862. $.ajax({
  1863. url: "<serv.ss name='gate_bindMwidByMjd'/>", // :"mjd_bind_mwid"。Lin
  1864. type: 'post',
  1865. dataType: 'json',
  1866. data: {
  1867. /// * 改,直接用页面写死的 sbbs(<input name="sbbs") -- 因抛出错误 "beacon is not defined",后面的程序被越过。Lin
  1868. // sbbs: beacon.getMacAddress(),
  1869. /// *
  1870. sbbs: $("input[name=sbbs]").val(),
  1871. mwid: "$@{sessionScope.ssUser.ryid}" // ['env.ry'].。Lin
  1872. },
  1873. success: function(data) {
  1874. }
  1875. });
  1876. }
  1877. */
  1878. /**
  1879. * 检查session是否有效
  1880. */
  1881. if(${not empty sessionScope.ssUser.ryid}){ // ['env.ry'].。Lin
  1882. setInterval(function(){
  1883. $.ajax({
  1884. url: "<serv.ss name='gate_chkSess'/>", // :"mjd_check_session"。Lin
  1885. type: 'post',
  1886. dataType: 'json',
  1887. success: function(data) {
  1888. if(data.isvalid == '0'){
  1889. window.location.href = "/";
  1890. }
  1891. }
  1892. });
  1893. },1000 * 10);
  1894. }
  1895. </script>
  1896. </html>