From 8ac00913c2fe8d008a9a7de8d4a7a23d838d1d9c Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 23 五月 2026 13:51:29 +0800
Subject: [PATCH] 设备巡检tab页更名、表格无法拖拉问题
---
src/views/equipmentManagement/inspectionManagement/index.vue | 43 +++++++++++++++++++------------------------
1 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/src/views/equipmentManagement/inspectionManagement/index.vue b/src/views/equipmentManagement/inspectionManagement/index.vue
index c863719..be43997 100644
--- a/src/views/equipmentManagement/inspectionManagement/index.vue
+++ b/src/views/equipmentManagement/inspectionManagement/index.vue
@@ -52,7 +52,8 @@
total: total,
layout: 'total, sizes, prev, pager, next, jumper'
}"
- :table-style="{ width: '100%', height: 'calc(100vh - 23em)' }">
+ height="calc(100vh - 23em)"
+ :table-style="{ width: '100%' }">
<template #inspector="{ row }">
<div class="person-tags">
<!-- 璋冭瘯淇℃伅锛屼笂绾挎椂鍒犻櫎 -->
@@ -121,8 +122,8 @@
// 鍗曢�夋閰嶇疆
const activeRadio = ref("taskManage");
const radios = reactive([
- { name: "taskManage", label: "瀹氭椂浠诲姟绠$悊" },
- { name: "task", label: "瀹氭椂浠诲姟璁板綍" },
+ { name: "taskManage", label: "宸℃浠诲姟" },
+ { name: "task", label: "宸℃璁板綍" },
]);
// 琛ㄦ牸鏁版嵁
@@ -137,10 +138,10 @@
// 鍒楅厤缃�
const columns = ref([
- { prop: "taskName", label: "宸℃浠诲姟鍚嶇О", minWidth: 160 },
- { prop: "inspectionProject", label: "宸℃椤圭洰", minWidth: 150 },
- { prop: "remarks", label: "澶囨敞", minWidth: 150 },
- { prop: "inspector", label: "鎵ц宸℃浜�", minWidth: 150, slot: "inspector" },
+ { prop: "taskName", label: "宸℃浠诲姟鍚嶇О", minWidth: 200 },
+ { prop: "inspectionProject", label: "宸℃椤圭洰", minWidth: 180 },
+ { prop: "remarks", label: "澶囨敞", minWidth: 180 },
+ { prop: "inspector", label: "鎵ц宸℃浜�", minWidth: 180, slot: "inspector" },
{
prop: "isEnabled",
label: "鏄惁鍚敤",
@@ -151,13 +152,7 @@
{
prop: "frequencyType",
label: "棰戞",
- minWidth: 150,
- // formatter: (_, __, val) => ({
- // DAILY: "姣忔棩",
- // WEEKLY: "姣忓懆",
- // MONTHLY: "姣忔湀",
- // QUARTERLY: "瀛e害"
- // }[val] || "")
+ minWidth: 120,
formatData: params => {
return params === "DAILY"
? "姣忔棩"
@@ -173,7 +168,7 @@
{
prop: "frequencyDetail",
label: "寮�濮嬫棩鏈熶笌鏃堕棿",
- minWidth: 150,
+ minWidth: 200,
formatter: (row, column, cellValue) => {
// 鍏堝垽鏂槸鍚︽槸瀛楃涓�
if (typeof cellValue !== "string") return "";
@@ -194,11 +189,11 @@
);
},
},
- { prop: "registrant", label: "鐧昏浜�", minWidth: 100 },
+ { prop: "registrant", label: "鐧昏浜�", minWidth: 120 },
{
prop: "createTime",
label: "鐧昏鏃ユ湡",
- minWidth: 100,
+ minWidth: 180,
formatData: cell => {
if (!cell) return "-";
try {
@@ -220,7 +215,7 @@
return val == 1 ? "success" : "danger";
},
},
- { prop: "abnormalDescription", label: "寮傚父鎻忚堪", minWidth: 100 },
+ { prop: "abnormalDescription", label: "寮傚父鎻忚堪", minWidth: 150 },
]);
// 鎿嶄綔鍒楅厤缃�
@@ -231,7 +226,7 @@
label: "鎿嶄綔",
width: operations.length > 1 ? 180 : 130,
fixed: "right",
- align: 'center',
+ align: "center",
dataType: "action",
operation: operations
.map(op => {
@@ -279,7 +274,7 @@
operationsArr.value = ["edit"];
} else if (value === "task") {
const operationColumn = getOperationColumn(["upload", "viewFile"]);
- // 瀹氭椂浠诲姟璁板綍涓嶅睍绀�"鏄惁鍚敤"鍒�
+ // 宸℃璁板綍涓嶅睍绀�"鏄惁鍚敤"鍒�
const taskColumns = columns.value.filter(col => col.prop !== "isEnabled");
tableColumns.value = [
...taskColumns,
@@ -422,11 +417,11 @@
.then(() => {
// 鏍规嵁褰撳墠閫変腑鐨勬爣绛鹃〉璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
if (activeRadio.value === "taskManage") {
- // 瀹氭椂浠诲姟绠$悊
- proxy.download("/timingTask/export", {}, "瀹氭椂浠诲姟绠$悊.xlsx");
+ // 宸℃浠诲姟
+ proxy.download("/timingTask/export", {}, "宸℃浠诲姟.xlsx");
} else if (activeRadio.value === "task") {
- // 瀹氭椂浠诲姟璁板綍
- proxy.download("/inspectionTask/export", {}, "瀹氭椂浠诲姟璁板綍.xlsx");
+ // 宸℃璁板綍
+ proxy.download("/inspectionTask/export", {}, "宸℃璁板綍.xlsx");
}
})
.catch(() => {
--
Gitblit v1.9.3