From b46e6d2306515f94bf77c06e8d80ac76267e3ddb Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 02 六月 2024 21:44:23 +0800
Subject: [PATCH] 搜索

---
 src/views/console/basic-data/material-warehousing-data/material-storage.vue |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/views/console/basic-data/material-warehousing-data/material-storage.vue b/src/views/console/basic-data/material-warehousing-data/material-storage.vue
index f7b8050..6758739 100644
--- a/src/views/console/basic-data/material-warehousing-data/material-storage.vue
+++ b/src/views/console/basic-data/material-warehousing-data/material-storage.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-05-07 22:46:30
  * @LastEditors: Sneed
- * @LastEditTime: 2024-05-10 22:28:37
+ * @LastEditTime: 2024-05-11 20:53:42
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/basic-data/material-warehousing-data/material-storage.vue
 -->
 <template>
@@ -15,10 +15,17 @@
                     <el-container>
                         <el-aside width="200px" v-loading="showGrouploading">
                             <el-tree default-expand-all ref="group" node-key="id" :data="treeData" :props="props"
-                                @node-click="nodeClick"></el-tree>
+                                @node-click="nodeClick">
+                                <template #default="{ node, data }">
+                                    <span class="custom-tree-node">
+                                        <span :class="data.isArea ? 'treedisabled' : ''">{{
+                                            node.label }}</span>
+                                    </span>
+                                </template>
+                            </el-tree>
                         </el-aside>
                         <el-container>
-                            <el-main v-if="selectNode.id">
+                            <el-main v-if="selectNode?.id">
                                 <el-row>
                                     <el-col :span="4">
                                         搴撲綅缂栧彿: {{ selectNode.warehouseCode }}
@@ -122,7 +129,8 @@
 
             },
             props: {
-                label: 'name'
+                label: 'name',
+                disabled: 'isArea'
             },
             exportUrl: '/api/blade-cps/material-storage/excel/template',
             uploadUrl: '/api/blade-cps/material-storage/excel/import',
@@ -154,7 +162,6 @@
         init() {
             this.$HTTP.get(`/api/blade-cps/tray-storage/tree`).then(res => {
                 this.treeData = res.data
-                this.nodeClick(res.data?.[0])
             })
             this.$HTTP.get(`/api/blade-cps/material-type/list`).then(res => {
                 this.options.typeId = res.data.map(item => ({
@@ -205,4 +212,8 @@
 }
 </script>
 
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss" scoped>
+.treedisabled {
+    color: #ccc;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3