Merge pull request 'fix : 修改风机状态bug' (#286) from dengjie into dev

Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/286
This commit is contained in:
2024-03-01 08:05:17 +00:00
3 changed files with 24 additions and 21 deletions

View File

@@ -13,9 +13,9 @@
<div class="fan-name">{{ changeNum(item) }}号风机</div>
<div class="option-nav">
<div class="state">
<div class="blue-state" :class="{ stopColor: item.breakdown }">
<div :style="{ backgroundImage: 'url(' +getImageUrl(item.breakdown)+')' }" class="state-icon"></div>
状态<span class="fan-state">{{ item.breakdown ? '故障' : '运行' }}</span>
<div class="blue-state" :class="{ stopColor:changeStopColor(item.breakdown,item.running)}">
<div class="state-icon"></div>
状态<span class="fan-state">{{ item.breakdown ? '故障' : item.running ? '运行' : '故障' }}</span>
</div>
<div class="switch">
<div
@@ -314,11 +314,11 @@ const getFanInfo = (equipmentId, type = 'day', time = '') => {
})
}
const handleOpenChart = (item) => {
nextTick(()=>{
if(chooseMonthRef.value){
nextTick(() => {
if (chooseMonthRef.value) {
chooseMonthRef.value.clearData()
}
if(chooseDayRef.value){
if (chooseDayRef.value) {
chooseDayRef.value.clearData()
}
})
@@ -363,10 +363,10 @@ const getImage = (type) => {
}
}
const changeNum = (item) => {
switch (item.equipmentId) {
case 22:
switch (item.equipmentName) {
case '1号变频器':
return '一';
case 23:
case '2号变频器':
return '二';
}
}
@@ -511,10 +511,13 @@ const handleOnMounted = () => {
fan01_option && Echarts_info1.setOption(fan01_option);
}
}
const getImageUrl = (name) => {
let icon = getImage(name)
return new URL(`../../../assets/images/fanInfo/${icon}`, import.meta.url).href
const changeStopColor = (breakdown, running) => {
console.log('breakdown,running', breakdown, running)
if (breakdown) {
return true
} else {
return !running;
}
}
/**
* 初始化echarts实例方法

View File

@@ -174,10 +174,10 @@ async function handleMounted() {
return
} else {
console.log(err);
ElMessage({
message: "场景初始化异常---",
type: "warning",
});
// ElMessage({
// message: "场景初始化异常---",
// type: "warning",
// });
}
}
}

View File

@@ -117,10 +117,10 @@ async function handleMounted() {
demo.SignsInf(params.form.tunnelAlias, String(params.tunnelLength))
} catch (err) {
console.log(err);
ElMessage({
message: "场景初始化异常---",
type: "warning",
});
// ElMessage({
// message: "场景初始化异常---",
// type: "warning",
// });
}
}