数据方案-设备信息联调
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="default-main device-manage" :style="{ height: pageHeight.height }" v-loading="loading">
|
||||
<schemeTree @node-click="nodeClick" @init="nodeClick" @node-change="nodeClick" ref="schemeTreeRef"></schemeTree>
|
||||
<!-- @node-change="nodeClick" -->
|
||||
<schemeTree @node-click="nodeClick" @init="nodeClick" ref="schemeTreeRef"></schemeTree>
|
||||
<div class="device-manage-right" v-if="deviceData">
|
||||
<el-descriptions title="方案信息" class="mb10" :column="4" border>
|
||||
<template #extra>
|
||||
@@ -69,7 +70,7 @@
|
||||
<!-- <el-button type="primary" size="small" icon="el-icon-EditPen" @click="handleOpen(3)">
|
||||
修改
|
||||
</el-button> -->
|
||||
<el-button type="primary" size="small" icon="el-icon-InfoFilled" @click="handleOpen(6)">
|
||||
<el-button type="primary" size="small" icon="el-icon-InfoFilled" @click="openDevice">
|
||||
设备信息
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
@@ -77,38 +78,37 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<div class="history_title">
|
||||
<p>历史趋势</p>
|
||||
</div>
|
||||
<div class="history_header">
|
||||
<el-form :model="form" class="history_select">
|
||||
<el-form-item label="统计指标">
|
||||
<el-select v-model="form.index" placeholder="请选择统计指标" clearable>
|
||||
<el-select @change="init" v-model="form.index" placeholder="请选择统计指标">
|
||||
<el-option
|
||||
v-for="item in rankOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in indexOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="值类型">
|
||||
<el-select v-model="form.type" placeholder="请选择值类型" clearable>
|
||||
<el-select v-model="form.type" placeholder="请选择值类型">
|
||||
<el-option
|
||||
v-for="item in rankOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in typeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="history_searchBtn">
|
||||
<el-button type="primary" size="small" icon="el-icon-Search" @click="handleSearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-Download" @click="handleExport">
|
||||
<el-button type="primary" icon="el-icon-Search" @click="handleSearch">查询</el-button>
|
||||
<!-- <el-button type="primary" size="small" icon="el-icon-Download" @click="handleExport">
|
||||
报表导出
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="title">
|
||||
@@ -140,6 +140,7 @@
|
||||
</div>
|
||||
<el-empty v-else description="请选择设备" class="device-manage-right" />
|
||||
<MangePopup ref="mangePopup" />
|
||||
<device ref="deviceRef"></device>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -151,13 +152,14 @@ import { queryByCode, queryByid, queryCsDictTree } from '@/api/system-boot/dictT
|
||||
import { getDeviceData } from '@/api/cs-device-boot/EquipmentDelivery'
|
||||
// import { getTargetById } from '@/api/cs-device-boot/csDatalistay'
|
||||
import { getGroup } from '@/api/cs-device-boot/csGroup'
|
||||
import { ref, reactive, onMounted,provide } from 'vue'
|
||||
import { ref, reactive, onMounted, provide, nextTick } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getDeviceDataTrend } from '@/api/cs-harmonic-boot/datatrend'
|
||||
import { getTestRecordInfo, getHistoryTrend } from '@/api/cs-device-boot/planData'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import device from './components/device.vue'
|
||||
const dictData = useDictData()
|
||||
defineOptions({
|
||||
name: 'govern/device/manage'
|
||||
@@ -166,55 +168,80 @@ defineOptions({
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage')
|
||||
//接线方式
|
||||
const volConTypeList = dictData.getBasicData('Dev_Connect')
|
||||
//统计指标
|
||||
|
||||
//值类型
|
||||
|
||||
const pageHeight = mainHeight(20)
|
||||
const loading = ref(true)
|
||||
const form = ref({})
|
||||
// const indexOptions = [
|
||||
// {
|
||||
// id: '1',
|
||||
// name: '相电压有效值'
|
||||
// },
|
||||
// {
|
||||
// id: '2',
|
||||
// name: '线电压有效值'
|
||||
// },
|
||||
// {
|
||||
// id: '3',
|
||||
// name: '电压偏差'
|
||||
// },
|
||||
// {
|
||||
// id: '4',
|
||||
// name: '三相电压不平衡'
|
||||
// }
|
||||
// ]
|
||||
const typeOptions = [
|
||||
{
|
||||
id: '1',
|
||||
name: '最大值'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '最小值'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '平均值'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: 'CP95'
|
||||
}
|
||||
]
|
||||
form.value = {
|
||||
index: '',
|
||||
type: ''
|
||||
type: typeOptions[0].id
|
||||
}
|
||||
const rankOptions = ref([
|
||||
{
|
||||
value: '1',
|
||||
label: '1级'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '2级'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '3级'
|
||||
}
|
||||
])
|
||||
//统计指标
|
||||
const indexOptions: any = ref([])
|
||||
queryByCode('portable-harmonic').then(res => {
|
||||
queryByid(res.data.id).then(item => {
|
||||
indexOptions.value = item.data
|
||||
form.value.index=indexOptions.value[0].id
|
||||
})
|
||||
})
|
||||
const activeName: any = ref()
|
||||
const deviceData: any = ref([])
|
||||
const schemeTreeRef = ref(null)
|
||||
const chartsDataList: any = ref([])
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
// if (!e) {
|
||||
// loading.value = false
|
||||
// return
|
||||
// }
|
||||
// if (e.level == 2) {
|
||||
loading.value = true
|
||||
deviceData.value = []
|
||||
// if (e?.id) {
|
||||
|
||||
// }
|
||||
//查询测试项信息
|
||||
try {
|
||||
await getTestRecordInfo(e.id).then(res => {
|
||||
deviceData.value = res.data
|
||||
loading.value = false
|
||||
activeName.value = res.data.records[0]?.itemName
|
||||
schemeTreeRef.value.getPlanData(deviceData.value)
|
||||
activeName.value = res.data.records[0]?.itemName
|
||||
schemeTreeRef.value.getPlanData(deviceData.value)
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
loading.value = false
|
||||
}
|
||||
try {
|
||||
//查询历史趋势
|
||||
const historyData = {
|
||||
devId: e.id,
|
||||
statisticalId: '11aaa206ba82c5b68b7339fe60e22945',
|
||||
@@ -228,9 +255,11 @@ const nodeClick = async (e: anyObj) => {
|
||||
} catch (error) {
|
||||
loading.value = false
|
||||
}
|
||||
//查询历史趋势
|
||||
}
|
||||
|
||||
const deviceRef = ref()
|
||||
const openDevice = () => {
|
||||
deviceRef.value.open(deviceData.value.records[0].id)
|
||||
}
|
||||
const mangePopup = ref()
|
||||
const handleOpen = (val: any) => {
|
||||
mangePopup.value.open(val, deviceData.value.records[0].id)
|
||||
@@ -255,9 +284,20 @@ const init = () => {
|
||||
title: [
|
||||
{
|
||||
left: 'center',
|
||||
text: '10KV 母线_监测点 相电压有效值'
|
||||
text:
|
||||
'10KV 母线_监测点 ' +
|
||||
indexOptions.value.find(item => {
|
||||
return item.id == form.value.index
|
||||
})?.name
|
||||
}
|
||||
],
|
||||
toolbox: {
|
||||
feature: {
|
||||
saveAsImage: {
|
||||
title: '保存'
|
||||
}
|
||||
}
|
||||
},
|
||||
// backgroundColor: '#1B232E',
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@@ -296,7 +336,7 @@ const init = () => {
|
||||
fontSize: 14
|
||||
},
|
||||
top: 0,
|
||||
right: 50,
|
||||
left: 50,
|
||||
itemWidth: 20,
|
||||
itemHeight: 10,
|
||||
itemGap: 15
|
||||
|
||||
Reference in New Issue
Block a user