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
|
<div
|
||||||
id="auto"
|
id="auto"
|
||||||
:class="{ active: item.running }"
|
:class="{ active: item.running }"
|
||||||
@click="item.running = true;editOperate(item,'启动')"
|
@click="item.running = true;editOperate(item,true,'启动')"
|
||||||
>
|
>
|
||||||
启动
|
启动
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="stop"
|
id="stop"
|
||||||
:class="{ active: !item.running }"
|
:class="{ active: !item.running }"
|
||||||
@click="item.running = false;editOperate(item,'停止')"
|
@click="item.running = false;editOperate(item,false,'停止')"
|
||||||
>
|
>
|
||||||
停止
|
停止
|
||||||
</div>
|
</div>
|
||||||
@@ -334,18 +334,18 @@ const packageData = (item, type, flag) => {
|
|||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
number: number,
|
number: number,
|
||||||
state: type === true ? 0 : 1,
|
state: type === true ? 1 : 0,
|
||||||
tunnelId: props.tunnelId,
|
tunnelId: props.tunnelId,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//启动/停止
|
//启动/停止
|
||||||
const editOperate = (item, type) => {
|
const editOperate = (item, flag, type) => {
|
||||||
ElMessageBox.confirm(`确认${type}${changeNum(item)}号风机吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认${type}${changeNum(item)}号风机吗?`, '系统提示', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
const data = packageData(item, item.running)
|
const data = packageData(item, flag)
|
||||||
editFrequencyOperationSwitch(data).then(res => {
|
editFrequencyOperationSwitch(data).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
@@ -444,8 +444,8 @@ const handleOpenChart = (item) => {
|
|||||||
chooseDayRef.value.clearData()
|
chooseDayRef.value.clearData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
clickMonth.value=''
|
clickMonth.value = ''
|
||||||
clickDay.value=''
|
clickDay.value = ''
|
||||||
isVisited.value = true
|
isVisited.value = true
|
||||||
selectTimeButton.value = 2
|
selectTimeButton.value = 2
|
||||||
openEquipmentId.value = item.equipmentId
|
openEquipmentId.value = item.equipmentId
|
||||||
|
|||||||
Reference in New Issue
Block a user