修改稳态报表展示处理

This commit is contained in:
zhujiyan
2024-08-12 11:35:56 +08:00
parent 8d69b36290
commit 390252bf16
4 changed files with 62 additions and 31 deletions

View File

@@ -21164,7 +21164,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "110kV排面岭光伏电站_110kV I母_110kV排营线",
"v": "110kV排面岭光伏电站_204母线_204监测点",
"qp": 1,
"m": "&lineName&",
"mc": {
@@ -22291,7 +22291,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "2024-07-01 00:00:00_2024-07-15 23:59:59",
"v": "2024-08-01 00:00:00_2024-08-08 23:59:59",
"qp": 1,
"m": "&statis_time&",
"mc": {
@@ -23313,7 +23313,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "2023-06-01",
"v": "2024-05-23",
"qp": 1,
"m": "&This_Time_Check&",
"mc": {
@@ -24360,7 +24360,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "110kV排面岭光伏电站_110kV I母_110kV排营线",
"v": "110kV排面岭光伏电站_204母线_204监测点",
"qp": 1,
"m": "&lineName&",
"mc": {
@@ -24582,7 +24582,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "110kV",
"v": "10kV",
"qp": 1,
"m": "&voltageLevel&",
"mc": {
@@ -25461,7 +25461,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "110000:100",
"v": "100:1",
"qp": 1,
"m": "&pt&",
"mc": {
@@ -25557,7 +25557,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "300:5",
"v": "5:5",
"qp": 1,
"m": "&ct&",
"mc": {
@@ -25653,7 +25653,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "750.0",
"v": "10.0",
"qp": 1,
"m": "&Standard_Capacity&",
"mc": {
@@ -26532,7 +26532,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "750.0",
"v": "10.0",
"qp": 1,
"m": "&Short_Capacity&",
"mc": {
@@ -26628,7 +26628,7 @@
"ht": 0,
"vt": 0,
"tb": 2,
"v": "50.0",
"v": "10.0",
"qp": 1,
"m": "&Deal_Capacity&",
"mc": {
@@ -176188,5 +176188,4 @@
"rh_height": 2066,
"luckysheet_selection_range": []
}
]

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main" :style="height">
<splitpanes style="height: 100%; background: #fff" class="default-theme" id="navigation-splitpanes">
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
<pane :size="size">
<PointTree
:default-expand-all="false"
@@ -53,13 +53,13 @@ import { onMounted, ref, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import PointTree from '@/components/tree/govern/pointTree.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import { mainHeight } from '@/utils/layout'
import { getTemplateByDept } from '@/api/harmonic-boot/luckyexcel'
import { exportExcel } from '@/views/system/reportForms/export.js'
import 'splitpanes/dist/splitpanes.css'
import { Splitpanes, Pane } from 'splitpanes'
import data from './123.json'
import { useDictData } from '@/stores/dictData'
defineOptions({
name: 'reportCore/statistics'
})
@@ -95,12 +95,14 @@ const tableStore = new TableStore({
tableStore.table.params.lineId = dotList.value.id
},
loadCallback: () => {
console.log(tableStore.table.data)
tableStore.table.data.forEach((item: any) => {
item.data1 ? (item.data = JSON.parse(item.data1)) : ''
item.celldata.forEach((k: any) => {
item.data[k.r][k.c].v = k.v
item.data[k.r][k.c].v ? (item.data[k.r][k.c].v = k.v) : ''
})
})
console.log(tableStore.table.data)
setTimeout(() => {
luckysheet.create({
container: 'luckysheet',
title: '', // 表 头名
@@ -108,8 +110,10 @@ const tableStore = new TableStore({
showtoolbar: false, // 是否显示工具栏
showinfobar: false, // 是否显示顶部信息栏
showsheetbar: true, // 是否显示底部sheet按钮
data: tableStore.table.data
data:data
// tableStore.table.data
})
}, 10)
}
})
provide('tableStore', tableStore)
@@ -141,7 +145,7 @@ const exportEvent = () => {
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
}
</script>
<style lang="scss" scoped>
<style lang="scss">
.splitpanes.default-theme .splitpanes__pane {
background: #fff;
}

View File

@@ -85,6 +85,15 @@ const beforeUpload = (file: any) => {
}
luckysheet.destroy()
options.value.title = exportJson.info.name
console.log('🚀 ~ exportJson.sheets:', exportJson.sheets)
exportJson.sheets.forEach((item: any) => {
// item.celldata = []
// item.data = []
item.celldata.forEach((k: any) => {
k.v.ct.s ? (k.v.v = k.v.ct.s[0].v) : ''
k.v.ct.s ? (k.v.m = k.v.ct.s[0].v) : ''
})
})
options.value.data = exportJson.sheets
luckysheet.create(options.value)
})
@@ -95,9 +104,14 @@ const preservation = () => {
}
// 新增
const submitForm = (formdata: any, text: string) => {
console.log('🚀 ~ submitForm ~ text:', text)
let userStr = JSON.stringify(luckysheet.getAllSheets())
let blob = new Blob([userStr], {
// let userStr = JSON.stringify(luckysheet.getAllSheets())
let userStr = luckysheet.getAllSheets()
console.log('🚀 ~ submitForm ~ userStr:', userStr)
userStr.forEach((item: any) => {
item.data1 = JSON.stringify(item.data)
})
let blob = new Blob([JSON.stringify(userStr)], {
type: 'application/json;charset=UTF-8'
})
let files = new window.File([blob], 'content.json', {

View File

@@ -85,6 +85,15 @@ const beforeUpload = (file: any) => {
}
luckysheet.destroy()
options.value.title = exportJson.info.name
console.log('🚀 ~ exportJson.sheets:', exportJson.sheets)
exportJson.sheets.forEach((item: any) => {
// item.celldata = []
// item.data = []
item.celldata.forEach((k: any) => {
k.v.ct.s ? (k.v.v = k.v.ct.s[0].v) : ''
k.v.ct.s ? (k.v.m = k.v.ct.s[0].v) : ''
})
})
options.value.data = exportJson.sheets
luckysheet.create(options.value)
})
@@ -95,9 +104,14 @@ const preservation = () => {
}
// 新增
const submitForm = (formdata: any, text: string) => {
console.log('🚀 ~ submitForm ~ text:', text)
let userStr = JSON.stringify(luckysheet.getAllSheets())
let blob = new Blob([userStr], {
// let userStr = JSON.stringify(luckysheet.getAllSheets())
let userStr = luckysheet.getAllSheets()
console.log('🚀 ~ submitForm ~ userStr:', userStr)
userStr.forEach((item: any) => {
item.data1 = JSON.stringify(item.data)
})
let blob = new Blob([JSON.stringify(userStr)], {
type: 'application/json;charset=UTF-8'
})
let files = new window.File([blob], 'content.json', {