|
|
@@ -19,37 +19,49 @@
|
|
|
<div class="basic-content">
|
|
|
<div class="basic-title">轴温监测曲线</div>
|
|
|
<div class="echart-box">
|
|
|
- <faultEchartLine :deviceId="deviceID" :deviceType="deviceType" :Type="'tempZw'" :addData="selectData.tempzw" :legendName="'轴温'" :echartColor="'#ff0000'"></faultEchartLine>
|
|
|
+ <faultEchartLine :warningMonitorRowIndex="warningMonitorRowIndex" :deviceId="deviceID"
|
|
|
+ :deviceType="deviceType" :Type="'tempZw'" :addData="tempzwValue" :legendName="'轴温'"
|
|
|
+ :echartColor="'#ff0000'"></faultEchartLine>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="basic-content">
|
|
|
<div class="basic-title">电机温度监测曲线</div>
|
|
|
<div class="echart-box">
|
|
|
- <faultEchartLine :deviceId="deviceID" :deviceType="deviceType" :Type="'tempDj'" :addData="selectData.tempDj" :legendName="'电机温度'" :echartColor="'#2ec1dd'"></faultEchartLine>
|
|
|
+ <faultEchartLine :warningMonitorRowIndex="warningMonitorRowIndex" :deviceId="deviceID"
|
|
|
+ :deviceType="deviceType" :Type="'tempDj'" :addData="tempdjValue" :legendName="'电机温度'"
|
|
|
+ :echartColor="'#2ec1dd'"></faultEchartLine>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="basic-content">
|
|
|
<div class="basic-title">电流监测曲线</div>
|
|
|
<div class="echart-box">
|
|
|
- <faultEchartLine :deviceId="deviceID" :deviceType="deviceType" :Type="'Dl'" :addData="selectData.dl" :legendName="'电流'" :echartColor="'#fbc21c'"></faultEchartLine>
|
|
|
+ <faultEchartLine :warningMonitorRowIndex="warningMonitorRowIndex" :deviceId="deviceID"
|
|
|
+ :deviceType="deviceType" :Type="'Dl'" :addData="dlValue" :legendName="'电流'" :echartColor="'#fbc21c'">
|
|
|
+ </faultEchartLine>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="basic-content">
|
|
|
<div class="basic-title">电压监测曲线</div>
|
|
|
<div class="echart-box">
|
|
|
- <faultEchartLine :deviceId="deviceID" :deviceType="deviceType" :Type="'Dy'" :addData="selectData.dy" :legendName="'电压'" :echartColor="'#259745'"></faultEchartLine>
|
|
|
+ <faultEchartLine :warningMonitorRowIndex="warningMonitorRowIndex" :deviceId="deviceID"
|
|
|
+ :deviceType="deviceType" :Type="'Dy'" :addData="dyValue" :legendName="'电压'" :echartColor="'#259745'">
|
|
|
+ </faultEchartLine>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="basic-content">
|
|
|
+ <div class="basic-content">
|
|
|
<div class="basic-title">径向振动监测曲线</div>
|
|
|
<div class="echart-box">
|
|
|
- <faultEchartLine :deviceId="deviceID" :deviceType="deviceType" :Type="'jxzd'" :addData="selectData.jxzd" :legendName="'径向振动'" :echartColor="'#0fcb74'" ></faultEchartLine>
|
|
|
+ <faultEchartLine :warningMonitorRowIndex="warningMonitorRowIndex" :deviceId="deviceID"
|
|
|
+ :deviceType="deviceType" :Type="'jxzd'" :addData="jxzdValue" :legendName="'径向振动'" :echartColor="'#0fcb74'">
|
|
|
+ </faultEchartLine>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="basic-content">
|
|
|
+ <div class="basic-content">
|
|
|
<div class="basic-title">垂直振动监测曲线</div>
|
|
|
<div class="echart-box">
|
|
|
- <faultEchartLine :deviceId="deviceID" :deviceType="deviceType" :Type="'czzd'" :addData="selectData.czzd" :legendName="'垂直振动'" :echartColor="'#00a9ff'"></faultEchartLine>
|
|
|
+ <faultEchartLine :warningMonitorRowIndex="warningMonitorRowIndex" :deviceId="deviceID"
|
|
|
+ :deviceType="deviceType" :Type="'czzd'" :addData="czzdValue" :legendName="'垂直振动'" :echartColor="'#00a9ff'">
|
|
|
+ </faultEchartLine>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -57,14 +69,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { reactive, ref, watch } from 'vue'
|
|
|
+import { computed, reactive, ref, watch } from 'vue'
|
|
|
import faultEchartPie from './faultEchartPie.vue'
|
|
|
import faultEchartLine from './faultEchartLine.vue'
|
|
|
|
|
|
let props = defineProps({
|
|
|
+ //是否显示弹窗
|
|
|
isShowModal: {
|
|
|
type: Boolean
|
|
|
},
|
|
|
+ //当前激活风机索引
|
|
|
warningMonitorRowIndex: {
|
|
|
type: Number
|
|
|
},
|
|
|
@@ -74,19 +88,39 @@ let props = defineProps({
|
|
|
selectData: {
|
|
|
type: Object as any
|
|
|
},
|
|
|
- deviceID:{
|
|
|
- type:String
|
|
|
+ deviceID: {
|
|
|
+ type: String
|
|
|
},
|
|
|
- deviceType:{
|
|
|
- type:String
|
|
|
+ deviceType: {
|
|
|
+ type: String
|
|
|
}
|
|
|
})
|
|
|
|
|
|
let visible = ref(false)
|
|
|
let title = ref('主风机故障诊断分析')
|
|
|
-let faultList = ref<any[]>([])
|
|
|
-let normalNum=ref(0)//正常测点数量
|
|
|
-let abnormalNum=ref(0)//异常测点数量
|
|
|
+let faultList = ref<any[]>([])//异常信息列表
|
|
|
+let normalNum = ref(0)//正常测点数量
|
|
|
+let abnormalNum = ref(0)//
|
|
|
+
|
|
|
+let tempzwValue = computed(() => {
|
|
|
+ return props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Tempzw'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Tempzw'] : ''
|
|
|
+}) //实时轴温
|
|
|
+let tempdjValue = computed(() => {
|
|
|
+ return props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Tempdj'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Tempdj'] : ''
|
|
|
+}) //实时电机温度
|
|
|
+let dlValue = computed(() => {
|
|
|
+ return props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Dl'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Dl'] : ''
|
|
|
+}) //实时电流
|
|
|
+let dyValue = computed(() => {
|
|
|
+ return props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Dy'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Dy'] : ''
|
|
|
+}) //实时电压
|
|
|
+let jxzdValue = computed(() => {
|
|
|
+ return props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Jxzd'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Jxzd'] : ''
|
|
|
+}) //实时径向振动
|
|
|
+let czzdValue = computed(() => {
|
|
|
+ return props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Czzd'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Czzd'] : ''
|
|
|
+}) //实时垂直振动
|
|
|
+
|
|
|
let $emit = defineEmits(['handlerClose'])
|
|
|
|
|
|
|
|
|
@@ -99,18 +133,18 @@ watch(() => props.isShowModal, (newV, oldV) => {
|
|
|
visible.value = newV
|
|
|
})
|
|
|
|
|
|
-watch(() => props.rightColumns, (newV, oldV) => {
|
|
|
- if (newV.length) {
|
|
|
+watch(() => props.warningMonitorRowIndex, (newV, oldV) => {
|
|
|
+ if (props.rightColumns.length) {
|
|
|
let dataList: any[] = []
|
|
|
console.log(newV, 'new===')
|
|
|
- newV.forEach((el) => {
|
|
|
+ props.rightColumns.forEach((el) => {
|
|
|
if (el.dataIndex.startsWith('Fan')) {
|
|
|
- if (props.warningMonitorRowIndex == 0 && props.selectData[el.dataIndex.replace('Fan', 'Fan1')] == '0') {
|
|
|
+ if (newV == 0 && props.selectData[el.dataIndex.replace('Fan', 'Fan1')] == '0') {
|
|
|
//&& props.selectData[el.dataIndex.replace('Fan', 'Fan1')] != undefined
|
|
|
dataList.push({ label: el.title })
|
|
|
- } else if (props.warningMonitorRowIndex == 1 && props.selectData[el.dataIndex.replace('Fan', 'Fan2')] != undefined && props.selectData[el.dataIndex.replace('Fan', 'Fan2')] != '0') {
|
|
|
+ } else if (newV == 1 && props.selectData[el.dataIndex.replace('Fan', 'Fan2')] != undefined && props.selectData[el.dataIndex.replace('Fan', 'Fan2')] != '0') {
|
|
|
dataList.push({ label: el.title })
|
|
|
- } else if (props.warningMonitorRowIndex == 2 && props.selectData[el.dataIndex.replace('Fan', 'Fan3')] != undefined && props.selectData[el.dataIndex.replace('Fan', 'Fan3')] != '0') {
|
|
|
+ } else if (newV == 2 && props.selectData[el.dataIndex.replace('Fan', 'Fan3')] != undefined && props.selectData[el.dataIndex.replace('Fan', 'Fan3')] != '0') {
|
|
|
dataList.push({ label: el.title })
|
|
|
}
|
|
|
} else {
|
|
|
@@ -120,8 +154,8 @@ watch(() => props.rightColumns, (newV, oldV) => {
|
|
|
}
|
|
|
})
|
|
|
faultList.value = dataList
|
|
|
- abnormalNum.value=dataList.length
|
|
|
- normalNum.value=newV.length - dataList.length
|
|
|
+ abnormalNum.value = dataList.length
|
|
|
+ normalNum.value = props.rightColumns.length - dataList.length
|
|
|
console.log(dataList, 'dataList===')
|
|
|
}
|
|
|
}, { immediate: true })
|
|
|
@@ -171,6 +205,7 @@ watch(() => props.rightColumns, (newV, oldV) => {
|
|
|
justify-content: space-between;
|
|
|
flex-wrap: wrap;
|
|
|
overflow-y: auto;
|
|
|
+
|
|
|
.basic-content {
|
|
|
width: calc(50% - 5px);
|
|
|
height: 240px;
|