demo.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport"
  5. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <!-- 引入mui样式 -->
  7. <meta charset="utf-8">
  8. <title>UI演示</title>
  9. <link href="./css/mui.css" rel="stylesheet" />
  10. <!--连接自定义APP样式-->
  11. <link href="./css/app.css" rel="stylesheet" />
  12. <link rel="stylesheet" href="./css/app.new.css">
  13. <link rel="stylesheet" href="./fonts/font-jt.css">
  14. <!-- 引入案件样式 -->
  15. <link rel="stylesheet" type="text/css" href="./css/case.css" />
  16. <!-- 引入弹窗及选择器样式 -->
  17. <link rel="stylesheet" type="text/css" href="../css/mui.picker.css" />
  18. <link rel="stylesheet" type="text/css" href="../css/mui.poppicker.css" />
  19. <link rel="stylesheet" href="./css/csa.count.css">
  20. <!-- 引入地图页面独有样式 -->
  21. <link rel="stylesheet" type="text/css" href="./css/cr.map.css" />
  22. <style type="text/css">
  23. html,
  24. body {
  25. position: relative;
  26. /* background-color: antiquewhite !important; */
  27. height: 100%;
  28. width: 100%;
  29. font-weight: bold;
  30. background-color: antiquewhite !important;
  31. }
  32. </style>
  33. </head>
  34. <body>
  35. <button type="button" onclick="showPdf()">查询指定权限</button>
  36. </body>
  37. </html>
  38. <script src="./js/mui.min.js" type="text/javascript"></script>
  39. <script src="./js/case.js"></script>
  40. <script type="text/javascript">
  41. /* mui初始化 */
  42. mui.init();
  43. /* 必须加 否则将导致数据表无法滚动 */
  44. mui('.mui-scroll-wrapper').scroll({
  45. scrollY: true, //是否竖向滚动
  46. scrollX: true, //是否横向滚动
  47. startX: 0, //初始化时滚动至x
  48. startY: 0, //初始化时滚动至y
  49. indicators: false, //是否显示滚动条
  50. deceleration: 0.0006, //阻尼系数,系数越小滑动越灵敏
  51. bounce: false, //是否启用回弹
  52. });
  53. var permissions = [{
  54. "code": "1007",
  55. "name": "派发员"
  56. }, {
  57. "code": "1003",
  58. "name": "审核员"
  59. }];
  60. function showPdf() {
  61. console.log(permissionFind(permissions, userPermission.perSH));
  62. }
  63. function permissionFind(permissions, perCode) {
  64. var result = permissions.find(function(item) {
  65. return item.code === perCode;
  66. });
  67. return result !== undefined;
  68. }
  69. </script>