修改浙江无线测试用例bug
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<!-- @init="nodeClick" -->
|
||||
<PointTree @node-click="nodeClick" @pointTypeChange="pointTypeChange"></PointTree>
|
||||
<div class="device-control-right" v-if="deviceData">
|
||||
<el-descriptions title="监测点信息" class="mb10" :column="3" border>
|
||||
<el-descriptions title="监测点信息" class="mb10" width="180" :column="3" border>
|
||||
<template #extra>
|
||||
<!-- <el-button v-if="deviceType == '1'" type="primary" @click="handleDownLoadTemplate">
|
||||
模版下载
|
||||
@@ -21,24 +21,49 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<el-descriptions-item label="名称">
|
||||
{{ deviceData.name ? deviceData.name : '/' }}
|
||||
{{ devData.name || '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="测量间隔" width="160">
|
||||
{{ devData.lineInterval }}分钟
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压等级" width="160">
|
||||
{{ devData.volGrade }}kV
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接线方式" width="160">
|
||||
{{ devData.conType == 0 ? '星型接线' : devData.conType == 1 ? '角型接线' : devData.conType == 2 ? 'V型接线' : '/' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<!-- <el-descriptions-item label="安装位置" width="160">
|
||||
{{ devData.position || '/' }}
|
||||
</el-descriptions-item> -->
|
||||
|
||||
<el-descriptions-item label="PT变比" width="160">
|
||||
{{ devData.ptRatio || '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="CT变比" width="160">
|
||||
{{ devData.ctRatio || '/' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<!-- <el-descriptions-item label="名称">
|
||||
{{ devData.name ? devData.name : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="类型">
|
||||
{{ echoName(deviceData.devType, devTypeOptions) }}
|
||||
{{ echoName(devData.devType, devTypeOptions) }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="接入方式">
|
||||
{{ deviceData.devAccessMethod ? deviceData.devAccessMethod : '/' }}
|
||||
{{ devData.devAccessMethod ? devData.devAccessMethod : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="网络设备ID">
|
||||
{{ deviceData.ndid ? deviceData.ndid : '/' }}
|
||||
{{ devData.ndid ? devData.ndid : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型号">
|
||||
{{ echoName(deviceData.devModel, devModelOptions) }}
|
||||
{{ echoName(devData.devModel, devModelOptions) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接入日期">
|
||||
{{ deviceData.time ? deviceData.time : '/' }}
|
||||
</el-descriptions-item>
|
||||
{{ devData.time ? devData.time : '/' }}
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
<el-tabs v-model="dataSet" type="border-card" class="device-control-box-card" @tab-click="handleClick">
|
||||
<el-tab-pane lazy :label="item.name" :name="item.id" v-for="(item, index) in deviceData.dataSetList"
|
||||
@@ -110,15 +135,15 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源" v-if="dataSet.includes('_items')">
|
||||
<el-select v-model="formInline.targetType">
|
||||
<el-select v-model="formInline.dataSource" placeholder="请选择数据来源" clearable>
|
||||
|
||||
<el-option v-for="item in dataSource" :key="item.id" :label="item.name"
|
||||
<el-option v-for="item in dataSourceList" :key="item.id" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字" v-if="!dataSet.includes('_')">
|
||||
<el-input maxlength="32" show-word-limit v-model="searchValue"
|
||||
autocomplete="off" clearable @input="handleSearch" placeholder="请输入关键词"></el-input>
|
||||
<el-input maxlength="32" show-word-limit v-model="searchValue" autocomplete="off" clearable
|
||||
@input="handleSearch" placeholder="请输入关键词"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -139,7 +164,7 @@
|
||||
height: realTimeFlag ? '30px' : '40px',
|
||||
alignItems: realTimeFlag ? 'flex-end' : 'center'
|
||||
}" v-if="dataSet.includes('_realtimedata') && mqttMessage && mqttMessage.dataTime && sonTab != 2">
|
||||
<p>
|
||||
<p class="mb5">
|
||||
<span v-if="trendDataTime && !realTimeFlag">数据时间:{{ trendDataTime }}</span>
|
||||
<span v-if="realTimeFlag">数据时间:{{ mqttMessage.dataTime }}</span>
|
||||
</p>
|
||||
@@ -360,7 +385,7 @@
|
||||
<div v-if="!tableData" style="height: 42px"></div>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-empty v-else description="请选择设备" class="device-control-right" />
|
||||
<el-empty v-else description="请添加设备" class="device-control-right" />
|
||||
<Detail ref="detailRef" :detail="detail" @close="detail = null" :dataLevel="dataLevel" v-if="detail"></Detail>
|
||||
<!-- 离线数据导入组件 -->
|
||||
<!-- <offLineDataImport ref="offLineDataImportRef"></offLineDataImport> -->
|
||||
@@ -379,6 +404,7 @@ import {
|
||||
getHarmRealData,
|
||||
getOverLimitData,
|
||||
queryDictType,
|
||||
getById
|
||||
|
||||
} from '@/api/cs-device-boot/EquipmentDelivery'
|
||||
import { deviceHisData, deviceRtData, realTimeData, getTestData } from '@/api/cs-device-boot/csGroup'
|
||||
@@ -394,6 +420,7 @@ import offLineDataImport from './offLineDataImport/index.vue'
|
||||
import Event from './tabs/event.vue'
|
||||
import nearRealTimeData from './nearRealTimeData.vue'
|
||||
import testItemRecords from './testItemRecords.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
@@ -401,7 +428,7 @@ import { Histogram, TrendCharts, DataLine, DataAnalysis, Odometer, Monitor, Time
|
||||
import analysisList from './analysisList/index.vue'
|
||||
import mqtt from 'mqtt'
|
||||
defineOptions({
|
||||
name: 'govern/device/control'
|
||||
// name: 'govern/device/control'
|
||||
})
|
||||
const adminInfo = useAdminInfo()
|
||||
const pageHeight = mainHeight(20)
|
||||
@@ -432,8 +459,16 @@ const formInline = reactive({
|
||||
id: '',
|
||||
lineId: '',
|
||||
targetType: '',
|
||||
dataSource: '',
|
||||
dataLevel: 'Secondary'
|
||||
})
|
||||
const dataSourceList = [{
|
||||
id: '0',
|
||||
name: '补召'
|
||||
}, {
|
||||
id: '1',
|
||||
name: '在线监测'
|
||||
}]
|
||||
const oddAndEvenList = [
|
||||
{
|
||||
value: '3',
|
||||
@@ -455,6 +490,11 @@ const detail = ref<any>(null)
|
||||
const realTimeFlag = ref(true)
|
||||
//实时数据子菜单
|
||||
const sonTab = ref()
|
||||
const dictData = useDictData()
|
||||
//电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//接线方式
|
||||
const volConTypeList = dictData.getBasicData('Dev_Connect')
|
||||
//实时录波
|
||||
// const handleRecordWaves = () => {
|
||||
// realTimeFlag.value = false
|
||||
@@ -645,12 +685,17 @@ const handleaddDevice = () => {
|
||||
}
|
||||
//树节点点击事件
|
||||
const deviceId: any = ref('')
|
||||
const devData: any = ref({})
|
||||
const lineId: any = ref('')
|
||||
const dataLevel: any = ref('')
|
||||
const dataSource = ref([])
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
// console.log("🚀 ~ nodeClick ~ e:", e)
|
||||
if (e.level == 2) return
|
||||
console.log("🚀 ~ nodeClick ~ e:", e)
|
||||
|
||||
|
||||
if (e==undefined || e.level == 2){
|
||||
return loading.value = false
|
||||
}
|
||||
searchValue.value = ''
|
||||
await queryDictType({
|
||||
lineId: e?.id,
|
||||
@@ -676,6 +721,10 @@ const nodeClick = async (e: anyObj) => {
|
||||
formInline.lineId = e.level == 3 ? e.id : e.children[0].id
|
||||
await getDeviceData(e.level == 3 ? e.pid : e.id, 'history', e.level == 3 ? e.id : e.children[0].id)
|
||||
.then((res: any) => {
|
||||
getById({ lineId: e.level == 3 ? e.id : e.children[0].id }).then((res: any) => {
|
||||
|
||||
devData.value = res.data
|
||||
})
|
||||
|
||||
deviceData.value = res.data
|
||||
formInline.dataLevel = res.data.dataLevel
|
||||
@@ -784,6 +833,7 @@ const getRealDataMqttMsg = async () => {
|
||||
// JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
||||
// )
|
||||
let obj = JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
||||
// console.log("🚀 ~ mqttRef.value.on ~ obj:", obj)
|
||||
if (lineId.value != obj.lineId && adminInfo.userIndex != obj.userId) return
|
||||
// console.log("🚀 ~ mqttRef.value.on ~ obj:", obj)
|
||||
// console.log("🚀 ~ mqttRef.value.on ~ formInline.dataLevel:", obj.dataLevel, formInline.dataLevel)
|
||||
|
||||
Reference in New Issue
Block a user