km-kmap-template-manage.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <a-card>
  3. <sd-oa-table
  4. ref="autobhTable"
  5. form-id="kmKmapTemplate"
  6. page-id="kmap/kmKmapTemplate/kmKmapTemplate"
  7. :columns="columns"
  8. show-selection
  9. :modal-props="{ width: 1000 }"
  10. :actions="actions"
  11. :search-fields="['name']"
  12. >
  13. <template v-slot:form="{ model }">
  14. <sd-form-item name="name" />
  15. <sd-form-item name="state" />
  16. <km-js-mind ref="jsmind" v-model="model.mapTemplate" :read-only="false" />
  17. </template>
  18. </sd-oa-table>
  19. </a-card>
  20. </template>
  21. <script>
  22. import TableColumnTypes from '@/common/services/table-column-types'
  23. import TableActionTypes from '@/common/services/table-action-types'
  24. import components from './_import-components/km-kmap-template-manage-import'
  25. const columns = [
  26. {
  27. title: '标签名称',
  28. dataIndex: 'name',
  29. sdClickable: true,
  30. },
  31. {
  32. title: '是否启用',
  33. dataIndex: 'state',
  34. sdRender: TableColumnTypes.oa.switch,
  35. },
  36. {
  37. title: '创建时间',
  38. dataIndex: 'creationTime',
  39. defaultSortOrder: 'desc',
  40. sdRender: TableColumnTypes.dateTime,
  41. sorter: true,
  42. },
  43. ]
  44. export default {
  45. name: 'KmKmapTemplateManage',
  46. metaInfo: {
  47. title: '知识地图模板维护',
  48. },
  49. components,
  50. data() {
  51. return {
  52. columns,
  53. actions: [
  54. {
  55. label: '新建',
  56. id: 'new',
  57. type: TableActionTypes.oa.create,
  58. },
  59. {
  60. label: '删除',
  61. id: 'delete',
  62. type: TableActionTypes.oa.delete,
  63. },
  64. ],
  65. }
  66. },
  67. methods: {},
  68. }
  69. </script>
  70. <style module lang="scss">
  71. @use '@/common/design' as *;
  72. </style>