修改冀北现场问题

This commit is contained in:
GGJ
2024-08-07 11:13:46 +08:00
parent 071d5a5af3
commit 98097830a2
16 changed files with 134 additions and 63 deletions

View File

@@ -121,6 +121,69 @@ const tableStore = new TableStore({
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '报告',
minWidth: '150',
align: 'center',
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'productSetting',
title: '查看报告',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !(row.problemType == 2 || row.problemType == 4)
},
click: row => {
if (row.problemType == 2) {
const match = row.filePath.match(/excelreport(\/[^?#]*)/)
window.open(window.location.origin + '/#/previewFile?' + match[1])
} else {
if (row.problemPath == null) {
ElMessage({
message: '暂无报告!',
type: 'warning'
})
} else {
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
// window.open(res.data.url)
})
}
}
}
},
{
name: 'productSetting',
title: '报告下载',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !(row.problemType == 2 || row.problemType == 4)
},
click: row => {
if (row.problemType == 2) {
window.open(row.filePath)
} else {
if (row.problemPath == null) {
ElMessage({
message: '暂无报告!',
type: 'warning'
})
} else {
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
window.open(res.data.url)
})
}
}
}
}
]
},
{
title: '操作',
@@ -241,32 +304,7 @@ const tableStore = new TableStore({
)
}
},
{
name: 'productSetting',
title: '报告下载',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !(row.problemType == 2 || row.problemType == 4)
},
click: row => {
if (row.problemType == 2) {
window.open(row.filePath)
} else {
if (row.problemPath == null) {
ElMessage({
message: '暂无报告!',
type: 'warning'
})
} else {
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
window.open(res.data.url)
})
}
}
}
},
{
name: 'cancel',
title: '取消',