解析列表

This commit is contained in:
zhujiyan
2024-10-15 16:41:41 +08:00
parent 223e698c9b
commit bb91cd6f83
2 changed files with 31 additions and 17 deletions

View File

@@ -26,10 +26,9 @@ const tableStore: any = new TableStore({
// { width: '60', type: 'checkbox', fixed: 'left' }, // { width: '60', type: 'checkbox', fixed: 'left' },
{ title: '序号', type: 'seq', width: 80 }, { title: '序号', type: 'seq', width: 80 },
{ field: 'projectName', title: '工程名称', minWidth: 170 }, { field: 'projectName', title: '工程名称', minWidth: 170 },
// { field: 'allCount', title: '数据总数(条)', minWidth: 170 }, { field: 'successCount', title: '成功解析数', minWidth: 170 },
{ field: 'successCount', title: '已入库总数(条)', minWidth: 170 }, { field: 'startTime', title: '导入开始时间', minWidth: 170 },
{ field: 'startTime', title: '起始时间', minWidth: 170 }, { field: 'endTime', title: '导入结束时间', minWidth: 170 },
{ field: 'endTime', title: '结束时间', minWidth: 170 },
{ {
title: '解析状态', title: '解析状态',
field: 'status', field: 'status',
@@ -116,8 +115,5 @@ defineExpose({ open })
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-dialog_body { ::v-deep .el-dialog_body {
overflow-y: hidden !important; overflow-y: hidden !important;
.analysisTable {
height: 400px !important;
}
} }
</style> </style>

View File

@@ -1,8 +1,25 @@
<!-- 解析列表 --> <!-- 解析列表 -->
<template> <template>
<el-dialog v-model="dialogVisible" title="解析列表" width="70%" draggable @closed="close"> <el-dialog v-model="dialogVisible" title="详情" width="70%" draggable @closed="close">
<TableHeader date-picker></TableHeader> <vxe-table
<Table ref="tableRef" /> border
auto-resize
:data="tableData"
v-bind="defaultAttribute"
>
<vxe-column field="name" align="center" title="文件名称"></vxe-column>
<vxe-column field="createTime" align="center" title="导入时间"></vxe-column>
<vxe-column field="allCount" align="center" title="数据总数(条)" width="120"></vxe-column>
<vxe-column field="realCount" align="center" title="已入库总数(条)" width="120"></vxe-column>
<vxe-column field="state" align="center" title="解析状态" width="100">
<template v-slot:default="scoped">
<el-tag type="warning" v-if="scoped.row.state == 0">未解析</el-tag>
<el-tag type="success" v-if="scoped.row.state == 1">解析成功</el-tag>
<el-tag type="danger" v-if="scoped.row.state == 2">解析失败</el-tag>
<el-tag type="primary" v-if="scoped.row.state == 3">文件不存在</el-tag>
</template>
</vxe-column>
</vxe-table>
</el-dialog> </el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@@ -11,6 +28,7 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue' import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue' import TableHeader from '@/components/table/header/index.vue'
import { ArrowLeft } from '@element-plus/icons-vue' import { ArrowLeft } from '@element-plus/icons-vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
const emit = defineEmits(['back']) const emit = defineEmits(['back'])
const dialogVisible = ref(false) const dialogVisible = ref(false)
const height = ref(0) const height = ref(0)
@@ -19,17 +37,17 @@ height.value = window.innerHeight < 1080 ? 230 : 450
const tableStore: any = new TableStore({ const tableStore: any = new TableStore({
url: '', url: '',
publicHeight: height.value, publicHeight: height.value,
showPage: false,
column: [ column: [
{ width: '60', type: 'checkbox', fixed: 'left' }, { width: '60', type: 'checkbox', fixed: 'left' },
{ title: '序号', type: 'seq', width: 80 }, { title: '序号', type: 'seq', width: 80 },
{ field: 'projectName', title: '工程名称', minWidth: 170 }, { field: 'name', title: '文件名称', minWidth: 170 },
{ field: 'createTime', title: '导入时间', minWidth: 170 },
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 }, { field: 'allCount', title: '数据总数(条)', minWidth: 170 },
{ field: 'successCount', title: '已入库总数(条)', minWidth: 170 }, { field: 'realCount', title: '已入库总数(条)', minWidth: 170 },
{ field: 'startTime', title: '起始时间', minWidth: 170 },
{ field: 'endTime', title: '结束时间', minWidth: 170 },
{ {
title: '解析状态', title: '解析状态',
field: 'status', field: 'state',
width: 100, width: 100,
render: 'tag', render: 'tag',
custom: { custom: {
@@ -70,14 +88,14 @@ const tableStore: any = new TableStore({
tableStore.table.data = [] tableStore.table.data = []
} }
}) })
provide('tableStore', tableStore)
//返回 //返回
const handleBack = () => { const handleBack = () => {
emit('back') emit('back')
} }
const tableData: any = ref()
const open = (val: any) => { const open = (val: any) => {
dialogVisible.value = true dialogVisible.value = true
tableStore.table.data = val tableData.value = val
setTimeout(() => { setTimeout(() => {
tableStore.index() tableStore.index()
}, 10) }, 10)