libushang před 3 měsíci
rodič
revize
c73f5ca9bb

+ 20 - 0
src/api/emergencyCommandMap/communication.ts

@@ -18,6 +18,7 @@ export function getStartMiniWithNoParam(data) {
   });
 }
 
+/*
 // 视频会商-部门树
 export function getAvconDeptTree(params) {
   return request({
@@ -35,3 +36,22 @@ export function getAvconDeptList(id, params) {
     params: params
   });
 }
+*/
+
+// 视频会商-设备树状分组
+export function getAvconDeviceTree(params) {
+  return request({
+    url: '/api/videoResource/avcon/get_device_tree',
+    method: 'get',
+    params: params
+  });
+}
+
+// 视频会商-设备列表
+export function getAvconDeviceList(id, params) {
+  return request({
+    url: '/api/videoResource/avcon/get_device_list/'+id,
+    method: 'get',
+    params: params
+  });
+}

+ 10 - 9
src/views/emergencyCommandMap/LeftSection/Communication.vue

@@ -23,7 +23,7 @@
           >
             <el-option v-for="level in options" :key="level.value" :label="level.name" :value="level.value"></el-option>
           </el-select>
-          <el-input v-model="queryParams2.name" class="custom-input" placeholder="人员姓名搜索" @keyup.enter="handleNodeClick(false)">
+          <el-input v-model="queryParams2.name" class="custom-input" placeholder="设备搜索" @keyup.enter="handleNodeClick(false)">
             <template #prefix>
               <el-icon class="el-input__icon"><search /></el-icon>
             </template>
@@ -41,8 +41,8 @@
                 <div class="td2">
                   <div :class="getCheckedClass()" @click="handleChecked"></div>
                 </div>
-                <div class="td">姓名</div>
-                <div class="td3">职务</div>
+                <div class="td">设备</div>
+                <!-- div class="td3">姓名职务</div -->
               </div>
               <div class="table-content">
                 <div v-for="(item, index) in userList" :key="index" class="tr2">
@@ -50,10 +50,10 @@
                     <div :class="item.checked ? 'common-checked-active' : 'common-checked'" @click="handleChecked2(item)"></div>
                   </div>
                   <div class="td">{{ item.name }}</div>
-                  <div class="td3">
+                  <!-- div class="td3">
                     {{ item.duty }}
                     <div class="phone-icon"></div>
-                  </div>
+                  </div-->
                 </div>
               </div>
             </div>
@@ -65,7 +65,7 @@
           <div class="left-item">
             <div>已选择:</div>
             <div class="text">{{ selectList.length }}</div>
-            <div></div>
+            <div></div>
           </div>
           <div class="clear-btn" @click="clearSelect">清空</div>
         </div>
@@ -111,7 +111,7 @@
 
 <script lang="ts" setup>
 import { Search } from '@element-plus/icons-vue';
-import { getAvconDeptList, getAvconDeptTree, getStartMiniParam, getStartMiniWithNoParam } from '@/api/emergencyCommandMap/communication';
+import { getAvconDeptList, getAvconDeptTree, getStartMiniParam, getStartMiniWithNoParam, getAvconDeviceTree, getAvconDeviceList } from '@/api/emergencyCommandMap/communication';
 import { deepClone } from '@/utils';
 import Drone from './Drone.vue';
 import IndividualEquipment from './IndividualEquipment.vue';
@@ -131,7 +131,7 @@ const queryParams2 = reactive({
   value2: ''
 });
 const getTree = () => {
-  getAvconDeptTree(queryParams).then((res) => {
+  getAvconDeviceTree(queryParams).then((res) => {
     treeData.value = res.data;
   });
 };
@@ -159,7 +159,8 @@ const handleNodeClick = (item) => {
     clickNodeId.value = item.id;
   }
   const id = item ? item.id : !!clickNodeId.value ? clickNodeId.value : treeData.value[0].id;
-  getAvconDeptList(id, queryParams2).then((res) => {
+  console.log('handleNodeClick', id);
+  getAvconDeviceList(id, queryParams2).then((res) => {
     res.data.forEach((item) => {
       const index = selectList.value.findIndex((item2) => item2.id === item.id);
       item.checked = index > -1;