index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="device-manager-box">
  4. <NormalTable
  5. :columns="columns"
  6. :searchFormSchema="searchFormSchema"
  7. :formSchema="formSchema"
  8. :list="list"
  9. :deleteById="deleteById"
  10. :saveOrUpdate="saveOrUpdate"
  11. title="配置列表"
  12. :showTab="false"
  13. :deviceType="deviceType"
  14. >
  15. <template #filterCell="{ column, record }">
  16. <template v-if="column.key === 'moduleData.main'">
  17. <div v-for="(val, key) in record.moduleData.main" :key="key">
  18. <span>点位:{{ key }};</span>
  19. <span>名称:{{ val }};</span>
  20. </div>
  21. </template>
  22. <template v-if="column.key === 'moduleData.chart'">
  23. <div v-for="(val, key) in record.moduleData.chart" :key="key">
  24. <span>点位:{{ key }};</span>
  25. <span>名称:{{ val }};</span>
  26. </div>
  27. </template>
  28. <template v-if="column.key === 'showStyle.size'">
  29. {{ get(ModuleSizeMap, record.showStyle?.size) }}
  30. </template>
  31. <template v-if="column.key === 'showStyle.version'">
  32. {{ get(ModuleVersionMap, record.showStyle?.version) }}
  33. </template>
  34. <template v-if="column.key === 'showStyle.position'">
  35. {{ get(ModulePositionMap, record.showStyle?.position) }}
  36. </template>
  37. <template v-if="column.key === 'showStyle.charttype'">
  38. {{ get(ModuleChartTypeMap, record.showStyle?.charttype) }}
  39. </template>
  40. </template>
  41. </NormalTable>
  42. </div>
  43. </template>
  44. <script lang="ts" name="system-user" setup>
  45. // 相关文档请参阅 vent/home/configurable/README.md
  46. import { ref } from 'vue';
  47. import NormalTable from '../comment/NormalTable.vue';
  48. import { list, deleteById, saveOrUpdate } from './configuration.api';
  49. import { ModuleVersionMap, ModuleChartTypeMap, ModulePositionMap, ModuleSizeMap } from './options';
  50. import { searchFormSchema, columns, formSchema } from './configuration.data';
  51. import { get } from '../../home/billboard/utils';
  52. const deviceType = ref('');
  53. </script>
  54. <style scoped></style>