Commit a6e5004a authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

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