方案数据趋势图指标参数修改

This commit is contained in:
zhujiyan
2024-09-18 11:48:00 +08:00
parent 92ab2b401c
commit 9973ecf56c

View File

@@ -6,9 +6,7 @@
<el-descriptions value="small" title="方案信息" class="mb10" :column="2" border> <el-descriptions value="small" title="方案信息" class="mb10" :column="2" border>
<template #extra> <template #extra>
<el-button type="primary" @click="handleOpen(0, '')">新增方案</el-button> <el-button type="primary" @click="handleOpen(0, '')">新增方案</el-button>
<el-button type="primary" icon="el-icon-Download" @click="handleExport"> <el-button type="primary" icon="el-icon-Download" @click="handleExport">数据导出</el-button>
数据导出
</el-button>
</template> </template>
<el-descriptions-item label="方案名称" width="60"> <el-descriptions-item label="方案名称" width="60">
{{ deviceData.itemName }} {{ deviceData.itemName }}
@@ -68,13 +66,13 @@
{{ item.ct && item.ct1 ? item.ct / item.ct1 : item.ct }} {{ item.ct && item.ct1 ? item.ct / item.ct1 : item.ct }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="起始时间" width="160"> <el-descriptions-item label="起始时间" width="160">
<span style="width:140px;overflow: hidden;display: block;"> <span style="width: 140px; overflow: hidden; display: block">
{{ item.startTime }} {{ item.startTime }}
</span> </span>
<!-- {{ item.startTime }} --> <!-- {{ item.startTime }} -->
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="结束时间" width="160"> <el-descriptions-item label="结束时间" width="160">
<span style="width:140px;overflow: hidden;display: block;"> <span style="width: 140px; overflow: hidden; display: block">
{{ item.endTime }} {{ item.endTime }}
</span> </span>
<!-- {{ item.endTime }} --> <!-- {{ item.endTime }} -->
@@ -122,9 +120,9 @@
v-if="item.countOptions.length != 0" v-if="item.countOptions.length != 0"
label-width="180px" label-width="180px"
> >
<!-- multiple -->
<el-select <el-select
v-model="item.count" v-model="item.count"
multiple
collapse-tags collapse-tags
collapse-tags-tooltip collapse-tags-tooltip
placeholder="请选择谐波次数" placeholder="请选择谐波次数"
@@ -176,7 +174,6 @@ import { queryStatistical } from '@/api/system-boot/csstatisticalset'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { isNonNullChain } from 'typescript' import { isNonNullChain } from 'typescript'
import { position } from 'html2canvas/dist/types/css/property-descriptors/position' import { position } from 'html2canvas/dist/types/css/property-descriptors/position'
import { read, writeFile, utils } from 'xlsx'
const dictData = useDictData() const dictData = useDictData()
defineOptions({ defineOptions({
name: 'govern/device/manage' name: 'govern/device/manage'
@@ -324,11 +321,6 @@ const init = async () => {
middleTitle = '' middleTitle = ''
} }
chartTitle.value = deviceData.value.itemName + '_' + middleTitle + '_' chartTitle.value = deviceData.value.itemName + '_' + middleTitle + '_'
// +
// indexOptions.value.find(item => {
// return item.id == searchForm.value.index[0]
// })?.name
searchForm.value.index.map((item: any, indexs: any) => { searchForm.value.index.map((item: any, indexs: any) => {
indexOptions.value.map((vv: any) => { indexOptions.value.map((vv: any) => {
if (vv.id == item) { if (vv.id == item) {
@@ -338,9 +330,10 @@ const init = async () => {
}) })
let lists: any = [] let lists: any = []
countData.value.map((item: any, index: any) => { countData.value.map((item: any, index: any) => {
console.log(item.count, '878888888')
lists[index] = { lists[index] = {
statisticalId: item.index, statisticalId: item.index,
frequencys: item.count frequencys: item.count&& item.count.length != 0 ?[ item.count] : []
} }
}) })
let obj = { let obj = {
@@ -699,7 +692,6 @@ const handleExport = async () => {
let csv = '' let csv = ''
csv = title csv = title
// 遍历数据并添加到CSV字符串中 // 遍历数据并添加到CSV字符串中
const listLength = list.length
list[0].data.map((vv: any, indexs: any) => { list[0].data.map((vv: any, indexs: any) => {
let strs = '', let strs = '',
count = null count = null
@@ -760,7 +752,7 @@ const initSearchFormIndexAndCount = (list: any) => {
vv.eleEpdPqdVOS.map((kk: any, kks: any) => { vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
if (kk.harmStart && kk.harmEnd) { if (kk.harmStart && kk.harmEnd) {
range(0, 0, 0) range(0, 0, 0)
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 2) countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
} }
}) })
} }
@@ -870,11 +862,6 @@ onMounted(() => {})
} }
} }
// #history_select::-webkit-scrollbar {
// width: 0 !important;
// display: none !important;
// }
.history_searchBtn { .history_searchBtn {
flex: 1; flex: 1;
display: flex; display: flex;