邓洁 : 大屏左侧变频器阀值判断
This commit is contained in:
@@ -104,18 +104,11 @@
|
||||
|
||||
<script setup>
|
||||
import * as echarts from "echarts";
|
||||
import {ref, reactive, onMounted, computed, watch} from "vue";
|
||||
const props = defineProps({
|
||||
list: Array
|
||||
list: Array,
|
||||
fanData:Array
|
||||
});
|
||||
const socketData = ref()
|
||||
watch(() => props.list, (now, old) => {
|
||||
// console.log('socketDatawatch', now, old)
|
||||
// socketData.value=now
|
||||
}, {deep: true});
|
||||
|
||||
onMounted(handleOnMounted);
|
||||
|
||||
// 一号风机echarts实例
|
||||
const info1 = ref(null);
|
||||
let Echarts_info1 = null;
|
||||
@@ -342,17 +335,21 @@ const option2 = {
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const fan01_option = reactive(option);
|
||||
const fan02_option = reactive(option2);
|
||||
|
||||
function handleOnMounted() {
|
||||
Echarts_info1 = echarts.init(info1.value);
|
||||
Echarts_info1.setOption(fan01_option);
|
||||
// 挂载二号风机实例
|
||||
Echarts_info2 = echarts.init(info2.value);
|
||||
Echarts_info2.setOption(fan02_option);
|
||||
}
|
||||
// 一号风机启动停止按钮
|
||||
const isStart = ref(true);
|
||||
const isStart2 = ref(false);
|
||||
// 功率是否自动
|
||||
let isSAuto1 = ref("false");
|
||||
let isSAuto2 = ref("false");
|
||||
watch(() => props.fanData, (now) => {
|
||||
getBasicData(now.frequencyChangerList)
|
||||
}, {deep: true});
|
||||
watch(() => props.list, (now) => {
|
||||
console.log('socketDatawatch', now, old)
|
||||
// socketData.value=now
|
||||
}, {deep: true});
|
||||
|
||||
watch(fan01_option, () => {
|
||||
Echarts_info1.setOption(fan01_option);
|
||||
@@ -361,8 +358,6 @@ watch(fan02_option, () => {
|
||||
Echarts_info2.setOption(fan02_option);
|
||||
});
|
||||
|
||||
// 一号风机启动停止按钮
|
||||
const isStart = ref(true);
|
||||
let state = computed(() => {
|
||||
return isStart.value ? "运行" : "故障";
|
||||
// return socketData[0].running ? "运行" : "故障";
|
||||
@@ -373,7 +368,6 @@ const stateIcon1 = computed(() =>
|
||||
: "red-state-icon.png"
|
||||
);
|
||||
|
||||
const isStart2 = ref(false);
|
||||
let state2 = computed(() => {
|
||||
return isStart2.value ? "运行" : "故障";
|
||||
});
|
||||
@@ -382,9 +376,30 @@ const stateIcon2 = computed(() =>
|
||||
? "blue-state-icon.png"
|
||||
: "red-state-icon.png"
|
||||
);
|
||||
// 功率是否自动
|
||||
let isSAuto1 = ref("false");
|
||||
let isSAuto2 = ref("false");
|
||||
|
||||
onMounted(()=>{
|
||||
handleOnMounted()
|
||||
});
|
||||
const getBasicData = (data) => {
|
||||
let tranObj = {}
|
||||
let tranArr = []
|
||||
data.map(item => {
|
||||
tranObj = {
|
||||
equipmentId: item.equipmentId
|
||||
}
|
||||
tranArr.push(tranObj)
|
||||
})
|
||||
socketData.value = tranArr
|
||||
}
|
||||
|
||||
const handleOnMounted=()=> {
|
||||
Echarts_info1 = echarts.init(info1.value);
|
||||
Echarts_info1.setOption(fan01_option);
|
||||
// 挂载二号风机实例
|
||||
Echarts_info2 = echarts.init(info2.value);
|
||||
Echarts_info2.setOption(fan02_option);
|
||||
}
|
||||
|
||||
const getImageUrl = (name) => {
|
||||
return new URL(`../../../assets/images/fanInfo/${name}`, import.meta.url).href
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="info">
|
||||
<div class="name-state">
|
||||
<div class="name">{{item.equipmentName}}</div>
|
||||
<div class="state" v-if="item.phaseCurrentB>'100'">
|
||||
<div class="state" v-if="stateA||stateB||stateC">
|
||||
<img src="@/assets/images/transducer/sp_icon_yc.png" alt=""/>
|
||||
<span style="color: red">异常</span>
|
||||
</div>
|
||||
@@ -33,9 +33,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="one-item">
|
||||
<div>A相电流:{{ item.phaseCurrentA }}A</div>
|
||||
<div :style="{'color':item.phaseCurrentB>'100'?'red':''}">B相电流:{{ item.phaseCurrentB }}A</div>
|
||||
<div>C相电流:{{ item.phaseCurrentC }}A</div>
|
||||
<div :style="{'color':stateA?'red':''}">A相电流:{{ item.phaseCurrentA }}A</div>
|
||||
<div :style="{'color':stateB?'red':''}">B相电流:{{ item.phaseCurrentB }}A</div>
|
||||
<div :style="{'color':stateC?'red':''}">C相电流:{{ item.phaseCurrentC }}A</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,7 +96,9 @@ watch(() => props.list, (now) => {
|
||||
})
|
||||
})
|
||||
}, {deep: true});
|
||||
|
||||
const stateA=ref(false)
|
||||
const stateB=ref(false)
|
||||
const stateC=ref(false)
|
||||
const getBasicData = (data) => {
|
||||
let tranObj = {}
|
||||
let tranArr = []
|
||||
@@ -105,11 +107,17 @@ const getBasicData = (data) => {
|
||||
equipmentId: item.equipmentId,
|
||||
equipmentName:item.equipmentName,
|
||||
phaseCurrentA: item.phaseCurrentA,
|
||||
phaseCurrentAThreshold: item.phaseCurrentAThreshold,
|
||||
phaseCurrentB: item.phaseCurrentB,
|
||||
phaseCurrentBThreshold: item.phaseCurrentBThreshold,
|
||||
phaseCurrentC: item.phaseCurrentC,
|
||||
phaseCurrentCThreshold: item.phaseCurrentCThreshold,
|
||||
frequencySetting: item.frequencySetting,
|
||||
frequencyFeedback: item.frequencyFeedback,
|
||||
}
|
||||
stateA.value=item.phaseCurrentA>item.phaseCurrentAThreshold
|
||||
stateB.value=item.phaseCurrentB>item.phaseCurrentBThreshold
|
||||
stateC.value=item.phaseCurrentC>item.phaseCurrentCThreshold
|
||||
tranArr.push(tranObj)
|
||||
})
|
||||
transducerData.value = tranArr
|
||||
|
||||
@@ -48,15 +48,13 @@
|
||||
<div class="arrow" @click="previousBtn"></div>
|
||||
<el-carousel height="150px" type="card" ref="tunnelBtn" :autoplay="false">
|
||||
<div class="btn">
|
||||
<el-carousel-item v-for="(item, index) in tunnelList" :key="item.value">
|
||||
<el-carousel-item v-for="item in tunnelList" :key="item.value">
|
||||
{{ item.name }}
|
||||
</el-carousel-item>
|
||||
</div>
|
||||
</el-carousel>
|
||||
<div class="arrow right" @click="nextBtn"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user