index.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <script setup lang="tsx">
  2. import { fetchGetDeviceList } from '@/service/api/device/terminal-manage';
  3. import { useTable } from '@/components/zt/Table/hooks/useTable';
  4. const outColumns: NaiveUI.TableColumn<Api.device.manage>[] = [
  5. {
  6. key: 'connectorId',
  7. title: '接口ID',
  8. align: 'center'
  9. },
  10. {
  11. key: 'connectorName',
  12. title: '接口名称',
  13. align: 'center'
  14. },
  15. {
  16. key: 'stationName',
  17. title: '所属充电站',
  18. align: 'center'
  19. },
  20. {
  21. key: 'power',
  22. title: '总功率(kW)',
  23. align: 'center'
  24. },
  25. {
  26. key: 'equipmentId',
  27. title: '设备编码',
  28. align: 'center'
  29. },
  30. {
  31. key: 'equipmentName',
  32. title: '设备名称',
  33. align: 'center'
  34. },
  35. {
  36. key: 'parkNo',
  37. title: '车位号',
  38. align: 'center'
  39. },
  40. {
  41. key: 'nationalStandard',
  42. title: '国家标准',
  43. align: 'center'
  44. },
  45. {
  46. key: 'connectorTips',
  47. title: '充电提示语',
  48. align: 'center'
  49. }
  50. ];
  51. const [registerTable] = useTable({
  52. searchFormConfig: {
  53. schemas: [
  54. {
  55. field: 'stationName',
  56. label: '所属站点',
  57. component: 'NInput'
  58. },
  59. {
  60. field: 'equipmentId',
  61. label: '设备编码',
  62. component: 'NInput'
  63. },
  64. {
  65. field: 'equipmentName',
  66. label: '设备名称',
  67. component: 'NInput'
  68. }
  69. ],
  70. inline: false,
  71. size: 'small',
  72. labelPlacement: 'left',
  73. isFull: false
  74. },
  75. tableConfig: {
  76. keyField: 'id',
  77. title: '充电终端管理',
  78. showAddButton: false
  79. }
  80. });
  81. </script>
  82. <template>
  83. <LayoutTable>
  84. <ZTable
  85. :show-table-action="false"
  86. :columns="outColumns"
  87. :immediate="true"
  88. :api="fetchGetDeviceList"
  89. @register="registerTable"
  90. ></ZTable>
  91. </LayoutTable>
  92. </template>
  93. <style scoped></style>