search_frame0.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <title></title>
  8. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  9. <link rel="stylesheet" href="../../css/projeck.css">
  10. <style>
  11. .contact-list{
  12. }
  13. .contact-list li{
  14. padding: 10px 20px;
  15. display: flex;
  16. justify-content: flex-start;
  17. border-bottom: 1px solid #eeeeee;
  18. }
  19. .personnel-info{
  20. display: flex;
  21. justify-content: flex-start;
  22. align-items: center;
  23. margin-right: 50px;
  24. }
  25. .personnel-info img{
  26. width: 45px;
  27. height: 45px;
  28. border-radius: 100%;
  29. }
  30. .contact-list .personnel-info>p{
  31. width: 45px;
  32. height: 45px;
  33. text-align: center;
  34. line-height: 45px;
  35. color: #FFFFFF;
  36. font-size: 18px;
  37. border-radius: 100%;
  38. margin-right: 30px;
  39. }
  40. .name-dep{
  41. line-height: 1.3;
  42. }
  43. .contact-list li .name-dep p{
  44. font-size: 14px;
  45. color: #333333;
  46. }
  47. .contact-list li .name-dep span{
  48. font-size: 12px;
  49. color: #999999;
  50. }
  51. .position{
  52. font-size: 13px;
  53. color: #333333;
  54. padding-top: 5px;
  55. }
  56. </style>
  57. </head>
  58. <body>
  59. <div class="api_layout" id="api_layout">
  60. <ul class="contact-list" id="Qrcode_itme">
  61. </ul>
  62. </div>
  63. <div class="noText hide">
  64. <img src="../../image/noText.png" alt="">
  65. </div>
  66. </body>
  67. </html>
  68. <script type="text/template" id="templateQrcode">
  69. {{~it:value}}
  70. <li onclick="openDetails('{{=value.name}}','{{=value.mobile}}','{{=value.avatar}}','{{=value.position}}','{{=value.staff_num}}')">
  71. <div class="personnel-info">
  72. {{?value.avatar != null}}
  73. <img src="{{=value.avatar}}" alt="">
  74. {{??}}
  75. <p style="background:#{{=Math.floor(Math.random()*16777215).toString(16)}}">{{=value.name.substr(value.name.length-1,1)}}</p>
  76. {{?}}
  77. <div class="name-dep">
  78. <p>{{=value.name}}</p>
  79. <span>{{=value.section_fullname}}</span>
  80. </div>
  81. </div>
  82. <div class="position">({{=value.position}})</div>
  83. </li>
  84. {{~}}
  85. </script>
  86. <script type="text/javascript" src="../../script/api.js"></script>
  87. <script src="../../script/doT.min.js" charset="utf-8"></script>
  88. <script src="../../script/config.js" charset="utf-8"></script>
  89. <script type="text/javascript">
  90. apiready = function () {
  91. };
  92. function seachQrcodeFun0(value) {
  93. $http.requestShowProgress(UrlRouter.searchPersonal,'post',{content:value})
  94. .then(res=>{
  95. if (res.code === 0 && res.data.length>0) {
  96. $apis.html(Qrcode_itme,'#templateQrcode',res.data);
  97. $api.addCls($api.dom('.noText'), 'hide')
  98. }else {
  99. $apis.html(Qrcode_itme,'#templateQrcode','')
  100. $api.removeCls($api.dom('.noText'), 'hide')
  101. }
  102. })
  103. .catch(err=>{
  104. api.toast({
  105. msg: '加载超时,请检查网络',
  106. duration: 2000,
  107. location: 'bottom'
  108. });
  109. })
  110. }
  111. function openDetails(name,phone,img,del,staff_num) {
  112. var param = {
  113. username: name,
  114. mobile:phone,
  115. avatar:img,
  116. delp:del,
  117. id:staff_num
  118. };
  119. $event.openPopup(api.winWidth,'auto','../mail/modul',param)
  120. }
  121. </script>