ui-upDropFile.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <div class="row padding-sm no-padding-vr bordered no-border-hr ">
  2. <!--ng-if="options.dropfile"-->
  3. <div class="col-md-12">
  4. <!--ng-if="form.dropState"-->
  5. <div class="panel panel-white">
  6. <div class="panel-heading col-xs-12 panelknowback" ng-if="!to.isOnlydown">
  7. <div class="col-md-6">
  8. <span>附件上传</span><span>附件数: {{ uploader.queue.length }}</span>
  9. </div>
  10. <span class="btn btn-light-orange btn-file col-md-2 pull-right" ng-show="showFileUp"><i class="fa fa-plus"></i><span translate="form.button.SELECTFILE"></span><input name="uploadedFile" type="file" nv-file-select="" uploader="uploader" />
  11. </span>
  12. </div>
  13. <div class="panel-body">
  14. <!--h3>附件列表</h3>-->
  15. <table class="table table-hover" id="sample-table-1" ng-if="!to.isOnlydown">
  16. <thead>
  17. <tr>
  18. <th class="center">名称</th>
  19. <th class="hidden-xs" ng-show="uploader.isHTML5">大小</th>
  20. <th class="hidden-xs" ng-show="uploader.isHTML5">进度</th>
  21. <th class="hidden-xs">状态</th>
  22. <th class="hidden-xs">操作</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. <tr ng-repeat="item in uploader.queue">
  27. <td><strong>{{ item.file.name }}</strong></td>
  28. <td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>
  29. <td ng-show="uploader.isHTML5">
  30. <div class="progress" style="margin-bottom: 0;">
  31. <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
  32. </div>
  33. </td>
  34. <td class="center">
  35. <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
  36. <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
  37. <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
  38. </td>
  39. <td nowrap>
  40. <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">
  41. <span class="glyphicon glyphicon-ban-circle"></span> 取消
  42. </button>
  43. <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
  44. <span class="glyphicon glyphicon-trash"></span>
  45. </button>
  46. </td>
  47. </tr>
  48. </tbody>
  49. </table>
  50. <table class="table table-hover" id="sample-table-1" ng-if="!to.isOnlyuploader">
  51. <thead>
  52. <tr>
  53. <th class="center">序号</th>
  54. <th>附件名称</th>
  55. <!-- <th class="hidden-xs">上传者</th> -->
  56. <th>上传时间</th>
  57. <!-- <th>任务Id</th> -->
  58. <!-- <th class="hidden-xs">文件类型</th> -->
  59. <th class="center">附件下载</th>
  60. <!-- <th class="center">附件预览</th> -->
  61. </tr>
  62. </thead>
  63. <tbody>
  64. <tr ng-repeat="attachment in attachments">
  65. <td class="center">{{$index + 1}}</td>
  66. <td class="hidden-xs">{{attachment.name}}</td>
  67. <!-- <td class="hidden-xs">{{attachment}}</td> -->
  68. <!-- <td>{{attachment.userName}}</td> -->
  69. <td>{{attachment.addTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
  70. <!-- <td>{{attachment.taskId}}</td> -->
  71. <!-- <td>{{attachment.type}}</td> -->
  72. <td class="center">
  73. <!-- <div class="visible-md visible-lg hidden-sm hidden-xs">
  74. <a ng-href="{{attachment.link}}" ng-init="attachment.link=downloadUrl(attachment.id)" class="btn btn-transparent btn-xs" tooltip-placement="top" tooltip="下载"><i class="fa fa-download"></i></a>
  75. </div> -->
  76. <div class="visible-md visible-lg hidden-sm hidden-xs">
  77. <a ng-click="download(attachment.token,attachment.name)" class="btn btn-transparent btn-xs" tooltip-placement="top" tooltip="下载"><i class="fa fa-download"></i></a>
  78. </div>
  79. </td>
  80. <!-- <td class="center">
  81. <div class="visible-md visible-lg hidden-sm hidden-xs">
  82. <a ng-click="view(attachment.id,attachment.previewUrl)" class="btn btn-transparent btn-xs" tooltip-placement="top" tooltip="预览"><i class="fa fa-file-text-o"></i></a>
  83. </div>
  84. </td> -->
  85. </tr>
  86. </tbody>
  87. </table>
  88. <div ng-if="to.isUpfload&&!to.isOnlydown">
  89. <!-- <p>进度:</p> -->
  90. <!-- <div class="progress" style="margin-bottom: 0;">
  91. <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
  92. </div> -->
  93. <button ng-show="showFileUp" type="button" class="btn btn-success btn-s" ng-click="dropfile(to.ApiService,to.processInstanceId, to.taskId, to.userId)" ng-disabled="!uploader.getNotUploadedItems().length">
  94. <span class="glyphicon glyphicon-upload"></span> 上传
  95. </button>
  96. <!-- <button type="button" class="btn btn-warning btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">
  97. <span class="glyphicon glyphicon-ban-circle"></span> 取消
  98. </button>
  99. <button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">
  100. <span class="glyphicon glyphicon-trash"></span> 删除
  101. </button> -->
  102. </div>
  103. </div>
  104. <!--panel body-->
  105. </div>
  106. </div>
  107. <!-- <div class="col-md-12">
  108. <table class="table table-hover" id="sample-table-1">
  109. <thead>
  110. <tr>
  111. <th class="center">序号</th>
  112. <th>附件名称</th>
  113. <th>上传时间</th>
  114. <th class="center">附件下载</th>
  115. <th class="center">附件预览</th>
  116. </tr>
  117. </thead>
  118. <tbody>
  119. <tr ng-repeat="attachment in attachments">
  120. <td class="center">{{$index + 1}}</td>
  121. <td class="hidden-xs">{{attachment.name}}</td>
  122. <td>{{attachment.addTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
  123. <td class="center">
  124. <div class="visible-md visible-lg hidden-sm hidden-xs">
  125. <a ng-click="download(attachment.token,attachment.name)" class="btn btn-transparent btn-xs" tooltip-placement="top" tooltip="下载"><i class="fa fa-download"></i></a>
  126. </div>
  127. </td>
  128. <td class="center">
  129. <div class="visible-md visible-lg hidden-sm hidden-xs">
  130. <a ng-click="view(attachment.id,attachment.previewUrl)" class="btn btn-transparent btn-xs" tooltip-placement="top" tooltip="预览"><i class="fa fa-file-text-o"></i></a>
  131. </div>
  132. </td>
  133. </tr>
  134. </tbody>
  135. </table>
  136. </div> -->
  137. </div>
  138. <style>
  139. .btn-danger{
  140. background: #fff;
  141. color: #d43f3a;
  142. padding: 0 5px !important;
  143. }
  144. </style>