index.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <div class="workPlaceWarn">
  3. <div class="work-left-box">
  4. <basicTree :treeData="treeData"></basicTree>
  5. </div>
  6. <div class="work-right-box">
  7. <div class="right-box-card">
  8. <basicCard :cardContentList="cardContentList"></basicCard>
  9. </div>
  10. </div>
  11. </div>
  12. </template>
  13. <script lang="ts" setup>
  14. import { ref, reactive } from 'vue'
  15. import { getAssetURL } from '/@/utils/ui';
  16. import basicTree from './components/basicTree.vue'
  17. import basicCard from './components/basicCard.vue'
  18. //数据随便写的,不符合实际情况,因为懒得改
  19. const treeData = reactive([
  20. { name: "81203综放工作面", value: "111", id: '1', pid: null },
  21. { name: "束管监测系统", value: "222", id: '1-2', pid: '1' },
  22. { name: "81203综放工作面", value: "458", id: '2', pid: null },
  23. { name: "束管监测系统", value: "445", id: '2-1', pid: '2' },
  24. { name: "束管监测系统", value: "456", id: '2-2', pid: '2' },
  25. { name: "束管监测系统", value: "647", id: '2-3', pid: '2' },
  26. { name: "81203综放工作面", value: "189", id: '3', pid: null },
  27. { name: "束管监测系统", value: "664", id: '3-1', pid: '3' },
  28. { name: "束管监测系统", value: "652", id: '3-2', pid: '3' },
  29. { name: "束管监测系统", value: "732", id: '3-3', pid: '3' },
  30. { name: "束管监测系统", value: "852", id: '3-3-1', pid: '3-3' },
  31. ])
  32. let cardContentList = reactive([
  33. { id: 0, imgSrc: getAssetURL('workPlaceWarn/temp.png'), label: '最高温度()', val: '18.1' },
  34. { id: 1, imgSrc: getAssetURL('workPlaceWarn/smoke.png'), label: '烟雾', val: '无' },
  35. { id: 2, imgSrc: getAssetURL('workPlaceWarn/dsnd.png'), label: '最高CO浓度()', val: '16.3' },
  36. { id: 3, imgSrc: getAssetURL('workPlaceWarn/dspl.png'), label: '自动喷淋灭火装置', val: '打开' },
  37. ])
  38. </script>
  39. <style lang="less" scoped>
  40. .workPlaceWarn {
  41. position: relative;
  42. width: 100%;
  43. height: calc(100% - 50px);
  44. display: flex;
  45. justify-content: space-between;
  46. .work-left-box {
  47. width: 220px;
  48. height: 100%;
  49. background-color: rgba(27, 35, 39,.8);
  50. }
  51. .work-right-box {
  52. width: calc(100% - 230px);
  53. height: 100%;
  54. margin-left: 10px;
  55. padding: 15px 10px;
  56. box-sizing: border-box;
  57. background-color: rgba(27, 35, 39,.8);
  58. .right-box-card{
  59. height: 110px;
  60. width: 100%;
  61. }
  62. }
  63. }
  64. </style>