Commit 37f9adcc authored by xiexingan's avatar xiexingan

提交

parent 9991ddc7
......@@ -3,33 +3,40 @@
title="设定频率"
:visible.sync="hallModalVisible"
:append-to-body="true"
width='30%'
>
<el-form>
<el-form-item label="设定频率:" :label-width="formLabelWidth">
<el-input size="mini" autocomplete="off"></el-input>
<el-input size="mini" autocomplete="off" style='width:300px' v-model="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 @click="cancelhandle">取 消</el-button>
<el-button type="primary" @click="cancelhandle">确 定</el-button>
<el-button size="mini" @click="hallModalVisible=false">取 消</el-button>
<el-button size="mini" type="primary" @click="cancelhandle">确 定</el-button>
</div>
</el-dialog>
</template>
<script lang="ts">
export default {
name: 'hallModal',
props: ['hallModalVisible'],
data() {
return {
formLabelWidth: '120px'
formLabelWidth: '120px',
hallModalVisible: false,
frequency: ''
}
},
methods: {
init(data) {
console.log('data', data)
this.frequency = data.current_frequency
this.hallModalVisible = true
},
cancelhandle() {
this.$emit('cancelhandle')
this.hallModalVisible = false
}
}
}
......
......@@ -136,7 +136,7 @@
>
<el-button
type="text"
@click="handleBtnClick"
@click="handleBtnClick(scope.scope.row)"
v-if="activeTab != 'b45827c068254695864ee3c1d42573cb'"
>设置频率</el-button
>
......@@ -150,8 +150,7 @@
@parentMethod="getDataList"
></table-pagination>
<hall-modal
v-on:cancelhandle="cancelhandle"
:hallModalVisible="hallModalVisible"
ref='hallModal'
></hall-modal>
</div>
</template>
......@@ -416,8 +415,11 @@ export default {
this.hallModalVisible = false
})
},
handleBtnClick() {
this.hallModalVisible = true
// 设置频率
handleBtnClick(data) {
this.$nextTick(() => {
this.$refs.hallModal.init(data)
})
},
handleType(id) {
if (id !== this.currentId) {
......
<template lang="pug">
.animation
.info-title
| {{ dataForm.name }}
//- | 空调
el-button(
icon="el-icon-close",
style="float: right",
type="text",
@click="closeQueryDetailVisible"
)
.info-form(style="text-align: center; border-bottom: 1px solid #c0c0c0")
img(src="../../../assets/images/kt.jpg")
//- span {{dataForm.icon}}
//- div(:class="dataForm.icon+'6'")
.info-form(style="border-bottom: 1px solid #c0c0c0")
.quDetailM
p.leftP 设备名称&nbsp;:&nbsp;&nbsp; {{ dataForm.name }}
.quDetailM
p.leftP 设备编号&nbsp;:&nbsp;&nbsp; {{ dataForm.code }}
.quDetailM
p.leftP 设备品牌:&nbsp;:&nbsp;&nbsp;{{ dataForm.name }}
.quDetailM
p.leftP 设备型号:&nbsp;:&nbsp;&nbsp;{{ dataForm.equipmentModel }}
.quDetailM
p.leftP 安装日期:&nbsp;:&nbsp;&nbsp;{{ dataForm.installDate }}
.info-form
el-row
el-col(:span="8")
.switch-warp
div(:class="[state == 1 ? 'on' : '']", @click="handleSwitch(1)") 打开
div(:class="[state == 2 ? 'on' : '']", @click="handleSwitch(2)") 关闭
el-col.text-size(:span="16", flex, justify-content="start")
div(style="width: 60px") 频率设置:
el-input(size="mini", style="width: 60px", v-model="speed")
span &nbsp;转
el-button(type="primary", size="mini", style="margin-left: 10px") 设定
el-row
el-col.text-size(:span="8") 当前已
span(v-if="dataForm.state == 1") 打开
span(v-else-if="dataForm.state == 2") 关闭
span(v-else) 故障
el-col.text-size(:span="10") 当前频率:
span(style="color: blue") 2289
span &nbsp;转/分
.info-state
span(style="font-weight: bold") 设备运行状态
div(v-if='this.params.length&&this.params[0].electric_energy')
span.type 电量:
span.value {{params[0].electric_energy}}
div(v-if='this.params.length&&this.params[0].current_frequency')
span.type 当前频率:
span.value {{params[0].current_frequency}}
div(v-if='this.params.length&&this.params[0].feng_shui_mode')
span.type 风水模式:
span.value {{params[0].feng_shui_mode}}
div(v-if='this.params.length&&this.params[0].hot_water_mode')
span.type 热水模式:
span.value {{params[0].hot_water_mode}}
div(v-if='this.params.length&&this.params[0].water_supply_temperature')
span.type 供水温度:
span.value {{params[0].water_supply_temperature}}
div(v-if='this.params.length&&this.params[0].return_water_temperature')
span.type 回水温度:
span.value {{params[0].return_water_temperature}}
div(v-if='this.params.length&&this.params[0].heating_start_temperature')
span.type 制热启动温度:
span.value {{params[0].heating_start_temperature}}
div(v-if='this.params.length&&this.params[0].heating_stop_temperature')
span.type 制热停止温度:
span.value {{params[0].heating_stop_temperature}}
div(v-if='this.params.length&&this.params[0].indoor_ambient_temperature')
span.type 室内环境温度:
span.value {{params[0].indoor_ambient_temperature}}
div(v-if='this.params.length&&this.params[0].outlet_temperature')
span.type 出风温度:
span.value {{params[0].outlet_temperature}}
div(v-if='this.params.length&&this.params[0].return_air_temperature')
span.type 回风温度:
span.value {{params[0].return_air_temperature}}
div(v-if='this.params.length&&this.params[0].hot_air_start_temperature')
span.type 热风启动温度:
span.value {{params[0].hot_air_start_temperature}}
div(v-if='this.params.length&&this.params[0].hot_air_stop_temperature')
span.type 热风停止温度:
span.value {{params[0].hot_air_stop_temperature}}
div(v-if='this.params.length&&this.params[0].temperature')
span.type 温度:
span.value {{params[0].temperature}}
div(v-if='this.params.length&&this.params[0].humidity')
span.type 湿度:
span.value {{params[0].humidity}}
div(v-if='this.params.length&&this.params[0].wind_speed')
span.type 风速:
span.value {{params[0].wind_speed}}
div(v-if='this.params.length&&this.params[0].wind_direction')
span.type 风向:
span.value {{params[0].wind_direction}}
div(v-if='this.params.length&&this.params[0].Illuminance')
span.type 光照度:
span.value {{params[0].Illuminance}}
div(v-if='this.params.length&&this.params[0].carbon_dioxide')
span.type CO2:
span.value {{params[0].carbon_dioxide}}
div(v-if='this.params.length&&this.params[0].fine_particles')
span.type PM2.5:
span.value {{params[0].fine_particles}}
div(v-if='this.params.length&&this.params[0].radiation')
span.type 辐射:
span.value {{params[0].radiation}}
div(v-if='this.params.length&&this.params[0].setting_temperature')
span.type 设定温度:
span.value {{params[0].setting_temperature}}
div(v-if='this.params.length&&this.params[0].setting_mode')
span.type 设定模式:
span.value {{params[0].setting_mode}}
div(v-if='this.params.length&&this.params[0].setting_wind_speed')
span.type 设定风速:
span.value {{params[0].setting_wind_speed}}
</template>
<script>
import { mapState } from 'vuex'
export default {
computed: {
...mapState('d2admin/user', ['info']),
...mapState('d2admin/paramsList', ['list'])
},
data() {
return {
speed: '', //装束
state: 1, //开关
stationId: localStorage.getItem('stationId'),
dataForm: {
id: 0,
name: ''
},
dlsnjList: [], //多联室内机
dlswjList: [], //多联室外机
flrbList: [], //风冷热泵机组
jfktgList: [], //机房空调380
jfktpList: [], //机房空调220
pfjList: [], //排风机
sbList: [], //水泵
sljfgList: [], //室内机风柜
params: []
}
},
created() {
console.log(this.list)
this.setData()
},
methods: {
init(data, stationId) {
this.dataForm = data
this.dataForm.operatorName = this.info.name
console.log('---data:', data)
console.log('当前资源点id', data.id)
console.log('类型', data.type)
switch (data.type) {
case '173466a2cf9a42a6a17b2bdfbeae36d5': //多联室内机
this.params = this.dlsnjList.filter((e) => e.resource_id == data.id)
break
case '8f5530fee2484e8eb107c0ca672132b2': //多联室外机
this.params = this.dlswjList.filter((e) => e.resource_id == data.id)
break
case 'b45827c068254695864ee3c1d42573cb': //风冷热泵机组
this.params = this.flrbList.filter((e) => e.resource_id == data.id)
break
case 'ece0b8b2db27411886254e81134988a3': //机房空调380
this.params = this.jfktgList.filter((e) => e.resource_id == data.id)
break
case 'b47661ca1d454f9792ba5369f3cb2bc5': //机房空调220
this.params = this.jfktpList.filter((e) => e.resource_id == data.id)
break
case 'b6af764f2a6e454490a6b1b3c9057e57': //排风机
this.params = this.pfjList.filter((e) => e.resource_id == data.id)
break
case 'f4c840711eae4bcb9536a890cdfda493': //水泵
this.params = this.sbList.filter((e) => e.resource_id == data.id)
break
case '303310efddb34a2e9bf269bdff8a7dc5': //水泵
this.params = this.sljfgList.filter((e) => e.resource_id == data.id)
break
}
console.log('params运行状态', this.params)
},
setData() {
this.dlsnjList = this.list.dlsnjList //多联室内机
this.dlswjList = this.list.dlswjList //多联室外机
this.flrbList = this.list.flrbList //风冷热泵机组
this.jfktgList = this.list.jfktgList //机房空调380
this.jfktpList = this.list.jfktpList //机房空调220
this.pfjList = this.list.pfjList //排风机
this.sbList = this.list.sbList //水泵
this.sljfgList = this.list.sljfgList //室内机风柜
},
closeQueryDetailVisible() {
this.$emit('closeQ')
},
handleSwitch(state) {
this.state = state
}
}
}
</script>
<style lang="scss" scoped>
.switch-warp {
width: 80px;
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: 39px;
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);
}
}
.text-size {
font-size: 12px;
line-height: 28px;
}
.info-state {
padding: 0 10px 10px;
.type {
font-size: 14px;
margin: 5px 0 0 10px;
display: inline-block;
width: 105px;
}
.value {
color: #47b320;
}
}
.el-table__header {
width: 100% !important;
}
.el-table__body {
width: 100% !important;
}
.info-title {
line-height: 40px;
height: 40px;
padding: 0 20px;
background-color: #e1edf4;
border-bottom: 1px solid #cccccc;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
}
.info-video {
padding: 10px;
height: 160px;
}
.info-form {
padding: 10px;
}
.info-block {
border: 1px solid #cccccc;
}
.el-select {
width: 100%;
}
.video {
width: 100%;
height: 180px;
}
.animation {
animation: myfirst 1s;
position: absolute;
top: 50px;
right: 0;
width: 330px;
background-color: #f4f4f4;
z-index: 11;
border: 1px solid rgba(195, 195, 195, 1);
box-shadow: 0 2px 8px 8px rgba(0, 0, 0, 0.2);
}
@keyframes myfirst {
from {
right: -500px;
}
to {
right: 0;
}
}
.quDetailM {
width: 100%;
}
.leftP {
height: 30px;
line-height: 30px;
margin: 0;
width: 100%;
font-size: 14px;
span {
color: #46b6f9;
}
}
</style>
<style lang="scss">
.instuctions_content {
table {
th {
background: #eef8ff !important;
color: #333333 !important;
}
}
}
.el-icon-jfktg6 {
width: 100%;
height: 170px;
text-align: center;
background: url("../../../assets/images/kt.jpg") no-repeat center;
background-size: 100% 100%;
}
</style>
......@@ -43,7 +43,7 @@
el-input(size="mini", style="width: 60px", v-model="speed")
span &nbsp;转
el-button(type="primary", size="mini", style="margin-left: 10px") 设定
el-col.text-size(:span="24") 当前频率:
el-col.text-size(:span="24" v-if='params.length') 当前频率:
span(style="color: blue") {{ params[0].current_frequency }}
span &nbsp;转/分
//- 卷帘门
......
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