Ver código fonte

安全生产费,附件,预览

MaiXinRong 1 ano atrás
pai
commit
e37ac0c9b0
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      app/public/js/payment_safe.js

+ 2 - 2
app/public/js/payment_safe.js

@@ -638,7 +638,7 @@ $(document).ready(function() {
             const delHtml = file.uid === userID ? `<a href="javascript: void(0);" class="mr-1 text-danger" name="del-file" file_id="${file.id}"><i class="fa fa-trash-o fa-fw"></i></a>` : '';
             html.push('<tr>');
             html.push(`<td><input type="checkbox" name="check-att" file_id="${file.id}"></td>`);
-            html.push(`<td><div class="d-flex justify-content-between align-items-center table-file"><a href="javascript: void(0);" file_id="${file.id}">${file.filename}${file.fileext}</a><div class="btn-group-table" style="display: none;">${downHtml}${delHtml}</div></div></td>`);
+            html.push(`<td><div class="d-flex justify-content-between align-items-center table-file"><a href="javascript: void(0);" file_id="${file.id}" name="view-file">${file.filename}${file.fileext}</a><div class="btn-group-table" style="display: none;">${downHtml}${delHtml}</div></div></td>`);
             html.push(`<td>${file.u_name}</td>`);
             html.push('</tr>');
             return html.join('');
@@ -790,7 +790,7 @@ $(document).ready(function() {
     $('body').on('click', '[name=del-file]', function() {
        attObj.deleteAtt(parseInt(this.getAttribute('file_id')));
     });
-    $('body').on('click', 'a[file_id]', function() {
+    $('body').on('click', 'a[name=view-file]', function() {
         const file_id = parseInt(this.getAttribute('file_id'));
         const file = attObj.atts.find(x => { return x.id === file_id; });
         if (!file) return;