| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <template>
- <a-modal v-model:visible="visible" width="1200px" :title="title" centered destroyOnClose :footer="null" @cancel="handleCancel">
- <div class="basic-top">
- <div class="top-l">
- <faultEchartPie :normalNum="normalNum" :abnormalNum="abnormalNum" />
- </div>
- <div class="top-r">
- <div class="basic-title">异常测点信息</div>
- <div class="list-r">
- <div class="list-item" v-for="(item, index) in faultList" :key="index">
- <span style="margin-right: 5px; color: #f50707">{{ `${index + 1}.` }}</span>
- <span style="color: #f50707">{{ item.label }}</span>
- </div>
- </div>
- </div>
- </div>
- <div class="basic-bot">
- <div class="basic-content">
- <div class="basic-title">轴温监测曲线</div>
- <div class="echart-box">
- <faultEchartLine
- :selectData="selectData"
- :warningMonitorRowIndex="warningMonitorRowIndex"
- :deviceId="deviceID"
- :deviceType="deviceType"
- :Type="'tempZw'"
- :addData="tempzwValue"
- :legendName="'轴温'"
- :echartColor="'#ff0000'"
- />
- </div>
- </div>
- <div class="basic-content">
- <div class="basic-title">电机温度监测曲线</div>
- <div class="echart-box">
- <faultEchartLine
- :selectData="selectData"
- :warningMonitorRowIndex="warningMonitorRowIndex"
- :deviceId="deviceID"
- :deviceType="deviceType"
- :Type="'tempDj'"
- :addData="tempdjValue"
- :legendName="'电机温度'"
- :echartColor="'#2ec1dd'"
- />
- </div>
- </div>
- <div class="basic-content">
- <div class="basic-title">电流监测曲线</div>
- <div class="echart-box">
- <faultEchartLine
- :selectData="selectData"
- :warningMonitorRowIndex="warningMonitorRowIndex"
- :deviceId="deviceID"
- :deviceType="deviceType"
- :Type="'Dl'"
- :addData="dlValue"
- :legendName="'电流'"
- :echartColor="'#fbc21c'"
- />
- </div>
- </div>
- <div class="basic-content">
- <div class="basic-title">电压监测曲线</div>
- <div class="echart-box">
- <faultEchartLine
- :selectData="selectData"
- :warningMonitorRowIndex="warningMonitorRowIndex"
- :deviceId="deviceID"
- :deviceType="deviceType"
- :Type="'Dy'"
- :addData="dyValue"
- :legendName="'电压'"
- :echartColor="'#259745'"
- />
- </div>
- </div>
- <div class="basic-content">
- <div class="basic-title">径向振动监测曲线</div>
- <div class="echart-box">
- <faultEchartLine
- :selectData="selectData"
- :warningMonitorRowIndex="warningMonitorRowIndex"
- :deviceId="deviceID"
- :deviceType="deviceType"
- :Type="'jxzd'"
- :addData="jxzdValue"
- :legendName="'径向振动'"
- :echartColor="'#0fcb74'"
- />
- </div>
- </div>
- <div class="basic-content">
- <div class="basic-title">垂直振动监测曲线</div>
- <div class="echart-box">
- <faultEchartLine
- :selectData="selectData"
- :warningMonitorRowIndex="warningMonitorRowIndex"
- :deviceId="deviceID"
- :deviceType="deviceType"
- :Type="'czzd'"
- :addData="czzdValue"
- :legendName="'垂直振动'"
- :echartColor="'#00a9ff'"
- />
- </div>
- </div>
- </div>
- </a-modal>
- </template>
- <script setup lang="ts">
- 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,
- },
- rightColumns: {
- type: Array as any,
- },
- selectData: {
- type: Object as any,
- },
- deviceID: {
- 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 tempzwValue = computed(() => {
- return {
- y: props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Tempzw'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Tempzw'] : '',
- x: props.selectData['tTime'].substring(props.selectData['tTime'].lastIndexOf(' ')),
- };
- }); //实时轴温
- let tempdjValue = computed(() => {
- return {
- y: props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Tempdj'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Tempdj'] : '',
- x: props.selectData['tTime'].substring(props.selectData['tTime'].lastIndexOf(' ')),
- };
- }); //实时电机温度
- let dlValue = computed(() => {
- return {
- y: props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Dl'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Dl'] : '',
- x: props.selectData['tTime'].substring(props.selectData['tTime'].lastIndexOf(' ')),
- };
- }); //实时电流
- let dyValue = computed(() => {
- return {
- y: props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Dy'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Dy'] : '',
- x: props.selectData['tTime'].substring(props.selectData['tTime'].lastIndexOf(' ')),
- };
- }); //实时电压
- let jxzdValue = computed(() => {
- return {
- y: props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Jxzd'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Jxzd'] : '',
- x: props.selectData['tTime'].substring(props.selectData['tTime'].lastIndexOf(' ')),
- };
- }); //实时径向振动
- let czzdValue = computed(() => {
- return {
- y: props.warningMonitorRowIndex == 0 ? props.selectData['Fan1Czzd'] : props.warningMonitorRowIndex == 1 ? props.selectData['Fan2Czzd'] : '',
- x: props.selectData['tTime'].substring(props.selectData['tTime'].lastIndexOf(' ')),
- };
- }); //实时垂直振动
- let $emit = defineEmits(['handlerClose']);
- //弹窗关闭
- function handleCancel() {
- $emit('handlerClose', false);
- }
- watch(
- () => props.isShowModal,
- (newV, oldV) => {
- visible.value = newV;
- }
- );
- watch(
- () => props.warningMonitorRowIndex,
- (newV, oldV) => {
- // if (props.rightColumns.length) {
- // let dataList: any[] = []
- // props.rightColumns.forEach((el) => {
- // if (el.dataIndex.startsWith('Fan')) {
- // if (newV == 0 && props.selectData[el.dataIndex.replace('Fan', 'Fan1')] != undefined) {
- // dataList.push({ label: el.title })
- // } 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 (newV == 2 && props.selectData[el.dataIndex.replace('Fan', 'Fan3')] != undefined && props.selectData[el.dataIndex.replace('Fan', 'Fan3')] != '0') {
- // dataList.push({ label: el.title })
- // }
- // } else {
- // if (props.selectData[el.dataIndex] != undefined && props.selectData[el.dataIndex] != '0') {
- // dataList.push({ label: el.title })
- // }
- // }
- // })
- // faultList.value = dataList
- // abnormalNum.value = dataList.length
- // normalNum.value = props.rightColumns.length - dataList.length
- // console.log(dataList, 'dataList===')
- // }
- if (newV == 0) {
- faultList.value = [
- { label: '2025年8月13日 14:25:37 供风不足,疑似矿井阻力异常' },
- { label: '2025年8月13日 15:05:30 径向振动幅度增大,疑似轴承故障' },
- ];
- } else if (newV == 1) {
- faultList.value = [
- { label: '2025年8月13日 14:25:37 供风不足,疑似矿井阻力异常' },
- { label: '2025年8月13日 15:05:30 径向振动幅度增大,疑似轴承故障' },
- ];
- } else {
- faultList.value = [
- { label: '2025年8月13日 14:25:37 供风不足,疑似矿井阻力异常' },
- { label: '2025年8月13日 15:05:30 径向振动幅度增大,疑似轴承故障' },
- ];
- }
- abnormalNum.value = faultList.value.length;
- normalNum.value = 45;
- },
- { immediate: true }
- );
- </script>
- <style lang="less" scoped>
- .basic-top {
- width: calc(100% - 30px);
- height: 200px;
- margin: 10px;
- display: flex;
- .top-l {
- width: 320px;
- margin-right: 10px;
- }
- .top-r {
- width: calc(100% - 330px);
- }
- .list-r {
- height: calc(100% - 25px);
- padding: 0px 10px;
- box-sizing: border-box;
- overflow-y: auto;
- border: 1px solid #3062a2;
- }
- .list-item {
- margin: 5px 0px;
- }
- }
- .basic-title {
- height: 20px;
- line-height: 20px;
- font-weight: bold;
- margin-bottom: 5px;
- }
- .basic-bot {
- width: calc(100% - 30px);
- height: 400px;
- margin: 10px;
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- overflow-y: auto;
- .basic-content {
- width: calc(50% - 5px);
- height: 240px;
- margin-bottom: 10px;
- padding: 5px 10px;
- box-sizing: border-box;
- border: 1px solid #3062a2;
- }
- .echart-box {
- height: calc(100% - 25px);
- }
- }
- </style>
|