Files
admin-sjzx/src/views/pqs/business/log/TerminalLog/index.vue

103 lines
3.4 KiB
Vue
Raw Normal View History

2025-04-14 16:35:27 +08:00
<template>
<div class="default-main">
<TableHeader datePicker showExport>
<template v-slot:select>
<el-form-item label="日志类型">
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择日志类型">
<el-option v-for="item in fontdveoption" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="筛选数据">
2026-01-22 16:15:33 +08:00
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
2025-04-14 16:35:27 +08:00
</el-form-item>
</template>
2025-04-23 15:36:57 +08:00
<template #operation>
<el-button type="primary" icon="el-icon-Sort" @click="changePush">台账变更推送</el-button>
</template>
2025-04-14 16:35:27 +08:00
</TableHeader>
<Table ref="tableRef"></Table>
2025-05-15 14:52:02 +08:00
<pushDisplay ref="pushDisplayRef" />
2025-04-14 16:35:27 +08:00
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
2025-04-23 15:36:57 +08:00
import { ElMessage, ElMessageBox } from 'element-plus'
import { ledgerChangePush } from '@/api/device-boot/terminalTree'
2025-05-15 14:52:02 +08:00
import pushDisplay from './pushDisplay.vue'
2025-04-14 16:35:27 +08:00
defineOptions({
name: 'BusinessAdministrator/LogManagement/TerminalLog'
})
2025-05-15 14:52:02 +08:00
const pushDisplayRef = ref()
2025-04-14 16:35:27 +08:00
const dictData = useDictData()
const fontdveoption = dictData.getBasicData('Dev_Ops')
const tableStore = new TableStore({
url: '/device-boot/pqsTerminalLogs/getList',
method: 'POST',
column: [
{
field: 'index',
title: '序号',
width: '80',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
// { title: '名称', field: 'name', width: '200' },
2025-04-23 15:36:57 +08:00
{
title: '日志类型',
field: 'logsType',
width: '250',
2025-04-14 16:35:27 +08:00
formatter: (row: any) => {
return fontdveoption.find((item: any) => item.id == row.cellValue)?.name
}
2025-04-23 15:36:57 +08:00
},
2025-04-14 16:35:27 +08:00
{
title: '更改人员',
field: 'createBy',
width: '250'
},
{
title: '更改时间',
field: 'updateTime',
width: '250'
},
{ title: '描述', field: 'terminalDescribe' }
],
beforeSearchFun: () => {}
})
2025-04-23 15:36:57 +08:00
// 变更推送
const changePush = () => {
ElMessageBox.confirm('当前操作会把存在变动的装置测点推送至前置,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
ledgerChangePush().then(res => {
2025-05-15 14:52:02 +08:00
// ElMessage.success(res.message)
pushDisplayRef.value.open(res.data)
2025-04-23 15:36:57 +08:00
tableStore.index()
})
})
}
const tableRef = ref()
provide('tableRef', tableRef)
2025-04-14 16:35:27 +08:00
tableStore.table.params.type = ''
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const addMenu = () => {}
</script>
<style lang="scss" scoped></style>