修改半月报导出功能

This commit is contained in:
guanj
2025-11-04 09:48:23 +08:00
parent d553754847
commit 1ec3bd11a0

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main">
<TableHeader datePicker ref="refheader" >
<TableHeader datePicker ref="refheader">
<template v-slot:select>
<el-form-item label="关键字筛选">
<el-input
@@ -96,14 +96,14 @@ const tableStore = new TableStore({
fixed: 'right',
render: 'tag',
custom: {
2: 'warning',
3: 'warning',
4: 'success'
功能调试: 'warning',
出厂调试: 'warning',
正式投运: 'success'
},
replaceValue: {
2: '功能调试',
3: '出厂调试',
4: '正式投运'
功能调试: '功能调试',
出厂调试: '出厂调试',
正式投运: '正式投运'
},
minWidth: 80
},
@@ -138,21 +138,21 @@ const tableStore = new TableStore({
}
},
{ title: '在线率(%)', fixed: 'right',width: 100, field: 'onlineRate', sortable: true },
{ title: '完整性(%)', fixed: 'right',width: 100, field: 'integrity', sortable: true }
{ title: '在线率(%)', fixed: 'right', width: 100, field: 'onlineRate', sortable: true },
{ title: '完整性(%)', fixed: 'right', width: 100, field: 'integrity', sortable: true }
],
beforeSearchFun: () => {},
loadCallback: () => {
tableStore.table.data.forEach(item => {
item.process = item.process == 2 ? '功能调试' : item.process == 3 ? '出厂调试' : '正式投运'
})
let name = tableStore.table.params.name
let data = tableStore.table.copyData.filter(item => {
// 处理latestTime默认值
item.latestTime = item.latestTime || '/'
// 需要检查的字段列表
const fieldsToCheck = ['projectName', 'engineeringName', 'mac', 'devName', 'lineName']
console.log(
'🚀 ~ fieldsToCheck.some(field => item[field]?.includes(name)):',
fieldsToCheck.some(field => item[field]?.includes(name))
)
// 检查任何一个字段包含搜索名称
return fieldsToCheck.some(field => item[field]?.includes(name))