2024-10-17 14:08:58 +08:00
|
|
|
<!-- 补召日志 -->
|
2024-07-23 17:28:31 +08:00
|
|
|
<template>
|
2024-10-17 14:33:00 +08:00
|
|
|
<el-dialog
|
|
|
|
|
modal-class="analysisList"
|
|
|
|
|
v-model="dialogVisible"
|
|
|
|
|
title="补召日志"
|
|
|
|
|
width="70%"
|
|
|
|
|
draggable
|
|
|
|
|
@closed="close"
|
|
|
|
|
>
|
2024-07-24 09:26:37 +08:00
|
|
|
<TableHeader date-picker></TableHeader>
|
2024-07-23 17:28:31 +08:00
|
|
|
<Table ref="tableRef" />
|
|
|
|
|
</el-dialog>
|
2024-10-15 15:30:01 +08:00
|
|
|
<popup ref="detailRef"></popup>
|
2024-07-23 17:28:31 +08:00
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
2024-10-30 15:02:25 +08:00
|
|
|
import { ref, onMounted, provide, onBeforeUnmount } from 'vue'
|
2024-07-23 17:28:31 +08:00
|
|
|
import TableStore from '@/utils/tableStore'
|
|
|
|
|
import Table from '@/components/table/index.vue'
|
2024-07-24 09:26:37 +08:00
|
|
|
import TableHeader from '@/components/table/header/index.vue'
|
2024-10-15 15:30:01 +08:00
|
|
|
import popup from './popup.vue'
|
2024-07-23 17:28:31 +08:00
|
|
|
const emit = defineEmits(['back'])
|
|
|
|
|
const dialogVisible = ref(false)
|
2024-08-23 08:51:36 +08:00
|
|
|
const height = ref(0)
|
2024-09-27 16:22:34 +08:00
|
|
|
height.value = window.innerHeight < 1080 ? 230 : 450
|
2024-10-17 14:08:58 +08:00
|
|
|
const detailRef: any = ref()
|
2024-07-23 17:28:31 +08:00
|
|
|
const tableStore: any = new TableStore({
|
2024-10-15 15:30:01 +08:00
|
|
|
url: '/cs-device-boot/portableOfflLog/queryMainLogPage',
|
2024-10-17 14:33:00 +08:00
|
|
|
publicHeight: 400,
|
2024-07-23 17:28:31 +08:00
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
|
|
|
|
// { width: '60', type: 'checkbox', fixed: 'left' },
|
|
|
|
|
{ title: '序号', type: 'seq', width: 80 },
|
2024-10-17 16:02:10 +08:00
|
|
|
{
|
|
|
|
|
field: 'projectName',
|
|
|
|
|
title: '工程名称',
|
|
|
|
|
minWidth: 170,
|
|
|
|
|
formatter: row => {
|
|
|
|
|
return row.cellValue ? row.cellValue : '/'
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-10-15 16:41:41 +08:00
|
|
|
{ field: 'successCount', title: '成功解析数', minWidth: 170 },
|
|
|
|
|
{ field: 'startTime', title: '导入开始时间', minWidth: 170 },
|
|
|
|
|
{ field: 'endTime', title: '导入结束时间', minWidth: 170 },
|
2024-07-23 17:28:31 +08:00
|
|
|
{
|
|
|
|
|
title: '解析状态',
|
2024-10-15 15:30:01 +08:00
|
|
|
field: 'status',
|
2024-07-23 17:28:31 +08:00
|
|
|
width: 100,
|
|
|
|
|
render: 'tag',
|
|
|
|
|
custom: {
|
2024-07-24 15:36:40 +08:00
|
|
|
0: 'warning',
|
2024-07-24 09:21:07 +08:00
|
|
|
1: 'success',
|
|
|
|
|
2: 'danger',
|
2024-07-24 15:36:40 +08:00
|
|
|
3: 'primary'
|
2024-07-23 17:28:31 +08:00
|
|
|
},
|
|
|
|
|
replaceValue: {
|
2024-07-24 15:36:40 +08:00
|
|
|
0: '未解析',
|
2024-07-24 09:21:07 +08:00
|
|
|
1: '解析成功',
|
|
|
|
|
2: '解析失败',
|
2024-07-24 15:36:40 +08:00
|
|
|
3: '文件不存在'
|
2024-07-23 17:28:31 +08:00
|
|
|
}
|
|
|
|
|
// formatter: row => {
|
|
|
|
|
// return row.cellValue == 1 ? '未注册' : row.cellValue == 2 ? '注册' : '接入'
|
|
|
|
|
// },
|
2024-10-15 15:30:01 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
width: '180',
|
|
|
|
|
render: 'buttons',
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
|
|
|
|
title: '详情',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-EditPen',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
click: row => {
|
|
|
|
|
console.log(row.portableOfflLogList)
|
|
|
|
|
detailRef.value.open(row.portableOfflLogList)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2024-07-24 15:36:40 +08:00
|
|
|
}
|
2024-07-23 17:28:31 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
beforeSearchFun: () => {
|
|
|
|
|
// tableStore.table.params.devId = tableParams.value.devId
|
|
|
|
|
// tableStore.table.params.lineId = tableParams.value.lineId
|
|
|
|
|
// tableStore.table.params.list = tableParams.value.list
|
|
|
|
|
// tableStore.table.params.type = 3
|
|
|
|
|
},
|
2024-10-15 15:30:01 +08:00
|
|
|
loadCallback: () => {
|
|
|
|
|
// tableStore.table.data=[]
|
2024-10-17 14:33:00 +08:00
|
|
|
tableStore.table.height = 400
|
2024-10-17 16:02:10 +08:00
|
|
|
console.log(tableStore.table.publicHeight, 'tableStore.table.data')
|
2024-10-15 15:30:01 +08:00
|
|
|
}
|
2024-07-23 17:28:31 +08:00
|
|
|
})
|
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
//返回
|
|
|
|
|
const handleBack = () => {
|
|
|
|
|
emit('back')
|
|
|
|
|
}
|
2024-07-24 15:36:40 +08:00
|
|
|
const open = () => {
|
|
|
|
|
dialogVisible.value = true
|
2024-10-15 15:30:01 +08:00
|
|
|
setTimeout(() => {
|
|
|
|
|
tableStore.index()
|
|
|
|
|
}, 10)
|
2024-07-23 17:28:31 +08:00
|
|
|
}
|
2024-07-24 15:36:40 +08:00
|
|
|
const close = () => {
|
|
|
|
|
dialogVisible.value = false
|
2024-07-23 17:28:31 +08:00
|
|
|
}
|
2024-08-23 08:51:36 +08:00
|
|
|
const updateViewportHeight = async () => {
|
|
|
|
|
// height.value = window.innerHeight;
|
2024-09-27 16:22:34 +08:00
|
|
|
height.value = window.innerHeight < 1080 ? 230 : 450
|
2024-10-17 14:33:00 +08:00
|
|
|
// tableStore.table.publicHeight = height.value
|
2024-08-30 16:34:06 +08:00
|
|
|
// await tableStore.index()
|
2024-08-23 08:51:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
updateViewportHeight() // 初始化视口高度
|
|
|
|
|
window.addEventListener('resize', updateViewportHeight) // 监听窗口大小变化
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
window.removeEventListener('resize', updateViewportHeight) // 移除监听
|
|
|
|
|
})
|
2024-07-23 17:28:31 +08:00
|
|
|
defineExpose({ open })
|
|
|
|
|
</script>
|
2024-08-23 08:51:36 +08:00
|
|
|
<style lang="scss" scoped>
|
2024-10-17 14:33:00 +08:00
|
|
|
::v-deep .el-dialog__body {
|
|
|
|
|
overflow-y: hidden !important;
|
|
|
|
|
height: 70vh !important;
|
2024-08-23 08:51:36 +08:00
|
|
|
}
|
|
|
|
|
</style>
|