bug修改
This commit is contained in:
@@ -233,5 +233,5 @@
|
||||
|
||||
//解决打开dialog body容器宽度变为 calc(100% - 8px)问题
|
||||
.el-popup-parent--hidden{
|
||||
width: 100%;
|
||||
width: 100% !important;
|
||||
}
|
||||
@@ -1,37 +1,38 @@
|
||||
<!-- 解析列表 -->
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="详情" width="70%" draggable @closed="close">
|
||||
<vxe-table border auto-resize height="500" :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>
|
||||
<div :style="tableHeight">
|
||||
<vxe-table border auto-resize height="auto" :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>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, provide, watch, onBeforeUnmount } from 'vue'
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
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'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const emit = defineEmits(['back'])
|
||||
const dialogVisible = ref(false)
|
||||
const tableHeight = mainHeight(550)
|
||||
const height = ref(0)
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '',
|
||||
publicHeight: height.value,
|
||||
// publicHeight: height.value,
|
||||
showPage: false,
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox', fixed: 'left' },
|
||||
@@ -57,9 +58,6 @@ const tableStore: any = new TableStore({
|
||||
2: '解析失败',
|
||||
3: '文件不存在'
|
||||
}
|
||||
// formatter: row => {
|
||||
// return row.cellValue == 1 ? '未注册' : row.cellValue == 2 ? '注册' : '接入'
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -99,10 +97,8 @@ const close = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
const updateViewportHeight = async () => {
|
||||
// height.value = window.innerHeight;
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
tableStore.table.publicHeight = height.value
|
||||
// await tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -4,20 +4,13 @@
|
||||
<!-- 上传文件列表 -->
|
||||
<div class="offline_data">
|
||||
<div class="offline_data_btn">
|
||||
<el-button
|
||||
:loading="loading"
|
||||
style="margin-left: 10px"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="submitUpload"
|
||||
>
|
||||
<el-button :loading="loading" style="margin-left: 10px" type="primary" @click="submitUpload">
|
||||
上传离线数据
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleUpload"
|
||||
:loading="loading"
|
||||
size="small"
|
||||
:disabled="offLineFileList.length == 0 || disableHandleUpload"
|
||||
>
|
||||
开始上传
|
||||
@@ -25,41 +18,38 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="removeAllFile"
|
||||
size="small"
|
||||
:loading="loading"
|
||||
:disabled="offLineFileList.length == 0"
|
||||
>
|
||||
清空文件
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="offline_data_list">
|
||||
<div :style="tableHeight">
|
||||
<vxe-table border auto-resize height="auto" :data="offLineFileList" v-bind="defaultAttribute">
|
||||
<vxe-column field="name" align="center" title="文件名"></vxe-column>
|
||||
<vxe-column field="webkitRelativePath" align="center" title="文件地址"></vxe-column>
|
||||
<vxe-column field="status" align="center" title="状态" width="250">
|
||||
<template v-slot:default="scoped">
|
||||
<el-progress v-if="scoped.row.status == 0" :percentage="0">
|
||||
<el-button text>等待上传</el-button>
|
||||
</el-progress>
|
||||
<el-progress v-if="scoped.row.status == -1" :percentage="30" :indeterminate="true">
|
||||
<el-button text>上传中...</el-button>
|
||||
</el-progress>
|
||||
<el-progress v-if="scoped.row.status == 1" status="success" :percentage="100">
|
||||
<el-button text>上传成功</el-button>
|
||||
</el-progress>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="200px">
|
||||
<template v-slot:default="scoped">
|
||||
<el-button link size="small" type="danger" @click="removeFile(scoped.row)">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<!-- <div class="offline_data_list"> -->
|
||||
<div :style="tableHeight">
|
||||
<vxe-table border auto-resize height="auto" :data="offLineFileList" v-bind="defaultAttribute">
|
||||
<vxe-column field="name" align="center" title="文件名"></vxe-column>
|
||||
<vxe-column field="webkitRelativePath" align="center" title="文件地址"></vxe-column>
|
||||
<vxe-column field="status" align="center" title="状态" width="250">
|
||||
<template v-slot:default="scoped">
|
||||
<el-progress v-if="scoped.row.status == 0" :percentage="0">
|
||||
<el-button text>等待上传</el-button>
|
||||
</el-progress>
|
||||
<el-progress v-if="scoped.row.status == -1" :percentage="30" :indeterminate="true">
|
||||
<el-button text>上传中...</el-button>
|
||||
</el-progress>
|
||||
<el-progress v-if="scoped.row.status == 1" status="success" :percentage="100">
|
||||
<el-button text>上传成功</el-button>
|
||||
</el-progress>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="200px">
|
||||
<template v-slot:default="scoped">
|
||||
<el-button link type="danger" @click="removeFile(scoped.row)">移除</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -162,7 +152,6 @@ defineExpose({ open })
|
||||
<style lang="scss" scoped>
|
||||
.offline_data {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
.offline_data_btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
@@ -172,7 +161,6 @@ defineExpose({ open })
|
||||
}
|
||||
.offline_data_list {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -384,7 +384,6 @@ const refreshTree = () => {
|
||||
const range = (start: any, end: any, step: any) => {
|
||||
return Array.from({ length: (end - start) / step + 1 }, (_, i) => start + i * step)
|
||||
}
|
||||
//二维数组去除相同数据的数组
|
||||
|
||||
const init = (flag: boolean) => {
|
||||
//调用子组件的方法切换的时候tree的节点也变化
|
||||
@@ -419,8 +418,7 @@ const init = (flag: boolean) => {
|
||||
} else {
|
||||
middleTitle = ''
|
||||
}
|
||||
let indexList = []
|
||||
indexList = searchForm.value.index
|
||||
let indexList = searchForm.value.index
|
||||
chartTitle.value = deviceData.value.itemName + '_' + middleTitle + '_'
|
||||
indexList.map((item: any, indexs: any) => {
|
||||
indexOptions.value.map((vv: any) => {
|
||||
@@ -455,7 +453,7 @@ const init = (flag: boolean) => {
|
||||
// y轴单位数组
|
||||
let unitList: any = []
|
||||
|
||||
let groupedData = chartsList.reduce((acc, item) => {
|
||||
let groupedData = chartsList.reduce((acc: any, item: any) => {
|
||||
let key = item.anotherName
|
||||
if (!acc[key]) {
|
||||
acc[key] = []
|
||||
@@ -741,7 +739,16 @@ const formatCountOptions = (list: any) => {
|
||||
vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
|
||||
if (kk.harmStart && kk.harmEnd) {
|
||||
range(0, 0, 0)
|
||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||
|
||||
if (kk.showName.includes('间谐波电压含有率')) {
|
||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1).map(
|
||||
(item: any) => {
|
||||
return item - 0.5
|
||||
}
|
||||
)
|
||||
} else {
|
||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||
}
|
||||
if (!countData.value[index].count || countData.value[index].count.length == 0) {
|
||||
countData.value[index].count = countData.value[index].countOptions[0]
|
||||
}
|
||||
@@ -802,13 +809,11 @@ const handleChange = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const searchFormIndex = ref<any>()
|
||||
watch(
|
||||
() => searchForm.value.index,
|
||||
(val: any, oldval: any) => {
|
||||
if (val) {
|
||||
let list = val
|
||||
searchFormIndex.value = val
|
||||
setTimeout(() => {
|
||||
formatCountOptions(list)
|
||||
}, 100)
|
||||
|
||||
Reference in New Issue
Block a user