修改冀北现场问题

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: '取消',

View File

@@ -96,6 +96,43 @@ 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
},
click: row => {
const match = row.filePath.match(/excelreport(\/[^?#]*)/)
window.open(window.location.origin + '/#/previewFile?' + match[1])
}
},
{
name: 'productSetting',
title: '报告下载',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.problemType != 2
},
click: row => {
window.open(row.filePath)
}
}
]
},
{
title: '操作',
minWidth: '220',
@@ -198,19 +235,7 @@ const tableStore = new TableStore({
)
}
},
{
name: 'productSetting',
title: '报告下载',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.problemType != 2
},
click: row => {
window.open(row.filePath)
}
},
{
name: 'cancel',
title: '取消',

View File

@@ -42,7 +42,7 @@ import { Link, View } from '@element-plus/icons-vue'
defineOptions({ name: 'technology/detail' })
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
}
const { query } = useRoute() // 查询参数

View File

@@ -84,7 +84,7 @@ import { getFileNameAndFilePath, uploadFile } from '@/api/system-boot/file'
import { addFeedback, updateFeedback } from '@/api/supervision-boot/leaflet'
import { Link, View } from '@element-plus/icons-vue'
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
}
//.doc,.docx,.xlsx,.xls,.pdf
const acceptType = ref('')
@@ -175,7 +175,7 @@ const open = async (
}
if (supervisionReport) {
let arrPath = supervisionReport.split(',')
console.log("🚀 ~ arrPath:", arrPath)
console.log('🚀 ~ arrPath:', arrPath)
await getFileNameAndFilePath({ filePath: arrPath[0] }).then(res => {
supervisionReportDetail.supervisionReportPath = res.data.url
supervisionReportDetail.supervisionReportName = res.data.fileName