Merge pull request 'fix : 风机控制状态' (#324) from clay into master
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/324
This commit is contained in:
@@ -22,14 +22,14 @@
|
||||
<div
|
||||
id="auto"
|
||||
:class="{ active: item.running }"
|
||||
@click="item.running = true;editOperate(item,'启动')"
|
||||
@click="item.running = true;editOperate(item,true,'启动')"
|
||||
>
|
||||
启动
|
||||
</div>
|
||||
<div
|
||||
id="stop"
|
||||
:class="{ active: !item.running }"
|
||||
@click="item.running = false;editOperate(item,'停止')"
|
||||
@click="item.running = false;editOperate(item,false,'停止')"
|
||||
>
|
||||
停止
|
||||
</div>
|
||||
@@ -334,18 +334,18 @@ const packageData = (item, type, flag) => {
|
||||
} else {
|
||||
return {
|
||||
number: number,
|
||||
state: type === true ? 0 : 1,
|
||||
state: type === true ? 1 : 0,
|
||||
tunnelId: props.tunnelId,
|
||||
}
|
||||
}
|
||||
}
|
||||
//启动/停止
|
||||
const editOperate = (item, type) => {
|
||||
const editOperate = (item, flag, type) => {
|
||||
ElMessageBox.confirm(`确认${type}${changeNum(item)}号风机吗?`, '系统提示', {
|
||||
type: 'warning',
|
||||
closeOnClickModal: false
|
||||
}).then(() => {
|
||||
const data = packageData(item, item.running)
|
||||
const data = packageData(item, flag)
|
||||
editFrequencyOperationSwitch(data).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
@@ -444,8 +444,8 @@ const handleOpenChart = (item) => {
|
||||
chooseDayRef.value.clearData()
|
||||
}
|
||||
})
|
||||
clickMonth.value=''
|
||||
clickDay.value=''
|
||||
clickMonth.value = ''
|
||||
clickDay.value = ''
|
||||
isVisited.value = true
|
||||
selectTimeButton.value = 2
|
||||
openEquipmentId.value = item.equipmentId
|
||||
|
||||
Reference in New Issue
Block a user