This commit is contained in:
GGJ
2024-10-16 08:49:38 +08:00
4 changed files with 40 additions and 93 deletions

View File

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

View File

@@ -1,8 +1,25 @@
<!-- 解析列表 -->
<template>
<el-dialog v-model="dialogVisible" title="解析列表" width="70%" draggable @closed="close">
<TableHeader date-picker></TableHeader>
<Table ref="tableRef" />
<el-dialog v-model="dialogVisible" title="详情" width="70%" draggable @closed="close">
<vxe-table
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>
</template>
<script lang="ts" setup>
@@ -11,6 +28,7 @@ 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 { defaultAttribute } from '@/components/table/defaultAttribute'
const emit = defineEmits(['back'])
const dialogVisible = ref(false)
const height = ref(0)
@@ -19,17 +37,17 @@ height.value = window.innerHeight < 1080 ? 230 : 450
const tableStore: any = new TableStore({
url: '',
publicHeight: height.value,
showPage: false,
column: [
{ width: '60', type: 'checkbox', fixed: 'left' },
{ 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: 'successCount', title: '已入库总数(条)', minWidth: 170 },
{ field: 'startTime', title: '起始时间', minWidth: 170 },
{ field: 'endTime', title: '结束时间', minWidth: 170 },
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170 },
{
title: '解析状态',
field: 'status',
field: 'state',
width: 100,
render: 'tag',
custom: {
@@ -70,14 +88,14 @@ const tableStore: any = new TableStore({
tableStore.table.data = []
}
})
provide('tableStore', tableStore)
//返回
const handleBack = () => {
emit('back')
}
const tableData: any = ref()
const open = (val: any) => {
dialogVisible.value = true
tableStore.table.data = val
tableData.value = val
setTimeout(() => {
tableStore.index()
}, 10)

View File

@@ -21,80 +21,6 @@
<div class="right_charts"><MyEchart ref="pieChart6" :options="echartsDataA3"></MyEchart></div>
</div>
</div>
<div class="view_bot" style="display: none">
<div class="view_bot_tables">
<!-- 表格数据 -->
<div v-if="tableData.length != 0">
<!-- div设计table -->
<div class="table_container">
<div class="table" v-for="(item, index) in columnsDataTop" :key="index">
<div class="table_info">
<!-- 单层表头 -->
<div class="thead">
<div class="thead_top">
{{ item[0].showName ? item[0].showName : '' }}({{ item[0].unit }})
</div>
<div class="thead_bot">
<div class="thead_bot_cell" v-for="(vv, key) in item" :key="key">
{{ vv.phase == 'M' ? '' : vv.phase + ' ' }}
</div>
</div>
</div>
<!-- 有合并表头的数据 -->
<div class="tbody">
<div class="tbody_cell" v-for="(vv, key) in item" :key="key">
{{
tableData.find(item => {
return item.anotherName == vv.showName && item.phase == vv.phase
})?.statisticalData
? tableData.find(item => {
return item.anotherName == vv.showName && item.phase == vv.phase
})?.statisticalData
: '/'
}}
</div>
</div>
</div>
</div>
</div>
<div class="table_container">
<div class="table" v-for="(item, index) in columnsDataBot" :key="index">
<div class="table_info">
<!-- 单层表头 -->
<div class="thead">
<div class="thead_top">
{{ item[0].showName ? item[0].showName : '' }}({{ item[0].unit }})
</div>
<div class="thead_bot">
<div class="thead_bot_cell" v-for="(vv, key) in item" :key="key">
{{ vv.phase == 'M' ? '' : vv.phase + ' ' }}
</div>
</div>
</div>
<!-- 有合并表头的数据 -->
<div class="tbody">
<div class="tbody_cell" v-for="(vv, key) in item" :key="key">
{{
tableData.find((item: any) => {
return item.anotherName == vv.showName && item.phase == vv.phase
})?.statisticalData
? tableData.find((item: any) => {
return item.anotherName == vv.showName && item.phase == vv.phase
})?.statisticalData
: '/'
}}
</div>
</div>
</div>
</div>
</div>
</div>
<div v-else style="border: 1px solid #eee">
<el-empty description="暂无数据" />
</div>
</div>
</div>
<div class="view_bot">
<vxe-table
border
@@ -663,9 +589,9 @@ onMounted(() => {
.view {
width: 100%;
height: 100%;
padding-bottom: 200px;
box-sizing: border-box;
overflow: auto;
display: flex;
flex-direction: column;
.view_top {
width: 100%;
height: auto;
@@ -718,6 +644,10 @@ onMounted(() => {
.view_bot {
min-height: 300px;
margin: 10px 0 20px 0;
overflow: auto !important;
flex: 1 !important;
padding-bottom: 200px !important;
box-sizing: border-box !important;
.view_bot_tables {
margin-bottom: 10px;
height: auto;

View File

@@ -440,6 +440,9 @@ defineExpose({ open })
.el-cascader-menu__list {
height: 100% !important;
overflow-y: auto !important;
padding-bottom: 50px !important;
box-sizing: border-box;
}
}
}