Commit 32d77c40 authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

parent 9a0f5740
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
v-for="item in typeList" v-for="item in typeList"
:key="item.id" :key="item.id"
:class="[ :class="[
item.id == currentId&&active? 'isActive' : '', item.id == currentId && active ? 'isActive' : '',
item.icon, item.icon
]" ]"
> >
<!-- <img :src="item.src" alt="" /> --> <!-- <img :src="item.src" alt="" /> -->
...@@ -43,10 +43,18 @@ ...@@ -43,10 +43,18 @@
</el-col> </el-col>
<el-col :span="24" v-if="isSaving == 1"> <el-col :span="24" v-if="isSaving == 1">
<el-form-item label="温度设定:"> <el-form-item label="温度设定:">
<el-input v-model="formData.temp" clearable=""></el-input> <el-input
v-model="formData.temperature"
clearable=""
></el-input>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-button type="primary" size="mini">确定</el-button> <el-button
type="primary"
size="mini"
@click="changeTemperature()"
>确定</el-button
>
</el-form-item> </el-form-item>
<el-form-item label="定时功能启止时间:"> <el-form-item label="定时功能启止时间:">
...@@ -56,7 +64,7 @@ ...@@ -56,7 +64,7 @@
:picker-options="{ :picker-options="{
start: '00:00', start: '00:00',
step: '00:15', step: '00:15',
end: '24:00', end: '24:00'
}" }"
> >
</el-time-select> </el-time-select>
...@@ -68,7 +76,7 @@ ...@@ -68,7 +76,7 @@
start: '00:00', start: '00:00',
step: '00:15', step: '00:15',
end: '24:00', end: '24:00',
minTime: formData.startTime, minTime: formData.startTime
}" }"
> >
</el-time-select> </el-time-select>
...@@ -181,7 +189,6 @@ export default { ...@@ -181,7 +189,6 @@ export default {
src: require('../../home/image/fan_icon.png'), src: require('../../home/image/fan_icon.png'),
icon: 'iconfont icon-feng2', icon: 'iconfont icon-feng2',
status: null status: null
}, },
{ {
id: 3, id: 3,
...@@ -189,7 +196,6 @@ export default { ...@@ -189,7 +196,6 @@ export default {
src: require('../../home/image/fan_icon.png'), src: require('../../home/image/fan_icon.png'),
icon: 'iconfont icon-feng', icon: 'iconfont icon-feng',
status: null status: null
} }
], ],
currentId: null, currentId: null,
...@@ -198,7 +204,12 @@ export default { ...@@ -198,7 +204,12 @@ export default {
tableColums: tableColumsOne, tableColums: tableColumsOne,
isSaving: 1, //节能 isSaving: 1, //节能
isOpen: 1, //定时开关 isOpen: 1, //定时开关
formData: {}, formData: {
temperature: '',
taskId: '',
startTime: '',
endTime: ''
},
tabList: [ tabList: [
{ {
value: '01', value: '01',
...@@ -332,11 +343,7 @@ export default { ...@@ -332,11 +343,7 @@ export default {
'hot_air_stop_temperature', 'hot_air_stop_temperature',
e.hot_air_stop_temperature e.hot_air_stop_temperature
) )
this.$set( this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
this.tableData[i],
'electric_energy',
e.electric_energy
)
} }
}) })
} else if ( } else if (
...@@ -345,11 +352,7 @@ export default { ...@@ -345,11 +352,7 @@ export default {
//室内机风柜 //室内机风柜
this.sljfgList.forEach((e) => { this.sljfgList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) { if (this.tableData[i].id === e.resource_id) {
this.$set( this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
this.tableData[i],
'electric_energy',
e.electric_energy
)
this.$set( this.$set(
this.tableData[i], this.tableData[i],
'current_frequency', 'current_frequency',
...@@ -384,13 +387,18 @@ export default { ...@@ -384,13 +387,18 @@ export default {
this.isSaving = data.sysSystemParams.type this.isSaving = data.sysSystemParams.type
if (data.sysSystemParams.sun === 1) { if (data.sysSystemParams.sun === 1) {
this.currentId = 1 this.currentId = 1
this.active = true
} else if (data.sysSystemParams.fan === 1) { } else if (data.sysSystemParams.fan === 1) {
this.currentId = 2 this.currentId = 2
this.active = true
} else if (data.sysSystemParams.nan === 1) { } else if (data.sysSystemParams.nan === 1) {
this.currentId = 3 this.currentId = 3
this.active = true
} else { } else {
this.currentId = null this.currentId = null
this.active = false
} }
this.formData.temperature = data.sysSystemParams.temperature
if (data.timedTask) { if (data.timedTask) {
this.formData.taskId = data.timedTask.id this.formData.taskId = data.timedTask.id
this.formData.startTime = data.timedTask.startTime this.formData.startTime = data.timedTask.startTime
...@@ -409,7 +417,12 @@ export default { ...@@ -409,7 +417,12 @@ export default {
this.hallModalVisible = true this.hallModalVisible = true
}, },
handleType(id) { handleType(id) {
this.active = !this.active if (id !== this.currentId) {
this.active = true
} else {
this.active = !this.active
}
console.log('id:', id) console.log('id:', id)
this.$http({ this.$http({
url: this.$http.adornUrl('/equipment/checkModel'), url: this.$http.adornUrl('/equipment/checkModel'),
...@@ -421,11 +434,23 @@ export default { ...@@ -421,11 +434,23 @@ export default {
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (id === 1) { if (id === 1) {
this.$message.success('供暖模式开启成功') if (this.active === true) {
this.$message.success('供暖模式开启成功')
} else {
this.$message.success('供暖模式关闭成功')
}
} else if (id === 2) { } else if (id === 2) {
this.$message.success('机械通风模式开启成功') if (this.active === true) {
this.$message.success('机械通风模式开启成功')
} else {
this.$message.success('机械通风模式关闭成功')
}
} else if (id === 3) { } else if (id === 3) {
this.$message.success('自然通风模式开启成功') if (this.active === true) {
this.$message.success('自然通风模式开启成功')
} else {
this.$message.success('自然通风模式关闭成功')
}
} }
this.currentId = id this.currentId = id
} }
...@@ -454,6 +479,10 @@ export default { ...@@ -454,6 +479,10 @@ export default {
}, },
// 设置定时任务 // 设置定时任务
setSendTime(type) { setSendTime(type) {
if (!this.formData.startTime || !this.formData.endTime) {
this.$message.error('定时功能启止时间不能为空!')
return
}
this.isOpen = type this.isOpen = type
this.$http({ this.$http({
...@@ -472,6 +501,25 @@ export default { ...@@ -472,6 +501,25 @@ export default {
} else { } else {
this.$message.success('关闭定时任务成功') this.$message.success('关闭定时任务成功')
} }
this.getAllHcdt()
}
})
},
changeTemperature() {
if (!this.formData.temperature) {
this.$message.error('温度不能为空!')
return
}
this.$http({
url: this.$http.adornUrl('/equipment/changeTemperature'),
method: 'post',
params: this.$http.adornParams({
temperature: this.formData.temperature
})
}).then((data) => {
if (data && data.code === 0) {
this.$message.success('温度设定成功')
this.getAllHcdt()
} }
}) })
} }
......
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