修改测试bug
This commit is contained in:
@@ -1,167 +1,86 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="title"
|
||||
draggable
|
||||
:style="{ width: popupType == 0 || popupType == 1 ? '500px' : '1100px' }"
|
||||
>
|
||||
<el-dialog v-model="dialogVisible" :title="title" draggable
|
||||
:style="{ width: popupType == 0 || popupType == 1 ? '500px' : '1100px' }">
|
||||
<!-- 新增方案数据 -->
|
||||
<el-form
|
||||
:model="form"
|
||||
scroll-to-error
|
||||
label-width="140px"
|
||||
:rules="rules1"
|
||||
ref="ruleFormRef1"
|
||||
class="form-one"
|
||||
v-if="popupType == 0 || popupType == 1"
|
||||
>
|
||||
<el-form :model="form" scroll-to-error label-width="140px" :rules="rules1" ref="ruleFormRef1" class="form-one"
|
||||
v-if="popupType == 0 || popupType == 1">
|
||||
<el-form-item label="方案名称:" prop="itemName">
|
||||
<el-input v-model="form.itemName" placeholder="请输入方案名称" />
|
||||
<el-input v-model="form.itemName" placeholder="请输入方案名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="方案描述:" prop="describe">
|
||||
<el-input type="textarea" v-model="form.describe" placeholder="请输入方案描述" />
|
||||
<el-input type="textarea" v-model="form.describe" placeholder="请输入方案描述" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 测试项信息&数据绑定页面 -->
|
||||
<el-tabs type="border-card" v-model="activeName" v-if="popupType != 0 && popupType != 1">
|
||||
<el-tab-pane label="测试项信息" :name="0" v-if="openType == 'tree'">
|
||||
<el-form
|
||||
:model="form1"
|
||||
ref="ruleFormRef2"
|
||||
scroll-to-error
|
||||
class="form-two"
|
||||
label-width="140px"
|
||||
:rules="rules2"
|
||||
>
|
||||
<el-form :model="form1" ref="ruleFormRef2" scroll-to-error class="form-two" label-width="140px"
|
||||
:rules="rules2">
|
||||
<el-form-item label="测试项名称:" prop="itemName">
|
||||
<el-input v-model="form1.itemName" placeholder="请输入测试项名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量间隔:" prop="statisticalInterval">
|
||||
<el-select
|
||||
v-model="form1.statisticalInterval"
|
||||
placeholder="请选择测量间隔"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in statisticalIntervalList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="form1.statisticalInterval" placeholder="请选择测量间隔" clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="(item, index) in statisticalIntervalList" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电压等级:" prop="voltageLevel">
|
||||
<el-select
|
||||
v-model="form1.voltageLevel"
|
||||
placeholder="请选择电压等级"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="changeVoltageLevel"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in voltageLevelList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="form1.voltageLevel" placeholder="请选择电压等级" clearable style="width: 100%"
|
||||
@change="changeVoltageLevel">
|
||||
<el-option v-for="(item, index) in voltageLevelList" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="接线方式:" prop="volConType">
|
||||
<el-select
|
||||
v-model="form1.volConType"
|
||||
placeholder="请选择接线方式"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in volConTypeList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="form1.volConType" placeholder="请选择接线方式" clearable style="width: 100%">
|
||||
<el-option v-for="(item, index) in volConTypeList" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小短路容量:" prop="capacitySscmin">
|
||||
<el-input
|
||||
v-model="form1.capacitySscmin"
|
||||
oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
<el-input v-model="form1.capacitySscmin" oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')"
|
||||
autocomplete="off"
|
||||
placeholder="请选择最小短路容量"
|
||||
>
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" autocomplete="off" placeholder="请选择最小短路容量">
|
||||
<template #append>MVA</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="用户协议容量:" prop="capacitySi">
|
||||
<el-input
|
||||
v-model="form1.capacitySi"
|
||||
autocomplete="off"
|
||||
oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
<el-input v-model="form1.capacitySi" autocomplete="off" oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')"
|
||||
placeholder="请输入用户协议容量"
|
||||
>
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" placeholder="请输入用户协议容量">
|
||||
<template #append>MVA</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="基准短路容量:" prop="capacitySscb">
|
||||
<el-input
|
||||
v-model="form1.capacitySscb"
|
||||
oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
<el-input v-model="form1.capacitySscb" oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')"
|
||||
placeholder="请输入基准短路容量"
|
||||
>
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" placeholder="请输入基准短路容量">
|
||||
<template #append>MVA</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="供电设备容量:" prop="capacitySt">
|
||||
<el-input
|
||||
v-model="form1.capacitySt"
|
||||
oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
<el-input v-model="form1.capacitySt" oninput="value=value.replace(/[^\-?\d.]/g,'')
|
||||
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')"
|
||||
placeholder="请输入供电设备容量"
|
||||
>
|
||||
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" placeholder="请输入供电设备容量">
|
||||
<template #append>MVA</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="PT变比:" prop="pt">
|
||||
<el-input
|
||||
style="width: 48%"
|
||||
v-model="form1.pt"
|
||||
autocomplete="off"
|
||||
placeholder="请输入PT变比"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')"
|
||||
/>
|
||||
<el-input
|
||||
style="width: 48%"
|
||||
v-model="form1.pt1"
|
||||
autocomplete="off"
|
||||
placeholder="请输入PT变比"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')"
|
||||
/>
|
||||
<el-input style="width: 48%" v-model="form1.pt" autocomplete="off" placeholder="请输入PT变比"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')" />
|
||||
<el-input style="width: 48%" v-model="form1.pt1" autocomplete="off" placeholder="请输入PT变比"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="CT变比:" prop="ct">
|
||||
<el-input
|
||||
v-model="form1.ct"
|
||||
style="width: 48%"
|
||||
autocomplete="off"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')"
|
||||
placeholder="请输入CT变比"
|
||||
/>
|
||||
<el-input
|
||||
v-model="form1.ct1"
|
||||
style="width: 48%"
|
||||
autocomplete="off"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')"
|
||||
placeholder="请输入CT变比"
|
||||
/>
|
||||
<el-input v-model="form1.ct" style="width: 48%" autocomplete="off"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="请输入CT变比" />
|
||||
<el-input v-model="form1.ct1" style="width: 48%" autocomplete="off"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="请输入CT变比" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测位置:" prop="location" style="width: 100%">
|
||||
<el-input type="textarea" v-model="form1.location" placeholder="请输入监测位置" />
|
||||
@@ -425,9 +344,9 @@ const unBindList = ref([])
|
||||
//已绑定数据tree
|
||||
const bindList = ref([])
|
||||
//0 新增方案 1 修改方案 2 新增测试项 3 修改测试项 4 设备信息
|
||||
const open = async (val: any, id: any) => {
|
||||
const open = async (val: any, id: any, name?: any) => {
|
||||
popupType.value = val
|
||||
title.value = val == 0 ? '新增方案' : val == 1 ? '修改方案' : val == 2 ? '新增测试项' : '修改测试项'
|
||||
title.value = val == 0 ? '新增方案' : val == 1 ? '修改方案' : val == 2 ? '新增测试项' : ('修改测试项' + '_' + name)
|
||||
dialogVisible.value = true
|
||||
planId.value = id
|
||||
//新增方案或者测试项数据
|
||||
@@ -578,11 +497,13 @@ defineExpose({ open, details, detailsType })
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
}
|
||||
|
||||
::v-deep .form-two {
|
||||
.el-select {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.button_info {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -599,6 +520,7 @@ defineExpose({ open, details, detailsType })
|
||||
width: 410px;
|
||||
border: 1px solid #eee;
|
||||
padding-right: 10px;
|
||||
|
||||
p {
|
||||
margin: 10px 10px 0 10px;
|
||||
font-weight: 800;
|
||||
|
||||
@@ -1,56 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
:style="{ width: menuCollapse ? '40px' : '280px' }"
|
||||
style="transition: all 0.3s; overflow: hidden; height: 100%"
|
||||
>
|
||||
<Icon
|
||||
v-show="menuCollapse"
|
||||
@click="onMenuCollapse"
|
||||
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||
:class="menuCollapse ? 'unfold' : ''"
|
||||
size="18"
|
||||
class="fold ml10 mt20 menu-collapse"
|
||||
style="cursor: pointer"
|
||||
/>
|
||||
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
||||
<div :style="{ width: menuCollapse ? '40px' : '280px' }"
|
||||
style="transition: all 0.3s; overflow: hidden; height: 100%">
|
||||
<Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse"
|
||||
style="cursor: pointer" />
|
||||
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1, display: menuCollapse ? 'none' : '' }">
|
||||
<div style="display: flex; align-items: center" class="mb10">
|
||||
<el-input v-model="filterText" placeholder="请输入内容" clearable>
|
||||
<template #prefix>
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
</template>
|
||||
</el-input>
|
||||
<Icon
|
||||
@click="onMenuCollapse"
|
||||
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||
:class="menuCollapse ? 'unfold' : ''"
|
||||
size="18"
|
||||
class="fold ml10 menu-collapse"
|
||||
style="cursor: pointer"
|
||||
/>
|
||||
<Icon name="el-icon-Plus" size="18"
|
||||
class="fold ml10 menu-collapse" style="cursor: pointer" @click="onAdd"/>
|
||||
<Icon @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 menu-collapse"
|
||||
style="cursor: pointer" />
|
||||
</div>
|
||||
<el-tree
|
||||
style="flex: 1; overflow: auto"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
:filter-node-method="filterNode"
|
||||
node-key="id"
|
||||
v-bind="$attrs"
|
||||
default-expand-all
|
||||
:data="tree"
|
||||
ref="treRef"
|
||||
@node-click="clickNode"
|
||||
:expand-on-click-node="false"
|
||||
>
|
||||
<el-tree style="flex: 1; overflow: auto" :props="defaultProps" highlight-current
|
||||
:filter-node-method="filterNode" node-key="id" v-bind="$attrs" default-expand-all :data="tree"
|
||||
ref="treRef" @node-click="clickNode" :expand-on-click-node="false">
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<div class="left">
|
||||
<Icon
|
||||
:name="data.icon"
|
||||
style="font-size: 16px"
|
||||
:style="{ color: data.color }"
|
||||
v-if="data.icon"
|
||||
/>
|
||||
<Icon :name="data.icon" style="font-size: 16px" :style="{ color: data.color }"
|
||||
v-if="data.icon" />
|
||||
<span>{{ node.label }}</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
@@ -59,6 +34,11 @@
|
||||
<Plus @click.stop="add(node, data)" />
|
||||
</el-icon>
|
||||
</a>
|
||||
<a :style="{ marginRight: '0.5rem' }" v-else>
|
||||
<el-icon :style="{ color: '#0000FF' }">
|
||||
<SetUp @click.stop="bind(node, data)" />
|
||||
</el-icon>
|
||||
</a>
|
||||
<a :style="{ marginRight: '0.5rem' }">
|
||||
<el-icon :style="{ color: '#DA3434' }">
|
||||
<Delete @click.stop="del(node, data)" />
|
||||
@@ -85,7 +65,7 @@ import { getSchemeTree, getTestRecordInfo } from '@/api/cs-device-boot/planData'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import useCurrentInstance from '@/utils/useCurrentInstance'
|
||||
import { ElTree } from 'element-plus'
|
||||
import { Plus, Edit, Delete } from '@element-plus/icons-vue'
|
||||
import { Plus, Edit, Delete ,SetUp} from '@element-plus/icons-vue'
|
||||
import { delRecord } from '@/api/cs-device-boot/planData'
|
||||
import popup from './popup.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
@@ -140,6 +120,16 @@ const chooseNode = (value: string, data: any, node: any) => {
|
||||
// 没匹配到返回false
|
||||
return false
|
||||
}
|
||||
// 新增方案
|
||||
const onAdd = () => {
|
||||
emit('onAdd')
|
||||
}
|
||||
// 绑定数据
|
||||
const bind = (node: any, data: any) => {
|
||||
console.log("🚀 ~ bind ~ data:", data)
|
||||
emit('bind',data)
|
||||
|
||||
}
|
||||
/** 树形结构数据 */
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
@@ -157,7 +147,7 @@ const props = withDefaults(
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits(['init', 'checkChange', 'nodeChange', 'editNode', 'getChart'])
|
||||
const emit = defineEmits(['init', 'checkChange', 'nodeChange', 'editNode', 'getChart','onAdd','bind'])
|
||||
const config = useConfig()
|
||||
const tree = ref()
|
||||
const treRef = ref()
|
||||
@@ -237,7 +227,7 @@ const edit = async (node: Node, data: any) => {
|
||||
handleOpen(3, planId.value)
|
||||
}
|
||||
})
|
||||
.catch(e => {})
|
||||
.catch(e => { })
|
||||
}
|
||||
/** 删除树节点 */
|
||||
const del = (node: Node, data: any) => {
|
||||
@@ -252,7 +242,7 @@ const del = (node: Node, data: any) => {
|
||||
delRecord({ id: data.id }).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage.success('删除成功')
|
||||
id.value=null
|
||||
id.value = null
|
||||
getTreeList()
|
||||
}
|
||||
})
|
||||
@@ -265,7 +255,7 @@ const del = (node: Node, data: any) => {
|
||||
})
|
||||
}
|
||||
//取消删除
|
||||
const cancelDel = () => {}
|
||||
const cancelDel = () => { }
|
||||
const clickNode = (e: anyObj) => {
|
||||
e?.children ? (planId.value = e.id) : (planId.value = e.pid)
|
||||
id.value = e.id
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<div class="default-main device-manage" :style="{ height: pageHeight.height }">
|
||||
<!-- @node-change="nodeClick" -->
|
||||
<schemeTree @node-change="nodeClick" @node-click="nodeClick" @init="nodeClick" ref="schemeTreeRef"></schemeTree>
|
||||
<schemeTree @node-change="nodeClick" @node-click="nodeClick" @init="nodeClick" @onAdd="onAdd" @bind="bind"
|
||||
ref="schemeTreeRef"></schemeTree>
|
||||
<div class="device-manage-right" v-if="deviceData">
|
||||
<el-descriptions title="方案信息" :column="2" border>
|
||||
<template #extra>
|
||||
<!-- <template #extra>
|
||||
<el-button type="primary" icon="el-icon-Plus" @click="handleOpen(0)">新增方案</el-button>
|
||||
</template>
|
||||
</template> -->
|
||||
<el-descriptions-item label="方案名称" width="60">
|
||||
{{ deviceData.itemName }}
|
||||
</el-descriptions-item>
|
||||
@@ -83,11 +84,11 @@
|
||||
<el-descriptions-item label="监测位置" width="160">
|
||||
{{ item.location }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作" width="160">
|
||||
<!-- <el-descriptions-item label="操作" width="160">
|
||||
<el-button type="primary" icon="el-icon-Tools" @click="handleOpen(3)">
|
||||
数据绑定
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -128,7 +129,7 @@
|
||||
<el-form-item for="-" v-for="(item, index) in countData" :key="index"
|
||||
:label="item.name.includes('次数') ? item.name : item.name.includes('幅值') ? item.name.slice(0, -2) + '次数' : item.name + '谐波次数'"
|
||||
v-show="item.countOptions.length != 0">
|
||||
|
||||
|
||||
<el-select v-model="item.count" collapse-tags collapse-tags-tooltip
|
||||
placeholder="请选择谐波次数" style="width: 120px">
|
||||
<el-option v-for="vv in item.countOptions" :key="vv" :label="vv"
|
||||
@@ -171,7 +172,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getTestRecordInfo, getHistoryTrend } from '@/api/cs-device-boot/planData'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { queryStatistical } from '@/api/system-boot/csstatisticalset'
|
||||
import { TrendCharts, Plus, Platform } from '@element-plus/icons-vue'
|
||||
import { TrendCharts, Plus, Platform, } from '@element-plus/icons-vue'
|
||||
import { yMethod } from '@/utils/echartMethod'
|
||||
import { color, gradeColor3 } from '@/components/echarts/color'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
@@ -190,7 +191,7 @@ const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const volConTypeList = dictData.getBasicData('Dev_Connect')
|
||||
//值类型
|
||||
const pageHeight = mainHeight(20)
|
||||
const EcharHeight = ref(mainHeight(468))
|
||||
const EcharHeight = ref(mainHeight(448))
|
||||
const loading = ref(false)
|
||||
const searchForm: any = ref({})
|
||||
const typeOptions = [
|
||||
@@ -309,7 +310,13 @@ const onIndexChange = (val: any) => {
|
||||
}
|
||||
const dialogRef = ref()
|
||||
const dailogForm = ref()
|
||||
const handleOpen = (val: any) => {
|
||||
const onAdd = () => {
|
||||
handleOpen(0)
|
||||
}
|
||||
const bind = (data: any) => {
|
||||
handleOpen(3, data)
|
||||
}
|
||||
const handleOpen = (val: any, data?: any) => {
|
||||
if (!deviceData.value) {
|
||||
dialogRef.value.open(val, '')
|
||||
return
|
||||
@@ -321,18 +328,21 @@ const handleOpen = (val: any) => {
|
||||
})
|
||||
dialogRef.value.details(dailogForm.value)
|
||||
// deviceData.value.records[0].id
|
||||
let ids = ''
|
||||
|
||||
let ids: any = ''
|
||||
let name: any = ''
|
||||
//数据绑定
|
||||
if (val == 3) {
|
||||
ids = deviceData.value.records.find((item: any) => {
|
||||
return item.id == activeName.value
|
||||
})?.id
|
||||
ids = data?.id
|
||||
name = data?.name
|
||||
dialogRef.value.detailsType('table')
|
||||
} else {
|
||||
ids = ''
|
||||
name = ''
|
||||
dialogRef.value.detailsType('')
|
||||
}
|
||||
dialogRef.value.open(val, ids)
|
||||
|
||||
dialogRef.value.open(val, ids, name)
|
||||
}
|
||||
const echartsData = ref<any>(null)
|
||||
//加载echarts图表
|
||||
@@ -446,7 +456,7 @@ const init = (flag: boolean) => {
|
||||
if (item.phase == null) {
|
||||
key = item.unit
|
||||
} else {
|
||||
key = item.anotherName
|
||||
key = item.unit
|
||||
}
|
||||
if (!acc[key]) {
|
||||
acc[key] = []
|
||||
@@ -494,7 +504,7 @@ const init = (flag: boolean) => {
|
||||
// orient: 'vertical', // 垂直排列
|
||||
top: 5,
|
||||
right: 70,
|
||||
width: 400,
|
||||
width: 550,
|
||||
height: 50
|
||||
},
|
||||
grid: {
|
||||
@@ -547,7 +557,8 @@ const init = (flag: boolean) => {
|
||||
}
|
||||
if (chartsList.length > 0) {
|
||||
echartsData.value.yAxis = []
|
||||
unitList.forEach((item: any, index: any) => {
|
||||
let setList = [...new Set(unitList)];
|
||||
setList.forEach((item: any, index: any) => {
|
||||
if (index > 2) {
|
||||
echartsData.value.grid.right = (index - 1) * 80
|
||||
}
|
||||
@@ -808,35 +819,35 @@ const formatCountOptions = (list: any) => {
|
||||
const flag = ref(false)
|
||||
const selectChange = (e: boolean) => {
|
||||
flag.value = e
|
||||
console.log("🚀 ~ handleChange ~ activeColName.value:", activeColName.value, flag.value)
|
||||
|
||||
if (activeColName.value == '0') {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(512)
|
||||
EcharHeight.value = mainHeight(492)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(468)
|
||||
EcharHeight.value = mainHeight(448)
|
||||
}
|
||||
} else {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(342)
|
||||
EcharHeight.value = mainHeight(322)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(290)
|
||||
EcharHeight.value = mainHeight(280)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const handleChange = () => {
|
||||
console.log("🚀 ~ handleChange ~ activeColName.value:", activeColName.value, flag.value)
|
||||
if (activeColName.value == '0') {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(512)
|
||||
EcharHeight.value = mainHeight(492)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(468)
|
||||
EcharHeight.value = mainHeight(448)
|
||||
}
|
||||
} else {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(342)
|
||||
EcharHeight.value = mainHeight(322)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(290)
|
||||
EcharHeight.value = mainHeight(280)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user