liu
2026-10-19 3328b5df2bb916968ab97ce0f0b2d22517ac4828
fix: 分类树超出高度统一改为内部滚动

- 生产物料管理、WMS 商品列表左侧分类卡片限制高度,树区域独立滚动
- WMS 商品分类树、设备类型树搜索框固定,树节点区域纵向滚动
- 物料/设备/库存选择弹窗内的分类树补上固定高度,避免撑高弹窗

Co-Authored-By: Claude <noreply@anthropic.com>
已修改7个文件
74 ■■■■■ 文件已修改
src/views/mes/dv/machinery/components/select-dialog.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/dv/machinery/type/components/tree.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/md/item/components/select-dialog.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/md/item/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wls/materialstock/components/select-dialog.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wms/md/item/category/components/tree.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wms/md/item/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/dv/machinery/components/select-dialog.vue
@@ -223,7 +223,7 @@
    @ok="handleConfirm"
    @cancel="closeModal"
  >
    <div class="flex h-full w-full">
    <div class="flex h-[60vh] w-full">
      <div class="mr-4 h-full w-1/5">
        <MachineryTypeTree
          ref="typeTreeRef"
src/views/mes/dv/machinery/type/components/tree.vue
@@ -81,14 +81,26 @@
</script>
<template>
  <Card class="h-full" size="small" title="设备类型">
  <Card
    class="h-full overflow-hidden"
    size="small"
    title="设备类型"
    :body-style="{
      display: 'flex',
      flex: '1',
      flexDirection: 'column',
      minHeight: '0',
      overflow: 'hidden',
    }"
    :style="{ display: 'flex', flexDirection: 'column' }"
  >
    <Input
      v-model:value="searchKeyword"
      allow-clear
      class="mb-3"
      class="mb-3 shrink-0"
      placeholder="搜索设备类型"
      @change="handleSearch"
    />
    <Grid class="h-full" />
    <Grid class="min-h-0 flex-1" />
  </Card>
</template>
src/views/mes/md/item/components/select-dialog.vue
@@ -224,8 +224,11 @@
         :destroy-on-close="true"
         @ok="handleConfirm"
         @cancel="closeModal">
    <div class="flex h-full w-full">
      <Card class="mr-4 h-full w-1/5">
    <div class="flex h-[60vh] w-full">
      <Card
        class="mr-4 h-full w-1/5"
        :body-style="{ height: '100%', overflow: 'hidden' }"
      >
        <MdItemTypeTree ref="typeTreeRef"
                        @node-click="handleItemTypeNodeClick" />
      </Card>
src/views/mes/md/item/index.vue
@@ -128,7 +128,10 @@
    <FormModal @success="handleRefresh" />
    <ImportModal @success="handleRefresh" />
    <div class="flex h-full w-full gap-4">
      <Card class="mr-4 h-full w-1/6">
      <Card
        class="mr-4 h-full w-1/6"
        :body-style="{ height: '100%', overflow: 'hidden' }"
      >
        <MdItemTypeTree @node-click="handleTypeNodeClick" />
      </Card>
      <div class="w-5/6">
src/views/wls/materialstock/components/select-dialog.vue
@@ -258,8 +258,8 @@
      show-icon
      type="info"
    />
    <div class="flex gap-3">
      <div class="bg-card w-1/6 rounded p-2">
    <div class="flex h-[60vh] gap-3">
      <div class="bg-card h-full w-1/6 overflow-hidden rounded p-2">
        <MdItemTypeTree @node-click="handleTypeNodeClick" />
      </div>
      <div class="w-5/6">
src/views/wms/md/item/category/components/tree.vue
@@ -94,30 +94,31 @@
</script>
<template>
  <div class="h-full">
  <div class="flex h-full flex-col overflow-hidden">
    <Input
      v-model:value="filterText"
      :placeholder="filterPlaceholder"
      allow-clear
      class="w-full"
      class="w-full shrink-0"
    >
      <template #prefix>
        <IconifyIcon class="size-4" icon="lucide:search" />
      </template>
    </Input>
    <Spin :spinning="loading" wrapper-class-name="w-full">
      <Tree
        v-if="categoryTree.length > 0"
        :default-expand-all="true"
        :field-names="{ title: 'name', key: 'id', children: 'children' }"
        :selected-keys="selectedKeys"
        :tree-data="categoryTree"
        class="pt-2"
        @select="handleSelect"
      />
      <div v-else-if="!loading" class="py-4 text-center text-gray-500">
        暂无数据
      </div>
    </Spin>
    <div class="min-h-0 flex-1 overflow-y-auto pt-2">
      <Spin :spinning="loading" wrapper-class-name="w-full">
        <Tree
          v-if="categoryTree.length > 0"
          :default-expand-all="true"
          :field-names="{ title: 'name', key: 'id', children: 'children' }"
          :selected-keys="selectedKeys"
          :tree-data="categoryTree"
          @select="handleSelect"
        />
        <div v-else-if="!loading" class="py-4 text-center text-gray-500">
          暂无数据
        </div>
      </Spin>
    </div>
  </div>
</template>
src/views/wms/md/item/index.vue
@@ -168,7 +168,10 @@
  <Page auto-content-height><FormModal @success="handleRefresh" />
    <div class="flex h-full w-full">
      <Card class="mr-4 h-full w-1/6">
      <Card
        class="mr-4 h-full w-1/6"
        :body-style="{ height: '100%', overflow: 'hidden' }"
      >
        <WmsItemCategoryTree @node-click="handleCategoryNodeClick" />
      </Card>
      <div class="w-5/6">