Browse Source

指挥体系 删除

Hwf 1 day ago
parent
commit
522fd00f17
1 changed files with 21 additions and 1 deletions
  1. 21 1
      src/views/emergencyCommandMap/RightSection/InitConsultation.vue

+ 21 - 1
src/views/emergencyCommandMap/RightSection/InitConsultation.vue

@@ -30,7 +30,14 @@
               accordion
               default-expand-all
               @node-click="handleNodeClick"
-            />
+            >
+              <template #default="{ node, data }">
+                <div class="custom-tree-node">
+                  <span>{{ node.label }}</span>
+                  <el-icon v-if="data.user_category === 'temp'" @click="handleDelete(data)"><DeleteFilled /></el-icon>
+                </div>
+              </template>
+            </el-tree>
           </div>
         </div>
       </div>
@@ -198,6 +205,10 @@ const handleClose = () => {
   emits('update:modelValue', false);
 };
 
+const handleDelete = (data) => {
+  console.log(data);
+};
+
 // 融合通信参数
 const handlePhoneCall = () => {
   emits('update:modelValue', false);
@@ -375,4 +386,13 @@ onMounted(() => {
     display: flex;
   }
 }
+.custom-tree-node {
+  display: flex;
+  align-items: center;
+  .el-icon {
+    margin-left: 10px;
+    color: red;
+    cursor: pointer;
+  }
+}
 </style>