Commit a6e5004a authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

parent dc609596
......@@ -39,7 +39,13 @@
<!-- <img :src="item.src" alt="" /> -->
{{ item.name }}
</el-button>
<el-button style="margin-left:30px" type="info" size="mini" @click="timingControl">定时温控</el-button>
<el-button
style="margin-left: 30px"
type="primary"
size="mini"
@click="timingControl"
>定时温控</el-button
>
<el-dialog
title="定时温控"
:visible.sync="timingControlDialogVisible"
......@@ -52,20 +58,29 @@
<el-form-item label="温度设定(℃):"></el-form-item>
</el-col>
<el-col :span="5">
<el-input size="mini" v-model="formData.temperature" clearable="" ></el-input>
</el-col>
<el-input
size="mini"
v-model="formData.temperature"
clearable=""
></el-input>
</el-col>
<el-col :span="4">
<el-button type="primary" size="mini" @click="changeTemperature()">确定</el-button>
<el-button
type="primary"
size="mini"
@click="changeTemperature()"
>确定</el-button
>
</el-col>
</el-row>
<el-row :gutter="5">
<el-col :span="5">
<el-form-item label="定时功能启止时间:"/>
<el-form-item label="定时功能启止时间:" />
</el-col>
<el-col :span="10">
<el-time-select
style="width:40%"
style="width: 40%"
size="mini"
placeholder="起始时间"
v-model="formData.startTime"
......@@ -78,7 +93,7 @@
</el-time-select>
<span style="padding: 0 10px"></span>
<el-time-select
style="width:40%"
style="width: 40%"
size="mini"
placeholder="结束时间"
v-model="formData.endTime"
......@@ -90,14 +105,27 @@
}"
>
</el-time-select>
</el-col>
</el-col>
<el-col :span="4">
<div class="switch-warp" style="transform: translateY(5px)">
<div :class="[isOpen == 1 ? 'on' : '']" @click="setSendTime(1)" ></div>
<div :class="[isOpen == 2 ? 'on' : '']" @click="setSendTime(2)" ></div>
</div>
</el-col>
</el-row>
<div
class="switch-warp"
style="transform: translateY(5px)"
>
<div
:class="[isOpen == 1 ? 'on' : '']"
@click="setSendTime(1)"
>
</div>
<div
:class="[isOpen == 2 ? 'on' : '']"
@click="setSendTime(2)"
>
</div>
</div>
</el-col>
</el-row>
</div>
</el-dialog>
</el-form-item>
......@@ -282,8 +310,7 @@ export default {
}
],
hallModalVisible: false,
timingControlDialogVisible: false,
timingControlDialogVisible: false
}
},
computed: {
......@@ -444,7 +471,6 @@ export default {
}
},
getAllHcdt() {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/equipment/getAllHcdt'),
method: 'get'
......@@ -465,8 +491,18 @@ export default {
this.currentId = null
this.active = false
}
this.formData.temperature = data.sysSystemParams.temperature
}
})
},
getAllDswk() {
this.$http({
url: this.$http.adornUrl('/equipment/getAllDswk'),
method: 'get'
}).then((data) => {
if (data && data.code === 0) {
console.log('11111111,', data)
if (data.timedTask) {
this.formData.temperature = data.timedTask.temperature
this.formData.taskId = data.timedTask.id
this.formData.startTime = data.timedTask.startTime
this.formData.endTime = data.timedTask.endTime
......@@ -554,6 +590,8 @@ export default {
this.$message.error('定时功能启止时间不能为空!')
return
}
console.log('22222222222,', type)
console.log('33333333333,', this.formData)
this.$http({
url: this.$http.adornUrl('/equipment/timedTask'),
method: 'post',
......@@ -572,7 +610,7 @@ export default {
this.$message.success('关闭定时任务成功')
}
this.isOpen = type
this.getAllHcdt()
this.getAllDswk()
}
})
},
......@@ -590,13 +628,14 @@ export default {
}).then((data) => {
if (data && data.code === 0) {
this.$message.success('温度设定成功')
this.getAllHcdt()
this.getAllDswk()
}
})
},
// 定时温控
timingControl(){
timingControl() {
this.timingControlDialogVisible = true
this.getAllDswk()
}
}
}
......@@ -653,7 +692,7 @@ export default {
background: #4cb527 !important;
border: 1px solid transparent;
}
.el-table__body-wrapper{
.el-table__body-wrapper {
height: 400px;
}
</style>
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