Commit 9775533f by hayden

系统设备管理-设备信息:新增筛选条件门店、房间

parent 983dc45b
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="所属门店" prop="storeId">
<el-select v-model="queryParams.storeId" placeholder="请选择所属门店" @change="onGetRoomListByStoreId" clearable>
<el-option
v-for="item in stores"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属房间" prop="roomId">
<el-select v-model="queryParams.roomId" placeholder="请选择所属房间" clearable>
<el-option
v-for="item in rooms"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="设备名称" prop="devName">
<el-input
v-model="queryParams.devName"
......@@ -17,16 +38,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属门店" prop="group">
<el-select v-model="queryParams.group" placeholder="请选择所属门店" clearable>
<el-option
v-for="item in options"
:key="item.deviceGroup"
:label="item.name"
:value="item.deviceGroup">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="设备类型" prop="devType">
<el-select v-model="queryParams.devType" placeholder="请选择设备类型">
<el-option
......@@ -264,6 +275,7 @@
import {listDevice, getDevice, delDevice, addDevice, updateDevice, openOrClose} from "@/api/system/device";
import selectStore from "./selectStore";
import { allList } from '@/api/system/store'
import {queryRoom} from "@/api/system/room";
export default {
......@@ -272,6 +284,8 @@ export default {
components: {selectStore},
data() {
return {
stores: [],
rooms: [],
// 遮罩层
loading: true,
// 选中数组
......@@ -308,7 +322,9 @@ export default {
devPosition: null,
gatewayId: null,
voltage: null,
signalValue: null
signalValue: null,
roomId: null,
storeId: null
},
// 表单参数
form: {},
......@@ -344,7 +360,13 @@ export default {
methods: {
onGetAllStoreList(){
allList().then(res => {
this.options = res.data
this.stores = res.data
})
},
onGetRoomListByStoreId(id) {
this.queryParams.roomId = null;
queryRoom().then(res => {
this.rooms = res.data.filter(item => item.storeId === id)
})
},
/** 查询设备信息列表 */
......
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