Detail.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <detail
  3. :on-manager="onManager"
  4. :data="data"
  5. resource="nas"
  6. :base-info="baseInfo"
  7. :extra-info="extraInfo"
  8. statusModule="nas" />
  9. </template>
  10. <script>
  11. import {
  12. getUserTagColumn,
  13. getExtTagColumn,
  14. } from '@/utils/common/detailColumn'
  15. import {
  16. getBrandTableColumn,
  17. getBillingTypeTableColumn,
  18. getSwitchTableColumn,
  19. } from '@/utils/common/tableColumn'
  20. import WindowsMixin from '@/mixins/windows'
  21. import ColumnsMixin, { getFileSystemTypeColumn, getFileSystemStorageTypeColumn, getCapacityColumn } from '../mixins/columns'
  22. export default {
  23. name: 'FileSystemDetail',
  24. mixins: [WindowsMixin, ColumnsMixin],
  25. props: {
  26. data: {
  27. type: Object,
  28. required: true,
  29. },
  30. onManager: {
  31. type: Function,
  32. required: true,
  33. },
  34. },
  35. data () {
  36. return {
  37. baseInfo: [
  38. getUserTagColumn({ onManager: this.onManager, resource: 'file_system', columns: () => this.columns, tipName: this.$t('dictionary.filesystem') }),
  39. getExtTagColumn({ onManager: this.onManager, resource: 'file_system', columns: () => this.columns, tipName: this.$t('dictionary.filesystem') }),
  40. getBrandTableColumn(),
  41. getBillingTypeTableColumn(),
  42. ],
  43. extraInfo: [
  44. {
  45. title: this.$t('storage.text_80'),
  46. items: [
  47. getCapacityColumn(),
  48. getFileSystemTypeColumn(),
  49. getFileSystemStorageTypeColumn(),
  50. {
  51. field: 'protocol',
  52. title: this.$t('storage.filesystem.protocol'),
  53. },
  54. ],
  55. },
  56. {
  57. title: this.$t('storage.other.infomation'),
  58. items: [
  59. getSwitchTableColumn({
  60. field: 'disable_delete',
  61. title: this.$t('common.text00076'),
  62. change: val => {
  63. this.onManager('update', {
  64. id: this.data.id,
  65. managerArgs: {
  66. data: { disable_delete: val },
  67. },
  68. })
  69. },
  70. }),
  71. ],
  72. },
  73. ],
  74. }
  75. },
  76. }
  77. </script>