From 459336e98dbd474a0cbf5a11660cc8821a092411 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期六, 14 三月 2026 16:41:46 +0800
Subject: [PATCH] 新增合格率字段到生产工序的新增和编辑页面,并在表格中显示相关参数。增加生产记录选择和批量删除功能。
---
src/components/PIMTable/PIMTable.vue | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 01462f0..159c533 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -26,6 +26,7 @@
type="selection"
width="55"
v-if="isSelection"
+ :selectable="rowSelectable"
/>
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
@@ -40,7 +41,7 @@
:fixed="item.fixed"
:label="item.label"
:prop="item.prop"
- :show-overflow-tooltip="item.dataType !== 'action'"
+ :show-overflow-tooltip="item.dataType !== 'action' && item.dataType !== 'slot'"
:align="item.align"
:sortable="!!item.sortable"
:type="item.type"
@@ -130,7 +131,7 @@
</div>
<!-- 鎸夐挳 -->
- <div v-else-if="item.dataType == 'action'">
+ <div v-else-if="item.dataType == 'action'" @click.stop>
<template v-for="(o, key) in item.operation" :key="key">
<el-button
v-show="o.type != 'upload'"
@@ -145,7 +146,7 @@
: o.color,
}"
link
- @click="o.clickFun(scope.row)"
+ @click.stop="o.clickFun(scope.row)"
:key="key"
>
{{ o.name }}
@@ -233,7 +234,7 @@
const uploadHeader = proxy.uploadHeader;
const javaApi = proxy.javaApi;
-const emit = defineEmits(["pagination", "expand-change", "selection-change"]);
+const emit = defineEmits(["pagination", "expand-change", "selection-change", "row-click"]);
// Filters
const typeFn = (val, row) => {
@@ -333,6 +334,11 @@
},
});
+// 閫夋嫨妗嗙鐢ㄦ帶鍒讹細琛屽璞′笂濡傛灉鏈� disabled === true锛屽垯涓嶅厑璁搁�変腑
+const rowSelectable = (row, index) => {
+ return !row.disabled;
+};
+
// Data
const uploadRefs = ref([]);
const currentFiles = ref({});
@@ -427,6 +433,10 @@
emit("pagination", { page: page, limit: limit });
};
+const rowClick = (row) => {
+ emit("row-click", row);
+};
+
const expandChange = (row, expandedRows) => {
emit("expand-change", row, expandedRows);
};
--
Gitblit v1.9.3