Update Room.vue
parent
1e6a4c3fd5
commit
d0b56134f2
|
@ -73,25 +73,31 @@
|
||||||
<span class="name name3">空调信息</span>
|
<span class="name name3">空调信息</span>
|
||||||
<div class="flex-center bar">
|
<div class="flex-center bar">
|
||||||
<div>盘管类型</div>
|
<div>盘管类型</div>
|
||||||
<el-radio-group v-model="current_room_info.type1">
|
<el-radio-group v-model="current_room_info.fcu_info.fcu_type">
|
||||||
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup1">{{
|
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup1">{{
|
||||||
item.label
|
item.label
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-radio-group v-model="current_room_info.type2">
|
<el-radio-group v-model="current_room_info.fcu_info.pipe_type">
|
||||||
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup2">{{
|
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup2">{{
|
||||||
item.label
|
item.label
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-radio-group v-model="current_room_info.type3">
|
<el-radio-group v-model="current_room_info.fcu_info.valve_type">
|
||||||
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup3">{{
|
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup3">{{
|
||||||
item.label
|
item.label
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
<div>
|
||||||
|
<p>风机盘管数量</p>
|
||||||
|
<p>
|
||||||
|
<el-input-number v-model="current_room_info.fcu_info.fcu_count" :min="1" :max="100"></el-input-number>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>温控器数量</p>
|
<p>温控器数量</p>
|
||||||
<p>
|
<p>
|
||||||
<el-input-number v-model="current_room_info.num1" :min="1" :max="100"></el-input-number>
|
<el-input-number v-model="current_room_info.fcu_info.thermostat_count" :min="1" :max="100"></el-input-number>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,7 +106,7 @@
|
||||||
<span class="name name4">面板信息</span>
|
<span class="name name4">面板信息</span>
|
||||||
<div class="flex-center bar">
|
<div class="flex-center bar">
|
||||||
<div>面板类型</div>
|
<div>面板类型</div>
|
||||||
<el-radio-group v-model="current_room_info.type4">
|
<el-radio-group v-model="current_room_info.panel_info.panel_type">
|
||||||
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup4">{{
|
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup4">{{
|
||||||
item.label
|
item.label
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
|
@ -108,13 +114,13 @@
|
||||||
<div>
|
<div>
|
||||||
<p>面板数量</p>
|
<p>面板数量</p>
|
||||||
<p>
|
<p>
|
||||||
<el-input-number v-model="current_room_info.mbnum" :min="1" :max="100"></el-input-number>
|
<el-input-number v-model="current_room_info.panel_info.panel_count" :min="1" :max="100"></el-input-number>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>按钮数量</p>
|
<p>按钮数量</p>
|
||||||
<p>
|
<p>
|
||||||
<el-input-number v-model="current_room_info.btnnum" :min="1" :max="100"></el-input-number>
|
<el-input-number v-model="current_room_info.panel_info.panel_button_count" :min="1" :max="100"></el-input-number>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -123,7 +129,7 @@
|
||||||
<span class="name name5">窗帘信息</span>
|
<span class="name name5">窗帘信息</span>
|
||||||
<div class="flex-center bar">
|
<div class="flex-center bar">
|
||||||
<div>窗帘类型</div>
|
<div>窗帘类型</div>
|
||||||
<el-radio-group v-model="current_room_info.type5">
|
<el-radio-group v-model="current_room_info.curtain_info.curtain_type">
|
||||||
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup5">{{
|
<el-radio :value="item.value" :key="item.value" v-for="(item, index) in radioGroup5">{{
|
||||||
item.label
|
item.label
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
|
@ -131,13 +137,13 @@
|
||||||
<div>
|
<div>
|
||||||
<p>窗帘数量</p>
|
<p>窗帘数量</p>
|
||||||
<p>
|
<p>
|
||||||
<el-input-number v-model="current_room_info.chlnum" :min="1" :max="100"></el-input-number>
|
<el-input-number v-model="current_room_info.curtain_info.curtain_count" :min="1" :max="100"></el-input-number>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>窗纱数量</p>
|
<p>窗纱数量</p>
|
||||||
<p>
|
<p>
|
||||||
<el-input-number v-model="current_room_info.chshnum" :min="1" :max="100"></el-input-number>
|
<el-input-number v-model="current_room_info.curtain_info.sheer_curtain_count" :min="1" :max="100"></el-input-number>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -149,13 +155,13 @@
|
||||||
<div v-for="(item, i) in otherArr" :key="item.label">
|
<div v-for="(item, i) in otherArr" :key="item.label">
|
||||||
<p>{{ item.label }}</p>
|
<p>{{ item.label }}</p>
|
||||||
<p>
|
<p>
|
||||||
<el-input-number v-model="current_room_info['otherNum' + item.value]" :min="1"
|
<el-input-number v-model="current_room_info.other[item.key]" :min="1"
|
||||||
:max="100"></el-input-number>
|
:max="100"></el-input-number>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-checkbox-group v-model="current_room_info.checkone" class="rules-label">
|
<el-checkbox-group v-model="current_room_info.other.Housekeeping" class="rules-label">
|
||||||
<el-checkbox v-for="(item, i) in checkList" :label="item.label" :key="item.value"
|
<el-checkbox v-for="(item, i) in checkList" :label="item.label" :key="item.value"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
|
@ -177,7 +183,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Delete } from '@element-plus/icons-vue'
|
import { Delete } from '@element-plus/icons-vue'
|
||||||
import { onMounted, reactive } from 'vue'
|
import { onMounted, reactive,ref } from 'vue'
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import myApi from "@/api/myApi.js";
|
import myApi from "@/api/myApi.js";
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
@ -198,34 +204,37 @@ const project = reactive({
|
||||||
const current_room_info = reactive({
|
const current_room_info = reactive({
|
||||||
room_name: '',
|
room_name: '',
|
||||||
room_count: 1,
|
room_count: 1,
|
||||||
light_info: {
|
light_info: {// 灯光信息
|
||||||
switching_circuit: 0,
|
switching_circuit: 0,
|
||||||
dimming_10v: 0,
|
dimming_10v: 0,
|
||||||
dimming_leading_edge: 0,
|
dimming_leading_edge: 0,
|
||||||
dimming_trailing_edge: 0,
|
dimming_trailing_edge: 0,
|
||||||
DALI: 0,
|
DALI: 0,
|
||||||
},
|
},
|
||||||
fcu_info: {
|
fcu_info: {// 盘管信息
|
||||||
fcu_type: 0,
|
fcu_type: 0,
|
||||||
pipe_type: 0,
|
pipe_type: 0,
|
||||||
valve_type: 0,
|
valve_type: 0,
|
||||||
fcu_count: 0,
|
fcu_count: 0,
|
||||||
thermostat_count: 0,
|
thermostat_count: 0,
|
||||||
},
|
},
|
||||||
panel_info: {
|
panel_info: {// 面板信息
|
||||||
panel_type: 0,
|
panel_type: 0,
|
||||||
panel_count: 0,
|
panel_count: 0,
|
||||||
panel_button_count: 0,
|
panel_button_count: 0,
|
||||||
},
|
},
|
||||||
curtain_info: {
|
curtain_info: {// 窗帘信息
|
||||||
curtain_type: 0,
|
curtain_type: 0,
|
||||||
curtain_count: 0,
|
curtain_count: 0,
|
||||||
sheer_curtain_count: 0,
|
sheer_curtain_count: 0,
|
||||||
},
|
},
|
||||||
other: {
|
other: {// 其他信息
|
||||||
DND: false,
|
PIR: 1,
|
||||||
MUR: false,
|
PIR2: 1,
|
||||||
SOS: false,
|
Gate: 1,
|
||||||
|
Window: 1,
|
||||||
|
doorbell: 1,
|
||||||
|
Housekeeping: ['DND', 'MUR'],
|
||||||
},
|
},
|
||||||
desc: ''
|
desc: ''
|
||||||
})
|
})
|
||||||
|
@ -241,7 +250,7 @@ const get_project = async () => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
project.name = res.data.name;
|
project.name = res.data.name;
|
||||||
project.description = res.data.description;
|
project.description = res.data.description;
|
||||||
if (Array.isArray(res.data.content)) {
|
if (res.data.content && Array.isArray(res.data.content) && res.data.content.length > 0) {
|
||||||
project.content = res.data.content;
|
project.content = res.data.content;
|
||||||
} else {
|
} else {
|
||||||
add_room();
|
add_room();
|
||||||
|
@ -287,6 +296,7 @@ const save_room = async () => {
|
||||||
action: 1021,
|
action: 1021,
|
||||||
data: project
|
data: project
|
||||||
}
|
}
|
||||||
|
debugger;
|
||||||
const res = await myApi.getProjects(param);
|
const res = await myApi.getProjects(param);
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
@ -340,18 +350,23 @@ const lightArr = reactive([{
|
||||||
const otherArr = reactive([{
|
const otherArr = reactive([{
|
||||||
label: '红外',
|
label: '红外',
|
||||||
value: 0,
|
value: 0,
|
||||||
|
key: 'PIR'
|
||||||
}, {
|
}, {
|
||||||
label: '双鉴红外',
|
label: '双鉴红外',
|
||||||
value: 1,
|
value: 1,
|
||||||
|
key: 'PIR2'
|
||||||
}, {
|
}, {
|
||||||
label: '门磁',
|
label: '门磁',
|
||||||
value: 2,
|
value: 2,
|
||||||
|
key: 'Gate'
|
||||||
}, {
|
}, {
|
||||||
label: '窗磁',
|
label: '窗磁',
|
||||||
value: 3,
|
value: 3,
|
||||||
|
key: 'Window'
|
||||||
}, {
|
}, {
|
||||||
label: '门铃',
|
label: '门铃',
|
||||||
value: 4,
|
value: 4,
|
||||||
|
key: 'doorbell'
|
||||||
}])
|
}])
|
||||||
const radioGroup1 = reactive([{
|
const radioGroup1 = reactive([{
|
||||||
label: '普通三速风机',
|
label: '普通三速风机',
|
||||||
|
@ -396,13 +411,13 @@ const radioGroup5 = reactive([{
|
||||||
}])
|
}])
|
||||||
const checkList = reactive([{
|
const checkList = reactive([{
|
||||||
label: 'DND',
|
label: 'DND',
|
||||||
value: 0,
|
value: 'DND',
|
||||||
}, {
|
}, {
|
||||||
label: 'MUR',
|
label: 'MUR',
|
||||||
value: 1,
|
value: 'MUR',
|
||||||
}, {
|
}, {
|
||||||
label: 'SOS',
|
label: 'SOS',
|
||||||
value: 2,
|
value: 'SOS',
|
||||||
}])
|
}])
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in New Issue