修改测试bug
This commit is contained in:
@@ -1,29 +1,39 @@
|
||||
<!-- 补召日志 -->
|
||||
<template>
|
||||
<el-dialog
|
||||
modal-class="analysisList"
|
||||
v-model="dialogVisible"
|
||||
title="补召日志"
|
||||
width="70%"
|
||||
draggable
|
||||
@closed="close"
|
||||
>
|
||||
<TableHeader date-picker></TableHeader>
|
||||
<el-dialog modal-class="analysisList" v-model="dialogVisible" title="补召日志" width="70%" draggable @closed="close">
|
||||
<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>
|
||||
<Table ref="tableRef" />
|
||||
</el-dialog>
|
||||
<popup ref="detailRef"></popup>
|
||||
<!-- 离线数据导入组件 -->
|
||||
<offLineDataImport ref="offLineDataImportRef"></offLineDataImport>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, provide, onBeforeUnmount } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import offLineDataImport from '../offLineDataImport/index.vue'
|
||||
import popup from './popup.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
const emit = defineEmits(['back'])
|
||||
const dialogVisible = ref(false)
|
||||
const height = ref(0)
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
const detailRef: any = ref()
|
||||
const lineId = ref('')
|
||||
const deviceId = ref('')
|
||||
const deviceData = ref({})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-device-boot/portableOfflLog/queryMainLogPage',
|
||||
publicHeight: 400,
|
||||
@@ -39,7 +49,7 @@ const tableStore: any = new TableStore({
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'successCount', title: '成功解析数', minWidth: 170 },
|
||||
{ field: 'successCount', title: '成功解析数', minWidth: 150 },
|
||||
{ field: 'startTime', title: '导入开始时间', minWidth: 170 },
|
||||
{ field: 'endTime', title: '导入结束时间', minWidth: 170 },
|
||||
{
|
||||
@@ -65,7 +75,7 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
width: '100',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
@@ -100,7 +110,10 @@ provide('tableStore', tableStore)
|
||||
const handleBack = () => {
|
||||
emit('back')
|
||||
}
|
||||
const open = () => {
|
||||
const open = (row: any) => {
|
||||
lineId.value = row.lineId
|
||||
deviceData.value = row.deviceData
|
||||
deviceId.value = row.deviceId
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
tableStore.index()
|
||||
@@ -115,6 +128,21 @@ const updateViewportHeight = async () => {
|
||||
// tableStore.table.publicHeight = height.value
|
||||
// await tableStore.index()
|
||||
}
|
||||
//设备补召
|
||||
const handleaddDevice = () => {
|
||||
push({
|
||||
path: '/supplementaryRecruitment',
|
||||
query: {
|
||||
id: lineId.value,
|
||||
ndid: deviceData.value?.ndid
|
||||
}
|
||||
})
|
||||
}
|
||||
const offLineDataImportRef = ref()
|
||||
const handleImport = () => {
|
||||
//设备devId&监测点lineId带入组件
|
||||
offLineDataImportRef.value && offLineDataImportRef.value.open(deviceId.value, lineId.value)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
updateViewportHeight() // 初始化视口高度
|
||||
@@ -126,9 +154,4 @@ onBeforeUnmount(() => {
|
||||
})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
overflow-y: hidden !important;
|
||||
height: 70vh !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user