From 7224851bf14cab706d36f695331488941ed4aba6 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 31 Jul 2026 18:01:05 +0800
Subject: [PATCH] feat:去除dialog滚动条
---
applications/task-work-order/src/views/orderView/appConfiguration/materials/index.vue | 77 +++-----------------------------------
1 files changed, 6 insertions(+), 71 deletions(-)
diff --git a/applications/task-work-order/src/views/orderView/appConfiguration/materials/index.vue b/applications/task-work-order/src/views/orderView/appConfiguration/materials/index.vue
index 051ba0e..693e3af 100644
--- a/applications/task-work-order/src/views/orderView/appConfiguration/materials/index.vue
+++ b/applications/task-work-order/src/views/orderView/appConfiguration/materials/index.vue
@@ -11,35 +11,17 @@
/>
</el-form-item>
- <el-form-item label="所属区划" prop="areaCode">
- <el-tree-select
- class="gd-select gray"
- popper-class="gd-tree-select-popper"
- v-model="searchParams.areaCode"
- node-key="id"
- :props="treeSelectProps"
- placeholder="请选择"
- clearable
- filterable
- @change="handleSearch"
- :check-strictly="true"
- lazy
- :load="loadRegionNode"
- :render-after-expand="false"
- />
- </el-form-item>
-
<el-form-item class="gd-search-actions">
<el-button :icon="RefreshRight" @click="resetForm"></el-button>
<el-button class="search-btn" :icon="Search" @click="handleSearch"></el-button>
</el-form-item>
</el-form>
- <div class="gd-table-toolbar">
- <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增材料</el-button>
- </div>
-
<div class="gd-table-container" v-loading="loading">
+ <div class="gd-table-toolbar">
+ <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增材料</el-button>
+ </div>
+
<div class="gd-table-content gd-table-content-bg">
<el-table class="gd-table" :data="list">
<el-table-column label="序号" width="80">
@@ -59,8 +41,7 @@
{{ getDictLabel(String(row.isAllScenario), dictObj.isAllScenario) }}
</template>
</el-table-column>
- <el-table-column prop="areaName" show-overflow-tooltip label="所属区域" />
- <el-table-column label="操作" class-name="operation-btns" width="200">
+ <el-table-column label="操作" class-name="operation-btns" width="200" fixed="right">
<template v-slot="{ row }">
<el-link type="primary" @click="openForm('view', row)">查看</el-link>
<el-link type="primary" @click="openForm('edit', row)">编辑</el-link>
@@ -91,13 +72,12 @@
import { onMounted, ref, provide, nextTick } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import FormDiaLog from './FormDiaLog.vue'
-import { materialsPageApi, materialsRemoveApi, regionLazyTreeApi } from './materialsApi'
+import { materialsPageApi, materialsRemoveApi } from './materialsApi'
import { getDictLabel } from '@ztzf/utils'
// 初始化查询参数
const initSearchParams = () => ({
materialName: '', // 材料名称
- areaCode: '', // 所属区划
current: 1, // 当前页
size: 10, // 每页大小
})
@@ -112,17 +92,6 @@
necessity: [],
isAllScenario: [],
}) // 字典对象
-
-// 树形选择器配置
-const treeSelectProps = {
- value: 'id',
- label: 'name',
- children: 'children',
- // 判断叶子节点
- isLeaf: (data, node) => {
- return data.leaf === true
- },
-}
provide('dictObj', dictObj)
@@ -139,40 +108,6 @@
{ dictKey: '1', dictValue: '是' },
{ dictKey: '0', dictValue: '否' },
]
-}
-
-// 懒加载获取区域节点数据
-async function loadRegionNode(node, resolve) {
- try {
- // 限制只加载两级,当前节点 level >= 1 时不加载子节点
- if (node.level >= 2) {
- resolve([])
- return
- }
-
- // 初始化加载时传递 code 参数,加载子节点时传递 parentCode 参数
- const params = node.data?.id ? { parentCode: node.data.id } : { code: '360800000000' }
- const res = await regionLazyTreeApi(params)
- const nodes = res?.data?.data || []
-
- // 处理返回的节点数据
- const processedNodes = nodes.map(item => {
- // 判断是否为叶子节点:如果是第二级(node.level === 1)则为叶子节点
- const isLeaf = node.level === 1
-
- return {
- id: item.id || item.value,
- name: item.name || item.title || item.label,
- hasChildren: item.hasChildren || false,
- leaf: isLeaf,
- }
- })
-
- resolve(processedNodes)
- } catch (error) {
- console.error('获取区域数据失败:', error)
- resolve([])
- }
}
// 获取列表
--
Gitblit v1.9.3