From 72675157c774fc4c6490bd1e49ca3c4aa25581f0 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期六, 08 三月 2025 15:00:22 +0800
Subject: [PATCH] 详情页面搜索更新

---
 src/views/demo/system/dept/dept.data.ts |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/views/demo/system/dept/dept.data.ts b/src/views/demo/system/dept/dept.data.ts
index 74e1b2a..1491215 100644
--- a/src/views/demo/system/dept/dept.data.ts
+++ b/src/views/demo/system/dept/dept.data.ts
@@ -1,4 +1,4 @@
-import { BasicColumn, FormSchema } from '/@/components/Table';
+import { BasicColumn, FormSchema } from '@/components/Table';
 import { h } from 'vue';
 import { Tag } from 'ant-design-vue';
 
@@ -69,11 +69,14 @@
     field: 'parentDept',
     label: '涓婄骇閮ㄩ棬',
     component: 'TreeSelect',
-
+    ifShow({ values }) {
+      const { deptName, parentDept } = values;
+      // Hide without a parentDept when editing
+      return parentDept || (!deptName && !parentDept);
+    },
     componentProps: {
       fieldNames: {
         label: 'deptName',
-        key: 'id',
         value: 'id',
       },
       getPopupContainer: () => document.body,

--
Gitblit v1.9.3