audit-dossier-list.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div>
  3. <sd-oa-table
  4. ref="dossierDataTable"
  5. form-id="iamDossierData"
  6. page-id="audit/archives/iamDossierData"
  7. :columns="columns"
  8. :actions="actions"
  9. show-selection
  10. :search-fields="[]"
  11. >
  12. <div slot="islink" slot-scope="text, record">
  13. <a :title="text" @click="rowClick(record)">{{ text }}</a>
  14. </div>
  15. </sd-oa-table>
  16. </div>
  17. </template>
  18. <script>
  19. import crossWindowWatcher from '@/common/services/cross-window-watcher'
  20. import TableColumnTypes from '@/common/services/table-column-types'
  21. import TableActionTypes from '@/common/services/table-action-types'
  22. import components from './_import-components/audit-dossier-list-import'
  23. export default {
  24. name: 'AuditDossierList',
  25. metaInfo: {
  26. title: '案卷资料',
  27. },
  28. components,
  29. data() {
  30. return {
  31. columns: [
  32. {
  33. title: '序号',
  34. dataIndex: 'sortNumber',
  35. customRender: (text, record, index) => `${index + 1}`,
  36. },
  37. {
  38. title: '文件名称',
  39. dataIndex: 'docTitle',
  40. scopedSlots: { customRender: 'islink' },
  41. },
  42. {
  43. title: '编制人员',
  44. dataIndex: 'creatorName',
  45. },
  46. {
  47. title: '编制日期',
  48. dataIndex: 'creationTime',
  49. defaultSortOrder: 'descend', // 没有点击任何排序列时,默认的排序列
  50. sdRender: TableColumnTypes.dateTime,
  51. },
  52. ],
  53. actions: [
  54. {
  55. label: '新建',
  56. id: 'new',
  57. permission: 'create',
  58. type: TableActionTypes.primary,
  59. callback: () => {
  60. const url = '/audit-dossier-form' // 新页面要打开的路由地址
  61. crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  62. if (refreshFlag) {
  63. // 这里写或者调刷新的方法
  64. this.refresh()
  65. }
  66. })
  67. },
  68. },
  69. {
  70. label: '删除',
  71. id: 'delete',
  72. type: TableActionTypes.oa.delete, // 删除按钮,不需要回调,会自动处理
  73. },
  74. ],
  75. }
  76. },
  77. methods: {
  78. refresh() {
  79. return this.$refs.dossierDataTable.refresh(true)
  80. },
  81. rowClick(record) {
  82. debugger
  83. const url = '/audit-dossier-form?record=' + record.id // 新页面要打开的路由地址
  84. crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  85. if (refreshFlag) {
  86. this.refresh()
  87. }
  88. })
  89. },
  90. },
  91. }
  92. </script>
  93. <style module lang="scss">
  94. @use '@/common/design' as *;
  95. </style>