Commit f65cf8e7 authored by dxw's avatar dxw

热泵设置

parent 48634421
......@@ -5,24 +5,19 @@
:append-to-body="true"
width="30%"
>
<el-form>
<el-form-item label="设置频率:" :label-width="formLabelWidth">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm">
<el-form-item label="设置频率:" :label-width="formLabelWidth" prop="set_frequency">
<el-input
size="mini"
autocomplete="off"
style="width: 300px"
v-model="frequency"
v-model="dataForm.set_frequency"
></el-input>
</el-form-item>
<!-- <el-form-item label="启动控制:" :label-width="formLabelWidth">
<el-switch></el-switch>
</el-form-item> -->
</el-form>
<div slot="footer">
<el-button size="mini" @click="hallModalVisible = false">取 消</el-button>
<el-button size="mini" type="primary" @click="cancelhandle"
>确 定</el-button
>
<el-button size="mini" type="primary" @click="submitHandle" v-prevent-re-click>确 定</el-button>
</div>
</el-dialog>
</template>
......@@ -33,17 +28,47 @@ export default {
return {
formLabelWidth: '120px',
hallModalVisible: false,
frequency: ''
frequency: '',
dataForm: {},
dataRule: {
set_frequency: [
{ required: true, message: '设定频率必填' }
// { type: 'number', message: '温度必须为数字' },
// { validator: validateNumber, trigger: ['blur', 'change'] }
]
}
}
},
methods: {
init(data) {
console.log('data', data)
this.frequency = data.current_frequency
this.dataForm = data
this.hallModalVisible = true
},
cancelhandle() {
submitHandle() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: this.dataForm.id,
params: this.dataForm.set_frequency,
actionName: this.dataForm.name + "设定频率为:" + this.dataForm.set_frequency,
actionType: 5
}
}).then((data) => {
if (data && data.code === 0) {
this.hallModalVisible = false
this.$message.success(data.msg)
this.$emit('refreshdatalist')
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
......
<template>
<el-dialog
title="热泵主机设置"
:visible.sync="visible"
:append-to-body="true"
width="20%"
>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :inline="true" label-width="150px" label-position="">
<el-row>
<el-form-item label="风水模式:">
</el-form-item>
<el-form-item>
<div class="switch-warp" style="transform: translateY(5px)">
<div
:class="[dataForm.feng_shui_mode == 'true' ? 'on' : '']"
@click="setFsStatus(1)"
>
</div>
<div
:class="[dataForm.feng_shui_mode == 'false' ? 'on' : '']"
@click="setFsStatus(0)"
>
</div>
</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="热水模式:">
</el-form-item>
<el-form-item>
<div class="switch-warp" style="transform: translateY(5px)">
<div
:class="[dataForm.hot_water_mode == 'true' ? 'on' : '']"
@click="setRsStatus(1)"
>
</div>
<div
:class="[dataForm.hot_water_mode == 'false' ? 'on' : '']"
@click="setRsStatus(0)"
>
</div>
</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="制热启动温度:" :label-width="formLabelWidth" prop="heating_start_temperature">
<el-input
size="mini" autocomplete="off" style="width: 120px" v-model="dataForm.heating_start_temperature"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="changeTemperature()"
>确定</el-button
>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="制热停止温度:" :label-width="formLabelWidth" prop="heating_stop_temperature">
<el-input
size="mini" autocomplete="off" style="width: 120px" v-model="dataForm.heating_stop_temperature"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="changeTemperature2()"
>确定</el-button
>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="热风启动温度:" :label-width="formLabelWidth" prop="hot_air_start_temperature">
<el-input
size="mini" autocomplete="off" style="width: 120px" v-model="dataForm.hot_air_start_temperature"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="changeTemperature3()"
>确定</el-button
>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="热风停止温度:" :label-width="formLabelWidth" prop="hot_air_stop_temperature">
<el-input
size="mini" autocomplete="off" style="width: 120px" v-model="dataForm.hot_air_stop_temperature"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="changeTemperature4()"
>确定</el-button
>
</el-form-item>
</el-row>
</el-form>
</el-dialog>
</template>
<script lang="ts">
export default {
name: 'hallModal',
data() {
return {
formLabelWidth: '120px',
visible: false,
frequency: '',
dataForm: {},
dataRule: {
set_frequency: [
{ required: true, message: '设定频率必填' }
// { type: 'number', message: '温度必须为数字' },
// { validator: validateNumber, trigger: ['blur', 'change'] }
]
}
}
},
methods: {
init(data) {
console.log('data', data)
this.dataForm = JSON.parse(JSON.stringify(data))
this.visible = true
},
setFsStatus(status){
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: this.dataForm.id,
status: status,
actionName: this.dataForm.name + (status == 0 ? '风水模式关闭' : '风水模式开启'),
actionType: 10
}
}).then((data) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.dataForm.feng_shui_mode = (status==0?"false":"true")
} else {
this.$message.error(data.msg)
}
})
},
setRsStatus(status){
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: this.dataForm.id,
status: status,
actionName: this.dataForm.name + (status == 0 ? '热水模式关闭' : '热水模式开启'),
actionType: 11
}
}).then((data) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.dataForm.hot_water_mode = (status==0?"false":"true")
} else {
this.$message.error(data.msg)
}
})
},
changeTemperature() {
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: this.dataForm.id,
params: this.dataForm.heating_start_temperature,
actionName: this.dataForm.name + '设置制热启动温度为:' + this.dataForm.heating_start_temperature,
actionType: 6
}
}).then((data) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.getDataList()
} else {
this.$message.error(data.msg)
}
})
},
changeTemperature2() {
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: this.dataForm.id,
params: this.dataForm.heating_stop_temperature,
actionName: this.dataForm.name + '设置制热停止温度为:' + this.dataForm.heating_stop_temperature,
actionType: 7
}
}).then((data) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
},
changeTemperature3() {
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: this.dataForm.id,
params: this.dataForm.hot_air_start_temperature,
actionName: this.dataForm.name + '设置热风启动温度为:' + this.dataForm.hot_air_start_temperature,
actionType: 8
}
}).then((data) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
},
changeTemperature4() {
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: this.dataForm.id,
params: this.dataForm.hot_air_stop_temperature,
actionName: this.dataForm.name + '设置热风停止温度为:' + this.dataForm.hot_air_stop_temperature,
actionType: 9
}
}).then((data) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.switch-warp {
width: 93px;
height: 26px;
font-size: 12px;
line-height: 25px;
overflow: hidden;
border-radius: 13px;
background: #d3d3d3;
border: 1px solid rgba(0, 0, 0, 0.03);
box-shadow: 0px 1px 0px 1px rgba(255, 255, 255, 0.25),
0px 2px 4px 0px rgba(0, 0, 0, 0.1);
div {
width: 45px;
height: 24px;
line-height: 24px;
float: left;
text-align: center;
cursor: pointer;
}
div.on {
background: #4cb527;
color: #fff;
border-radius: 13px;
border: 1px solid rgba(23, 41, 71, 0.02);
box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.3),
0px 2px 0px 0px rgba(255, 255, 255, 0.15);
}
}
</style>
\ No newline at end of file
......@@ -166,6 +166,12 @@
@click="statusHandle(scope.scope, 0)"
>关闭</el-button
>
<el-button
v-if="activeTab == 'b45827c068254695864ee3c1d42573cb' && (scope.scope.status == 1 || scope.scope.status == 2)"
type="text"
@click="settingFlrb(scope.scope)"
>设置</el-button
>
<el-button
type="text"
@click="statusHandle"
......@@ -174,7 +180,7 @@
>
<el-button
type="text"
@click="handleBtnClick(scope.scope.row)"
@click="handleBtnClick(scope.scope)"
v-if="activeTab == 'f4c840711eae4bcb9536a890cdfda493' && (scope.scope.status == 1 || scope.scope.status == 2)"
>设置频率</el-button
>
......@@ -211,7 +217,8 @@
:totalSize="totalSize"
@parentMethod="getDataList"
></table-pagination>
<hall-modal ref="hallModal"></hall-modal>
<hall-modal ref="hallModal" @refreshdatalist="getDataList"></hall-modal>
<setting-flrb ref="settingFlrb" @refreshdatalist="getDataList"></setting-flrb>
<set-up-and-down ref="setUpAndDown"></set-up-and-down>
</div>
</template>
......@@ -220,10 +227,10 @@ import cardList from '../../components/cardList'
import enTable from '../../components/enTable'
import enTabs from '../../components/enTabs'
import hallModal from './components/hallModal'
import settingFlrb from './components/settingFlrb'
import tablePagination from '@/pages/components/tablePagination'
import setUpAndDown from './components/setUpAndDown.vue'
import tableList from '@/pages/components/tableList'
import {
tableColumsOne,
tableColumsTwo,
......@@ -239,7 +246,8 @@ export default {
hallModal,
tablePagination,
setUpAndDown,
tableList
tableList,
settingFlrb
},
data() {
return {
......@@ -431,8 +439,8 @@ export default {
if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'feng_shui_mode', e.feng_shui_mode)
this.$set(this.tableData[i], 'hot_water_mode', e.hot_water_mode)
this.$set(this.tableData[i], 'feng_shui_mode_n', e.feng_shui_mode == 0 ? "关闭" : "开启")
this.$set(this.tableData[i], 'hot_water_mode_n', e.hot_water_mode == 0 ? "关闭" : "开启")
this.$set(this.tableData[i], 'feng_shui_mode_n', e.feng_shui_mode == "false" ? "关闭" : "开启")
this.$set(this.tableData[i], 'hot_water_mode_n', e.hot_water_mode == "false" ? "关闭" : "开启")
this.$set(
this.tableData[i],
'water_supply_temperature',
......@@ -591,6 +599,11 @@ export default {
this.$refs.hallModal.init(data)
})
},
settingFlrb(data){
this.$nextTick(() => {
this.$refs.settingFlrb.init(data)
})
},
// 定时升降
handleUpAndDownBtnClick(data) {
this.$nextTick(() => {
......
......@@ -468,7 +468,7 @@ export default {
}
})
},
// 看起设置空调温度窗口
// 设置空调温度窗口
settingJfkt(row, status) {
this.newObject = row
this.jfktDialogVisible = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment