change_apply_information_notice.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author EllisRan
  6. * @date 2022/01/21
  7. * @version
  8. */
  9. $(document).ready(() => {
  10. $.subMenu({
  11. menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
  12. toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
  13. key: 'menu.1.0.0',
  14. miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1',
  15. callback: function (info) {
  16. if (info.mini) {
  17. $('.panel-title').addClass('fluid');
  18. $('#sub-menu').removeClass('panel-sidebar');
  19. } else {
  20. $('.panel-title').removeClass('fluid');
  21. $('#sub-menu').addClass('panel-sidebar');
  22. }
  23. autoFlashHeight();
  24. }
  25. });
  26. handleFileList(fileList);
  27. function handleFileList(files = []) {
  28. $('#file-content').empty();
  29. // const { uncheck, checkNo } = auditConst.status
  30. const newFiles = files.map(file => {
  31. let showDel = false;
  32. if (file.uid === cur_uid) {
  33. // if (!curAuditor) {
  34. // advance.status === uncheck && cur_uid === advance.uid && (showDel = true)
  35. // advance.status === checkNo && cur_uid === advance.uid && (showDel = true)
  36. // } else {
  37. // curAuditor.audit_id === cur_uid && (showDel = true)
  38. // }
  39. if (change.status === auditConst.status.checked) {
  40. showDel = Boolean(file.extra_upload )
  41. } else {
  42. showDel = true
  43. }
  44. }
  45. return {...file, showDel}
  46. })
  47. let html = '';
  48. newFiles.forEach((file, idx) => {
  49. if (file.showDel) {
  50. html += `<tr><td>${idx + 1}</td><td><a href="${file.filepath}" target="_blank">${file.filename}</a></td><td>${file.username}</td><td>${file.type ? _.find(fileTypeConst, {key: file.type }).value : ''}</td><td>${moment(file.upload_time).format('YYYY-MM-DD HH:mm:ss')}</td></tr>`
  51. } else {
  52. html += `<tr><td width="70">${idx + 1}</td><td><a href="${file.filepath}" target="_blank">${file.filename}</a></td><td>${file.username}</td><td>${file.type ? _.find(fileTypeConst, {key: file.type }).value : ''}</td><td>${moment(file.upload_time).format('YYYY-MM-DD HH:mm:ss')}</td></tr>`
  53. }
  54. })
  55. $('#file-content').append(html);
  56. }
  57. });