companyFormwork_Upload.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>上传模板</title>
  7. <style>
  8. h4{margin: 0 0 0px 10px;display: inline-block}
  9. .state{display: inline-block;margin-left: 10px;margin-bottom: 0;color: red}
  10. .item a {display: inline-block;margin-left: 10px;;color: #0f9ae0}
  11. </style>
  12. </head>
  13. <body layout:fragment="content">
  14. <article class="page-container">
  15. <form class="form form-horizontal" id="form-companyFormWork-upload">
  16. <div class="row cl" style="min-height: 150px;">
  17. <div class="formControls col-xs-12 col-sm-12">
  18. <div class="uploader-thum-container">
  19. <div id="fileList" class="uploader-list"></div>
  20. <div id="filePicker">选择文件</div>
  21. <input type="hidden" value="" th:id="img" th:name="img"/>
  22. <div id="fileListPre" style="clear: both"></div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="row cl" >
  27. <div class="col-xs-12 col-sm-12 ">
  28. <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>保存</button>
  29. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  30. </div>
  31. </div>
  32. </form>
  33. </article>
  34. <script type="text/javascript" th:src="@{/js/government/companyFormwork/companyFormwork_upload.js}"></script>
  35. <script th:inline="javascript">
  36. $(function () {
  37. var options = {
  38. uploadBtnId: '#filePicker',
  39. picturePreId: 'fileListPre',
  40. hiddenDocUrl: 'fileDown.file_id',
  41. hiddenPictureName: 'imgName',
  42. // accept : {
  43. // title : 'Images',
  44. // extensions : 'gif,jpg,jpeg,bmp,png',
  45. // mimeTypes : 'image/gif,image/jpg,image/jpeg,image/bmp,image/png'
  46. // },
  47. width: 81,
  48. height: 81,
  49. fileSizeLimit: 100 * 1024 * 1024,
  50. fileSingleSizeLimit: 100 * 1024 * 1024
  51. // fileNumLimit: 1
  52. };
  53. var webUploadDoc= new $WebUploadDoc(options);
  54. webUploadDoc.init();
  55. });
  56. /**
  57. * 取消
  58. */
  59. function removeIframe() {
  60. var index = parent.layer.getFrameIndex(window.name);
  61. parent.layer.close(index);
  62. }
  63. </script>
  64. </body>
  65. </html>