设备监控修改

This commit is contained in:
zhujiyan
2024-10-15 15:30:01 +08:00
parent 70666d4c86
commit a05cc2deab
8 changed files with 239 additions and 65 deletions

View File

@@ -3,8 +3,8 @@
<el-dialog v-model="dialogVisible" title="解析列表" width="70%" draggable @closed="close">
<TableHeader date-picker></TableHeader>
<Table ref="tableRef" />
</el-dialog>
<popup ref="detailRef"></popup>
</template>
<script lang="ts" setup>
import { ref, onMounted, provide, watch, onBeforeUnmount } from 'vue'
@@ -12,25 +12,27 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ArrowLeft } from '@element-plus/icons-vue'
import popup from './popup.vue'
const emit = defineEmits(['back'])
const dialogVisible = ref(false)
const height = ref(0)
height.value = window.innerHeight < 1080 ? 230 : 450
const detailRef:any=ref()
const tableStore: any = new TableStore({
url: '/cs-device-boot/portableOfflLog/queryPage',
url: '/cs-device-boot/portableOfflLog/queryMainLogPage',
publicHeight: height.value,
method: 'POST',
column: [
// { width: '60', type: 'checkbox', fixed: 'left' },
{ title: '序号', type: 'seq', width: 80 },
{ field: 'name', title: '文件名称', minWidth: 170 },
{ field: 'createTime', title: '导入时间', minWidth: 170 },
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 },
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170 },
{ field: 'projectName', title: '工程名称', minWidth: 170 },
// { field: 'allCount', title: '数据总数(条)', minWidth: 170 },
{ field: 'successCount', title: '已入库总数(条)', minWidth: 170 },
{ field: 'startTime', title: '起始时间', minWidth: 170 },
{ field: 'endTime', title: '结束时间', minWidth: 170 },
{
title: '解析状态',
field: 'state',
field: 'status',
width: 100,
render: 'tag',
custom: {
@@ -48,6 +50,24 @@ const tableStore: any = new TableStore({
// formatter: row => {
// return row.cellValue == 1 ? '未注册' : row.cellValue == 2 ? '注册' : '接入'
// },
},
{
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)
}
}
]
}
],
@@ -57,7 +77,10 @@ const tableStore: any = new TableStore({
// tableStore.table.params.list = tableParams.value.list
// tableStore.table.params.type = 3
},
loadCallback: () => {}
loadCallback: () => {
// tableStore.table.data=[]
console.log(tableStore.table.data, 'tableStore.table.data')
}
})
provide('tableStore', tableStore)
//返回
@@ -66,9 +89,9 @@ const handleBack = () => {
}
const open = () => {
dialogVisible.value = true
setTimeout(() => {
tableStore.index()
},10)
setTimeout(() => {
tableStore.index()
}, 10)
}
const close = () => {
dialogVisible.value = false