fix : 风机区域细节优化
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<!-- 功能 -->
|
||||
<div class="option-nav">
|
||||
<div>
|
||||
<div class="state">
|
||||
<div class="state" :class="{changeMargin: item.showTooltip}">
|
||||
<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>
|
||||
@@ -45,22 +45,28 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="edit-power">
|
||||
<span style="color: white">给定频率</span>
|
||||
<!-- <span class="units"-->
|
||||
<!-- ><input-->
|
||||
<!-- type="number"-->
|
||||
<!-- min="0"-->
|
||||
<!-- v-model="item.frequencySetting"-->
|
||||
<!-- onchange="changeFrequency(item)"-->
|
||||
<!-- :disabled="item.autoMode"-->
|
||||
<!-- /></span>-->
|
||||
<el-input type="number" min="0" v-model="item.frequencySetting" :disabled="item.autoMode"
|
||||
@change="changeFrequency(item)">
|
||||
<template #suffix>
|
||||
<span>Hz</span>
|
||||
</template>
|
||||
</el-input>
|
||||
<div>
|
||||
<span style="color: white">给定频率</span>
|
||||
<!-- <span class="units"-->
|
||||
<!-- ><input-->
|
||||
<!-- type="number"-->
|
||||
<!-- min="0"-->
|
||||
<!-- v-model="item.frequencySetting"-->
|
||||
<!-- onchange="changeFrequency(item)"-->
|
||||
<!-- :disabled="item.autoMode"-->
|
||||
<!-- /></span>-->
|
||||
<el-input type="number" min="0" v-model="item.frequencySetting" :disabled="item.autoMode" title=""
|
||||
@change="changeFrequency(item)" @focus="item.showTooltip=true" @blur="item.showTooltip=false">
|
||||
<template #suffix>
|
||||
<span>Hz</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<span v-if="item.showTooltip">
|
||||
正在输入中...
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -122,8 +128,7 @@ import {
|
||||
editFrequencyOperationSwitch,
|
||||
getFanEchartsInfo
|
||||
} from "@/api/largeScreen";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import {removeToken} from "../../../utils/auth";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
const selectTimeButton = ref(2);
|
||||
@@ -201,11 +206,11 @@ watch(() => props.list, (now) => {
|
||||
}, {deep: true});
|
||||
const timeSelect = (index) => {
|
||||
if (index === 0) {
|
||||
getFanInfo(openEquipmentId.value,'years')
|
||||
getFanInfo(openEquipmentId.value, 'years')
|
||||
} else if (index === 1) {
|
||||
getFanInfo(openEquipmentId.value,'month')
|
||||
getFanInfo(openEquipmentId.value, 'month')
|
||||
} else if (index === 2) {
|
||||
getFanInfo(openEquipmentId.value,'day')
|
||||
getFanInfo(openEquipmentId.value, 'day')
|
||||
}
|
||||
};
|
||||
const packageData = (item, type, flag) => {
|
||||
@@ -230,27 +235,44 @@ const packageData = (item, type, flag) => {
|
||||
}
|
||||
}
|
||||
//启动/停止
|
||||
const editOperate = (item,type) => {
|
||||
ElMessageBox.confirm(`是否${type}该风机?`,'系统提示',{
|
||||
const editOperate = (item, type) => {
|
||||
ElMessageBox.confirm(`是否${type}该风机?`, '系统提示', {
|
||||
type: 'warning',
|
||||
closeOnClickModal: false
|
||||
}).then(()=>{
|
||||
}).then(() => {
|
||||
const data = packageData(item, item.running)
|
||||
editFrequencyOperationSwitch(data).then(res => {
|
||||
console.log('修改风机启动', res)
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const changeFrequency = (item) => {
|
||||
console.log('修改频率')
|
||||
const data = packageData(item, item.frequencySetting, true)
|
||||
editFrequency(data).then(res => {
|
||||
console.log('修改风机频率', res)
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
} else {
|
||||
ElMessage.warning(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const changeModel = (item) => {
|
||||
const data = packageData(item, item.autoMode)
|
||||
editFrequencyModelSwitch(data).then(res => {
|
||||
console.log('修改自动模式', res)
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
} else {
|
||||
ElMessage.warning(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const getFanInfo = (equipmentId, type = 'day') => {
|
||||
@@ -268,10 +290,10 @@ const getFanInfo = (equipmentId, type = 'day') => {
|
||||
const handleOpenChart = (item) => {
|
||||
openEquipmentId.value = item.equipmentId
|
||||
getFanInfo(item.equipmentId, 'day')
|
||||
if(item.equipmentId===22){
|
||||
fanIndex.value='一'
|
||||
}else {
|
||||
fanIndex.value='二'
|
||||
if (item.equipmentId === 22) {
|
||||
fanIndex.value = '一'
|
||||
} else {
|
||||
fanIndex.value = '二'
|
||||
}
|
||||
}
|
||||
const getTransData = (data) => {
|
||||
@@ -325,6 +347,7 @@ const getBasicData = (data) => {
|
||||
autoMode: item.autoMode,//自动模式
|
||||
breakdown: item.breakdown,//故障
|
||||
running: item.running,//启动,
|
||||
showTooltip:false,
|
||||
frequencyFeedback: item.frequencyFeedback,
|
||||
frequencySetting: item.frequencySetting
|
||||
}
|
||||
@@ -789,15 +812,17 @@ input[type="number"] {
|
||||
}
|
||||
|
||||
.option-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
//display: flex;
|
||||
//flex-direction: column;
|
||||
width: 70%;
|
||||
|
||||
> div:first-child {
|
||||
margin-top: 48px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.changeMargin{
|
||||
margin-top: -40px;
|
||||
}
|
||||
.state {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -876,43 +901,44 @@ input[type="number"] {
|
||||
.edit-power {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> span:first-child {
|
||||
white-space: pre;
|
||||
margin-right: 14px;
|
||||
}
|
||||
> div:first-child {
|
||||
display: flex;
|
||||
|
||||
//:deep(.is-disabled) {
|
||||
// .el-input__inner{
|
||||
// color: #FFFFFF!important;
|
||||
// }
|
||||
//}
|
||||
:deep(.el-input__wrapper) {
|
||||
width: 160px;
|
||||
height: 44px;
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
border: 1px solid #38CAFB;
|
||||
transform: none;
|
||||
transition: none;
|
||||
margin-right: 10px;
|
||||
|
||||
.el-input__inner {
|
||||
> span:first-child {
|
||||
white-space: pre;
|
||||
margin-right: 14px;
|
||||
}
|
||||
:deep(.el-input__wrapper) {
|
||||
width: 160px;
|
||||
height: 44px;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #38CAFB;
|
||||
}
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
border: 1px solid #38CAFB;
|
||||
transform: none;
|
||||
transition: none;
|
||||
margin-right: 10px;
|
||||
|
||||
.el-input__inner {
|
||||
height: 44px;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #38CAFB;
|
||||
}
|
||||
|
||||
|
||||
.el-input__suffix-inner {
|
||||
font-size: 30px;
|
||||
color: #38CAFB;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
.el-input__suffix-inner {
|
||||
font-size: 30px;
|
||||
color: #38CAFB;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//.units {
|
||||
// position: relative;
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user