IndividualEquipment.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <div class="content">
  3. <div class="left-content">
  4. <div class="search-box">
  5. <el-input v-model="queryParams.equipment" class="custom-input" placeholder="搜索设备" @keyup.enter="getTree">
  6. <template #prefix>
  7. <el-icon class="el-input__icon"><search /></el-icon>
  8. </template>
  9. </el-input>
  10. </div>
  11. <div class="tree-container">
  12. <div class="tree-box">
  13. <div style="overflow-y: auto; height: 100%">
  14. <el-tree :data="treeData" accordion @node-click="handleNodeClick" />
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="right-content video-list">
  20. <HKVideo :dot_data="data" autoplay />
  21. </div>
  22. </div>
  23. </template>
  24. <script setup lang="ts">
  25. import { Search } from '@element-plus/icons-vue';
  26. import { getAvconDeptTree } from '@/api/emergencyCommandMap/communication';
  27. import { getDroneTree } from '@/api/emergencyCommandMap/Drone';
  28. interface QueryParams {
  29. equipment: string;
  30. }
  31. const queryParams = reactive<QueryParams>({
  32. equipment: ''
  33. });
  34. // const queryParams2 = reactify({});
  35. const options = ref([]);
  36. // const treeData = ref([]);
  37. let data = ref({
  38. 'name': '东镇街道长塘居委会大湴村边2',
  39. 'invideoIds': true,
  40. 'area': '茂名市视频数据共享管理平台/茂名市应急管理局/信宜市应急管理局/信宜防溺水监控/东镇街道防溺水(移动)/长塘村',
  41. 'ip': '级联',
  42. 'status': '在线',
  43. 'status_lifetime': '68天23.79小时',
  44. 'record_status': '--',
  45. 'inspection_datetime': '2024-07-15 16:24:09',
  46. 'video_code_int': '44098301581314000465',
  47. 'video_code': '44098301581314000465',
  48. 'longitude': 110.908867,
  49. 'latitude': 22.357185
  50. });
  51. const treeData = ref([
  52. {
  53. label: '移动单兵设备',
  54. children: [
  55. {
  56. label: '茂名市应急管理局',
  57. children: [
  58. {
  59. label: '应急无人机'
  60. },
  61. { label: '智能手持终端01' },
  62. { label: '智能手持终端02' }
  63. ]
  64. }
  65. ]
  66. }
  67. ]);
  68. const getTree = () => {
  69. getDroneTree(queryParams).then((res) => {
  70. treeData.value = res.data;
  71. });
  72. };
  73. const handleNodeClick = (data) => {};
  74. </script>
  75. <style scoped lang="scss">
  76. .content {
  77. display: flex;
  78. height: 430px;
  79. .left-content {
  80. height: 100%;
  81. flex: 1;
  82. margin-right: 20px;
  83. .search-box {
  84. display: flex;
  85. .custom-input {
  86. width: 100%;
  87. }
  88. }
  89. :deep(.el-tree) {
  90. background-color: transparent;
  91. color: #fbffff;
  92. font-size: 38px;
  93. .el-tree-node__content {
  94. height: auto;
  95. padding-top: 10px;
  96. padding-bottom: 10px;
  97. white-space: normal;
  98. word-break: break-all;
  99. }
  100. .el-tree-node__expand-icon {
  101. color: #297cfc;
  102. font-size: 23px;
  103. }
  104. .el-tree-node:focus > .el-tree-node__content,
  105. .el-tree-node__content:hover {
  106. background-color: transparent !important;
  107. }
  108. }
  109. }
  110. .right-content {
  111. height: 100%;
  112. flex-grow: 1;
  113. flex: 1;
  114. }
  115. }
  116. </style>