overviewColumns.ts 714 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import type { BasicColumn } from '@/components/Table';
  2. import { brands } from './constant';
  3. import { h } from 'vue';
  4. export const columns: BasicColumn[] = [
  5. {
  6. label: '序号',
  7. minWidth: 60,
  8. type: 'index',
  9. },
  10. {
  11. label: '名称',
  12. prop: 'name',
  13. minWidth: 100,
  14. },
  15. {
  16. label: '设备品牌',
  17. prop: 'nvrType',
  18. minWidth: 140,
  19. render(record) {
  20. return h('span', {}, brands.find((item) => item.value === record.row.nvrType)?.label);
  21. },
  22. },
  23. {
  24. label: '设备编号',
  25. prop: 'code',
  26. minWidth: 100,
  27. },
  28. {
  29. label: 'IP地址',
  30. prop: 'nvrIp',
  31. minWidth: 140,
  32. },
  33. {
  34. label: '负责人',
  35. prop: 'principalName',
  36. minWidth: 140,
  37. },
  38. ];