fix:修改枚举 新风系统
This commit is contained in:
@@ -26,10 +26,10 @@
|
||||
<div style="margin-top: 4px"> {{ dataSource.type === '地暖' ? '设置' : '风量' }} </div>
|
||||
<div style="margin-top: -5px">
|
||||
<span style="font-size: 18px; color: #0dffff; font-style: italic">
|
||||
{{ dataSource.type === '地暖' ? dataSource.setUpNumber : '18' }}
|
||||
{{ dataSource.type === '地暖' ? dataSource.setUpNumber : dataSource.airVol }}
|
||||
</span>
|
||||
<span style="font-size: 10px; margin-left: 5px">{{
|
||||
dataSource.type === '地暖' ? '℃' : 'm3/h'
|
||||
dataSource.type === '地暖' ? '℃' : dataSource.airVolUnit
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,7 +48,7 @@
|
||||
<span :style="{ fontSize: '18px', color: getColor(), fontStyle: 'italic' }">
|
||||
{{ dataSource.number }}
|
||||
</span>
|
||||
<span style="font-size: 10px; margin-left: 5px">℃</span>
|
||||
<span style="font-size: 10px; margin-left: 5px">{{ dataSource.numberUnit }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,22 +65,22 @@
|
||||
const props = defineProps({
|
||||
dataSource: {
|
||||
type: Object,
|
||||
default: () => ({ title: '', number: 0 }), // 假设默认值还包括number属性
|
||||
default: () => ({ title: '', converterTemp: 0 }), // 假设默认值还包括number属性
|
||||
},
|
||||
});
|
||||
const getSunUrl = () => {
|
||||
if (props.dataSource.number > 0 && props.dataSource.number < 20) {
|
||||
if (props.dataSource.converterTemp > 0 && props.dataSource.converterTemp < 20) {
|
||||
return sunGreen;
|
||||
} else if (props.dataSource.number >= 20 && props.dataSource.number < 30) {
|
||||
} else if (props.dataSource.converterTemp >= 20 && props.dataSource.converterTemp < 30) {
|
||||
return sunYellow;
|
||||
} else {
|
||||
return sunRed;
|
||||
}
|
||||
};
|
||||
const getColor = () => {
|
||||
if (props.dataSource.number > 0 && props.dataSource.number < 20) {
|
||||
if (props.dataSource.converterTemp > 0 && props.dataSource.converterTemp < 20) {
|
||||
return '#0dffa4';
|
||||
} else if (props.dataSource.number >= 20 && props.dataSource.number < 30) {
|
||||
} else if (props.dataSource.converterTemp >= 20 && props.dataSource.converterTemp < 30) {
|
||||
return '#f59a23';
|
||||
} else {
|
||||
return '#f36163';
|
||||
|
Reference in New Issue
Block a user