From 8eda199da3781f4c8e0d95f47a092db342c85ed7 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期三, 09 十月 2024 11:40:51 +0800
Subject: [PATCH] 1
---
src/views/console/basic-data/material-warehousing-data/material-storage.vue | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 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..2352008 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-06-16 16:17:13
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/basic-data/material-warehousing-data/material-storage.vue
-->
<template>
@@ -14,11 +14,18 @@
<el-main>
<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>
+ <el-tree :expand-on-click-node="false" default-expand-all ref="group" node-key="id"
+ :data="treeData" :props="props" @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