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