2024-10-17 14:08:58 +08:00
|
|
|
<!-- 补召日志 -->
|
2024-07-23 17:28:31 +08:00
|
|
|
<template>
|
2024-12-25 10:53:07 +08:00
|
|
|
<el-dialog modal-class="analysisList" v-model.trim="dialogVisible" title="补召日志" width="70%" draggable
|
|
|
|
|
@closed="close">
|
2024-11-19 10:39:46 +08:00
|
|
|
<TableHeader date-picker :showReset="false">
|
|
|
|
|
<template #operation>
|
|
|
|
|
<el-button type="primary" icon="el-icon-Connection" @click="handleImport">
|
|
|
|
|
离线补召
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-Monitor" @click="handleaddDevice">
|
|
|
|
|
在线补召
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</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-12-09 16:30:40 +08:00
|
|
|
<!-- 离线数据导入组件 -->
|
|
|
|
|
<!-- <offLineDataImport ref="offLineDataImportRef"></offLineDataImport> -->
|
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-11-19 10:39:46 +08:00
|
|
|
import offLineDataImport from '../offLineDataImport/index.vue'
|
2024-10-15 15:30:01 +08:00
|
|
|
import popup from './popup.vue'
|
2024-11-19 10:39:46 +08:00
|
|
|
import { useRouter } from 'vue-router'
|
2024-12-09 16:30:40 +08:00
|
|
|
defineOptions({
|
|
|
|
|
name: 'offLineDataImport'
|
|
|
|
|
})
|
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-11-19 10:39:46 +08:00
|
|
|
const lineId = ref('')
|
|
|
|
|
const deviceId = ref('')
|
|
|
|
|
const deviceData = ref({})
|
|
|
|
|
const { push, options, currentRoute } = useRouter()
|
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-11-28 16:26:21 +08:00
|
|
|
publicHeight: 420,
|
2024-07-23 17:28:31 +08:00
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
|
|
|
|
// { width: '60', type: 'checkbox', fixed: 'left' },
|
2024-12-09 16:30:40 +08:00
|
|
|
{
|
|
|
|
|
title: '序号', width: 80, formatter: (row: any) => {
|
|
|
|
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-10-17 16:02:10 +08:00
|
|
|
{
|
|
|
|
|
field: 'projectName',
|
|
|
|
|
title: '工程名称',
|
|
|
|
|
minWidth: 170,
|
|
|
|
|
formatter: row => {
|
|
|
|
|
return row.cellValue ? row.cellValue : '/'
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-11-19 10:39:46 +08:00
|
|
|
{ field: 'successCount', title: '成功解析数', minWidth: 150 },
|
2024-10-15 16:41:41 +08:00
|
|
|
{ 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: '操作',
|
2024-11-19 10:39:46 +08:00
|
|
|
width: '100',
|
2024-10-15 15:30:01 +08:00
|
|
|
render: 'buttons',
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
|
|
|
|
title: '详情',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-EditPen',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
click: row => {
|
2024-12-18 14:15:13 +08:00
|
|
|
// console.log(row.portableOfflLogList)
|
2024-10-15 15:30:01 +08:00
|
|
|
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-12-18 14:15:13 +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-11-19 10:39:46 +08:00
|
|
|
const open = (row: any) => {
|
|
|
|
|
lineId.value = row.lineId
|
|
|
|
|
deviceData.value = row.deviceData
|
|
|
|
|
deviceId.value = row.deviceId
|
2024-07-24 15:36:40 +08:00
|
|
|
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
|
|
|
}
|
2024-11-19 10:39:46 +08:00
|
|
|
//设备补召
|
|
|
|
|
const handleaddDevice = () => {
|
|
|
|
|
push({
|
|
|
|
|
path: '/supplementaryRecruitment',
|
|
|
|
|
query: {
|
2024-12-25 10:53:07 +08:00
|
|
|
activeName: '0',
|
2024-11-19 10:39:46 +08:00
|
|
|
id: lineId.value,
|
2024-12-09 16:30:40 +08:00
|
|
|
ndid: deviceData.value?.ndid,
|
2024-12-25 10:53:07 +08:00
|
|
|
|
2024-11-19 10:39:46 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const offLineDataImportRef = ref()
|
|
|
|
|
const handleImport = () => {
|
|
|
|
|
//设备devId&监测点lineId带入组件
|
2024-12-09 16:30:40 +08:00
|
|
|
// offLineDataImportRef.value && offLineDataImportRef.value.open(deviceId.value, lineId.value)
|
|
|
|
|
push({
|
|
|
|
|
path: '/supplementaryRecruitment',
|
|
|
|
|
query: {
|
2024-12-25 10:53:07 +08:00
|
|
|
activeName: '1',
|
2024-12-09 16:30:40 +08:00
|
|
|
lineId: lineId.value,
|
|
|
|
|
deviceId: deviceId.value,
|
2024-12-25 10:53:07 +08:00
|
|
|
|
2024-12-09 16:30:40 +08:00
|
|
|
}
|
|
|
|
|
})
|
2024-11-19 10:39:46 +08:00
|
|
|
}
|
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-11-19 10:39:46 +08:00
|
|
|
<style lang="scss" scoped></style>
|