From 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期五, 28 八月 2026 10:16:32 +0800
Subject: [PATCH] feat: 综合业务模块页面重构与交互完善
---
src/components/PIMTable/PIMTable.vue | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 61df179..b8c6792 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -11,6 +11,7 @@
:row-key="rowKey"
:style="tableStyle"
tooltip-effect="dark"
+ :tooltip-options="{ popperOptions: { strategy: 'absolute' } }"
:expand-row-keys="expandRowKeys"
:show-summary="isShowSummary"
:summary-method="summaryMethod"
@@ -21,6 +22,7 @@
class="lims-table">
<el-table-column align="center"
type="selection"
+ :selectable="selectable"
width="55"
v-if="isSelection" />
<el-table-column align="center"
@@ -115,7 +117,33 @@
@click.stop>
<template v-for="(o, key) in item.operation"
:key="key">
- <el-button v-show="o.type != 'upload'"
+ <el-dropdown v-if="o.type == 'dropdown'"
+ v-show="o.showHide ? o.showHide(scope.row) : true"
+ trigger="click"
+ @command="(command) => o.commandFun(command, scope.row)"
+ style="margin-left: 12px; margin-right: 12px; vertical-align: middle;">
+ <el-button :disabled="isOperationDisabled(o, scope.row)"
+ :plain="o.plain"
+ type="primary"
+ :style="{
+ color: getOperationColor(o, scope.row),
+ fontWeight: 'bold',
+ }"
+ link>
+ {{ o.name }}<el-icon class="el-icon--right"><ArrowDown /></el-icon>
+ </el-button>
+ <template #dropdown>
+ <el-dropdown-menu>
+ <el-dropdown-item v-for="(dItem, dIdx) in (typeof o.dropdownItems === 'function' ? o.dropdownItems(scope.row) : o.dropdownItems)"
+ :key="dIdx"
+ :command="dItem.command"
+ :disabled="dItem.disabled ? dItem.disabled(scope.row) : false">
+ {{ dItem.label }}
+ </el-dropdown-item>
+ </el-dropdown-menu>
+ </template>
+ </el-dropdown>
+ <el-button v-show="o.type != 'upload' && o.type != 'dropdown'"
v-if="o.showHide ? o.showHide(scope.row) : true"
:disabled="isOperationDisabled(o, scope.row)"
:plain="o.plain"
@@ -202,6 +230,7 @@
import pagination from "./Pagination.vue";
import { computed, ref, inject, getCurrentInstance } from "vue";
import { ElMessage } from "element-plus";
+ import { ArrowDown } from "@element-plus/icons-vue";
// 鑾峰彇鍏ㄥ眬鐨� uploadHeader
const { proxy } = getCurrentInstance();
@@ -258,6 +287,10 @@
type: Boolean,
default: false,
},
+ selectable: {
+ type: Function,
+ default: () => true,
+ },
isShowPagination: {
type: Boolean,
default: true,
--
Gitblit v1.9.3