km-business-area-manage.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <a-card>
  3. <sd-oa-table
  4. ref="autobhTable"
  5. form-id="kmDomain"
  6. page-id="km/admin/kmDomain"
  7. :columns="columns"
  8. show-selection
  9. :actions="actions"
  10. :search-fields="['name']"
  11. >
  12. <template v-slot:form>
  13. <sd-form-item name="name" />
  14. </template>
  15. </sd-oa-table>
  16. </a-card>
  17. </template>
  18. <script>
  19. import TableColumnTypes from '@/common/services/table-column-types'
  20. import TableActionTypes from '@/common/services/table-action-types'
  21. import components from './_import-components/km-business-area-manage-import'
  22. const columns = [
  23. {
  24. title: '序号',
  25. align: 'center',
  26. width: '100px',
  27. customRender: (text, record, index) => `${index + 1}`,
  28. },
  29. {
  30. title: '业务领域',
  31. dataIndex: 'name',
  32. sdClickable: true,
  33. },
  34. {
  35. title: '创建时间',
  36. dataIndex: 'creationTime',
  37. sdRender: TableColumnTypes.dateTime,
  38. defaultSortOrder: 'desc',
  39. sorter: true,
  40. },
  41. ]
  42. export default {
  43. name: 'KmBusinessAreaManage',
  44. metaInfo: {
  45. title: '业务领域维护',
  46. },
  47. components,
  48. data() {
  49. return {
  50. columns,
  51. actions: [
  52. {
  53. label: '新建',
  54. id: 'new',
  55. type: TableActionTypes.oa.create, // 新建按钮,不需要回调,自动处理
  56. },
  57. {
  58. label: '删除',
  59. id: 'delete',
  60. type: TableActionTypes.oa.delete,
  61. },
  62. ],
  63. }
  64. },
  65. methods: {},
  66. }
  67. </script>
  68. <style module lang="scss">
  69. @use '@/common/design' as *;
  70. </style>