fileList.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" data-ng-app="app">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title>素材管理</title>
  7. <link href="../../AFrontEnd/css/animate.css" rel="stylesheet"/>
  8. <link href="../../AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet"/>
  9. <link href="../../AFrontEnd/css/bootstrap.css" rel="stylesheet"/>
  10. <link href="../../AFrontEnd/css/style.css" rel="stylesheet"/>
  11. <script>document.write("<link href='../../AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  12. <script>document.write("<link href='css/flieList.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  13. <!--引入文件上传的组件css-->
  14. <link rel="stylesheet" href="../../AFrontEnd/plugins/jquery-upload-file/css.fileupload/jquery.fileupload.css">
  15. <link rel="stylesheet" href="../../AFrontEnd/plugins/jquery-upload-file/css.fileupload/jquery.fileupload-ui.css">
  16. <link rel="stylesheet" href="../../AFrontEnd/plugins/jquery-upload-file/css.fileupload/blueimp-gallery.min.css">
  17. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/modernizr-2.6.2.js"></script>
  18. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/respond.js"></script>
  19. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/spark-md5.min.js"></script>
  20. <style>
  21. .sp-grid-job tbody td select:hover {
  22. border:0
  23. }
  24. input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
  25. -webkit-appearance: button;
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <div ng-controller="fileListCtrl as ctl" id="app" ng-cloak>
  31. <div class="wrapper wrapper-content animated fadeInRight">
  32. <div class="row">
  33. <div class="col-md-12">
  34. <div class="ibox float-e-margins">
  35. <div class="ibox-content">
  36. <div class="row">
  37. <div class="col-md-12">
  38. <div class="sp-page">
  39. <div class="sp-page-col">
  40. <span class="sp-page-title">共享文件</span>
  41. </div>
  42. <div class="sp-page-col sp-pull-right">
  43. <a class="sp-btn-gray sp-btn-radius sp-pull-left" ng-click="ctl.openAddFile()"><i class="fa fa-plus"></i> 新 建</a>
  44. <a class="sp-btn-gray sp-btn-radius sp-pull-left" ng-click="ctl.openUploadLayer()"><i class="fa fa-upload"></i> 上传文件</a>
  45. <a class="sp-btn-gray sp-btn-radius sp-pull-left" ng-click="ctl.openSearchLayer()"><i class="fa fa-search sp-mr-5"></i>查 询</a>
  46. <a class="sp-btn-gray sp-btn-radius sp-pull-left" ng-click="ctl.btnRefresh()"><i class="fa fa-refresh sp-mr-5"></i>刷 新</a>
  47. </div>
  48. </div>
  49. <div class="sp-line-gray"></div>
  50. <table class="sp-table">
  51. <thead>
  52. <tr>
  53. <th style="width: 80px;">序号</th>
  54. <th>文件名称</th>
  55. <th style="width: 150px;">文件分类</th>
  56. <th style="width: 150px;">文件大小</th>
  57. <th style="width: 150px;">上传人</th>
  58. <th style="width: 150px;">上传时间</th>
  59. <th style="width: 230px;">操作</th>
  60. </tr>
  61. </thead>
  62. <tbody>
  63. <tr dir-paginate="item in ctl.rows|itemsPerPage:ctl.itemsPerPage" total-items="ctl.total_count">
  64. <td ng-bind="(ctl.pageno-1)*ctl.itemsPerPage+($index+1)"></td>
  65. <td>
  66. <a ng-click="ctl.goUrl(item)" ng-if="item.SUNMANUSERID==ctl.userId" ng-bind="item.FILESNAME" class="sp-color-blue"></a>
  67. <a ng-if="item.SUNMANUSERID!=ctl.userId" ng-bind="item.FILESNAME" class="sp-color-blue"></a>
  68. <span ng-if="item.MBMARK!=null" ng-bind="item.MBMARK.slice(0,1)" style="width: 22px; height: 22px; border: 1px solid #FF0000; border-radius: 15px; color: #FF0000; cursor: pointer; display: inline-block; font-size: 12px; line-height: 18px;"></span>
  69. </td>
  70. <td ng-bind="item.TYPENAME"></td>
  71. <td ng-bind="item.FILESIZE"></td>
  72. <td ng-bind="item.SUBMAN"></td>
  73. <td ng-bind="item.UPTIMES"></td>
  74. <td>
  75. <button class="sp-btn-blue sp-btn-sm sp-btn-radius" ng-disabled="item.FILEURL.length==7" ng-click="ctl.downLoad(item.FILEURL)">下&nbsp;载</button>
  76. <button class="sp-btn-red sp-btn-sm sp-btn-radius" ng-if="item.SUNMANUSERID==ctl.userId" ng-click="ctl.btnDelete(item)">删&nbsp;除</button>
  77. </td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. <div class="sp-table-tip ng-hide" ng-show="ctl.noDataTip == 0">
  82. <i class="fa fa-exclamation-circle sp-mr-10"></i>您好,暂未查询到相关信息!
  83. </div>
  84. <div class="sp-page" ng-show="ctl.noDataTip != 0">
  85. <div class="sp-page-col sp-pull-right">
  86. <div class="sp-lh-34">
  87. 每页 <select ng-model="ctl.itemsPerPage" ng-options="x for x in ctl.pageOptions"
  88. ng-init="ctl.itemsPerPage=ctl.pageOptions[0]"></select> 条
  89. </div>
  90. </div>
  91. <div class="sp-page-col sp-pull-right">
  92. <dir-pagination-controls max-size="8" direction-links="true" boundary-links="true"
  93. on-page-change="ctl.getData(newPageNumber)">
  94. </dir-pagination-controls>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="sp-layer" id="layer_uploadFile" style="width: 600px;">
  105. <div class="sp-layer-head" style="background:#2176d6">
  106. <div class="sp-page sp-text-center sp-font16">
  107. 上传文件
  108. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  109. ×
  110. </div>
  111. </div>
  112. </div>
  113. <div class="sp-layer-body" ng-click="ctl.removeWarning()" style="position: relative">
  114. <form id="fileupload" method="POST" enctype="multipart/form-data"
  115. data-url="">
  116. <div class="fileupload-buttonbar">
  117. <div>
  118. <span class="btn btn-success fileinput-button">
  119. <span>添加文件</span>
  120. <input type="file" name="files[]" id="uploadBtn" multiple>
  121. </span>
  122. <button type="submit" class="btn btn-primary start">
  123. <span>全部上传</span>
  124. </button>
  125. <button type="reset" class="btn btn-warning cancel">
  126. <span>全部取消</span>
  127. </button>
  128. <button type="button" class="btn btn-danger delete">
  129. <span>全部删除</span>
  130. </button>
  131. <input type="checkbox" class="toggle">
  132. <div class="rightType">
  133. 素材分类:
  134. <select ng-model="ctl.uploadTypeCode" ng-change="ctl.changeResourceType()">
  135. <option ng-repeat="item in ctl.uploadTypeList track by $index" value="{{item.CODE}}" ng-bind="item.CNAME"></option>
  136. </select>
  137. </div>
  138. </div>
  139. </div>
  140. <table role="presentation" class="table table-striped fileList">
  141. <thead>
  142. <tr>
  143. <th style="width:240px;">文件名称</th>
  144. <th style="width:90px;">文件大小</th>
  145. <th style="width:120px">上传状态</th>
  146. <th style="width:130px">操作</th>
  147. </tr>
  148. </thead>
  149. <tbody class="files"></tbody>
  150. </table>
  151. <div class="noFileWarning">暂无文件</div>
  152. <div class="warninfo"></div>
  153. </form>
  154. </div>
  155. <div class="sp-layer-bottom">
  156. <a class="sp-btn-blue sp-radius" ng-click="ctl.saveUploadFile()"><i class="fa fa-save sp-mr-5"></i>保 存</a>
  157. <a class="sp-btn-blue sp-radius" onclick="sp.closeCenter('.sp-layer')"><i class="fa fa-reply-all sp-mr-5"></i>取 消</a>
  158. </div>
  159. </div>
  160. <div class="sp-layer" id="layer_search" style="width: 500px;">
  161. <div class="sp-layer-head" style="background:#2176d6">
  162. <div class="sp-page sp-text-center sp-font16">
  163. 查&nbsp;&nbsp;询
  164. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  165. ×
  166. </div>
  167. </div>
  168. </div>
  169. <div class="sp-layer-body">
  170. <table class="sp-grid-job">
  171. <tbody>
  172. <tr>
  173. <td class="sp-text-center">
  174. 文件分类
  175. </td>
  176. <td>
  177. <select class="sp-select" ng-model="ctl.search.TYPECODE">
  178. <option value="">全部分类</option>
  179. <option ng-repeat="item in ctl.uploadTypeList track by $index" value="{{item.CODE}}" ng-bind="item.CNAME"></option>
  180. </select>
  181. </td>
  182. </tr>
  183. <tr>
  184. <td class="sp-text-center">
  185. 文件名称
  186. </td>
  187. <td>
  188. <input type="text" class="sp-input" placeholder="文件名称" ng-model="ctl.search.FILESNAME" />
  189. </td>
  190. </tr>
  191. </tbody>
  192. </table>
  193. <div class="sp-line-txt sp-text-center sp-pt-10">
  194. <a class="sp-btn-blue sp-radius" ng-click="ctl.doSearch()"><i class="fa fa-search sp-mr-5"></i>查 询</a>
  195. <a class="sp-btn-blue sp-radius" onclick="sp.closeCenter('.sp-layer')">
  196. <i class="fa fa-close sp-mr-5"></i>重 置
  197. </a>
  198. </div>
  199. </div>
  200. </div>
  201. <div class="sp-layer" id="layer_addwps" style="width: 400px;">
  202. <div class="sp-layer-head" style="background:#2176d6">
  203. <div class="sp-page sp-text-center sp-font16">
  204. 新&nbsp;&nbsp;建
  205. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  206. ×
  207. </div>
  208. </div>
  209. </div>
  210. <div class="sp-layer-body">
  211. <table class="sp-grid-job">
  212. <tbody>
  213. <tr>
  214. <td class="sp-text-center">
  215. 名称
  216. </td>
  217. <td>
  218. <input type="text" class="sp-input" placeholder="名称" ng-model="ctl.add.FILESNAME" />
  219. </td>
  220. </tr>
  221. <tr>
  222. <td class="sp-text-center">
  223. 素材分类
  224. </td>
  225. <td>
  226. <select ng-model="ctl.add.TYPECODE" ng-change="ctl.addWpsType()">
  227. <option ng-repeat="item in ctl.uploadTypeList track by $index" value="{{item.CODE}}" ng-bind="item.CNAME"></option>
  228. </select>
  229. </td>
  230. </tr>
  231. </tbody>
  232. </table>
  233. <div class="sp-line-txt sp-text-center sp-pt-10">
  234. <a class="sp-btn-blue sp-radius" ng-click="ctl.btnAddWps()"><i class="fa fa-search sp-mr-5"></i>确 定</a>
  235. <a class="sp-btn-blue sp-radius" onclick="sp.closeCenter('.sp-layer')"><i class="fa fa-close sp-mr-5"></i>取 消</a>
  236. </div>
  237. </div>
  238. </div>
  239. </div> <!--引入文件上传控件的js-->
  240. <script id="template-upload" type="text/x-tmpl">
  241. {% for (var i=0, file; file=o.files[i]; i++) { %}
  242. <tr class="template-upload fade">
  243. <td style="width:240px;">
  244. <div class="name" title="{%=file.name%}">{%=file.name%}</div>
  245. </td>
  246. <td style="width:90px;">
  247. <p class="size">Processing...</p>
  248. </td>
  249. <td style="width:120px;">
  250. <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
  251. </td>
  252. <td>
  253. {% if (!i && !o.options.autoUpload) { %}
  254. <button class="btn btn-primary start" disabled>
  255. <span>上传</span>
  256. </button>
  257. {% } %}
  258. {% if (!i) { %}
  259. <button class="btn btn-warning cancel">
  260. <span>取消</span>
  261. </button>
  262. {% } %}
  263. </td>
  264. </tr>
  265. {% } %}
  266. </script>
  267. <script id="template-download" type="text/x-tmpl">
  268. {% for (var i=0, file; file=o.files[i]; i++) { %}
  269. <tr class="template-download fade">
  270. <td>
  271. <div class="name">
  272. <input type="checkbox" name="delete" value="1" class="toggle">
  273. <span title="{%=file.name%}">{%=file.name%}</span>
  274. </div>
  275. {% if (file.error) { %}
  276. <div><span class="label label-danger">Error</span> {%=file.error%}</div>
  277. {% } %}
  278. </td>
  279. <td>
  280. <span class="size">{%=o.formatFileSize(file.size)%}</span>
  281. </td>
  282. <td>
  283. <span class="done">已完成</span>
  284. </td>
  285. <td>
  286. {% if (file.deleteUrl) { %}
  287. <button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="http://47.92.116.158/GongAnSJ_FileServer{%=file.deleteUrl%}" {% if (file.deletewithcredentials) { %} data-xhr-fields='{"withCredentials":true}' {% } %}>
  288. <span>删除</span>
  289. </button>
  290. {% } else { %}
  291. <button class="btn btn-warning cancel">
  292. <span>取消</span>
  293. </button>
  294. {% } %}
  295. </td>
  296. </tr>
  297. {% } %}
  298. </script>
  299. <script src="../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
  300. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/vendor/jquery.ui.widget.js"></script>
  301. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/tmpl.min.js"></script>
  302. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/load-image.all.min.js"></script>
  303. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/canvas-to-blob.min.js"></script>
  304. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.blueimp-gallery.min.js"></script>
  305. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.iframe-transport.js"></script>
  306. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.fileupload.js"></script>
  307. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.fileupload-process.js"></script>
  308. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.fileupload-image.js"></script>
  309. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.fileupload-audio.js"></script>
  310. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.fileupload-video.js"></script>
  311. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.fileupload-validate.js"></script>
  312. <script src="../../AFrontEnd/plugins/jquery-upload-file/js.fileupload/jquery.fileupload-ui.js"></script>
  313. <!--自用js-->
  314. <script src="../../AFrontEnd/js/angularjs/angular.js"></script>
  315. <script src="../../AFrontEnd/js/angularjs/dirPagination.js"></script>
  316. <script src="../../apiurljs.js"></script>
  317. <script src="../../js/sm4.js"></script>
  318. <script>document.write('<scri' + 'pt src="../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');</script>
  319. <script>document.write('<scri' + 'pt src="js/fileList.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');</script>
  320. </body>
  321. </html>