Commit 53937716 by hayden

设备管理-设备状态变更记录:新增筛选条件门店、房间

parent 91564aa7
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
<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="设备id" prop="devId">
<el-input
v-model="queryParams.devId"
......@@ -169,12 +190,16 @@
<script>
import { listLog } from "@/api/system/statusLog";
import { getLog } from "@/api/system/log";
import {queryRoom} from "@/api/system/room";
import {allList} from "@/api/system/store";
export default {
name: "sLog",
dicts: ['device_status','device_log_result'],
data() {
return {
stores: [],
rooms: [],
// 遮罩层
loading: true,
// 选中数组
......@@ -205,7 +230,8 @@ export default {
operateLogId: null,
isSendSms: null,
storeName: null,
roomName: null
roomName: null,
storeId: null
},
// 表单参数
form: {},
......@@ -224,8 +250,20 @@ export default {
},
created() {
this.getList();
this.onGetAllStoreList();
},
methods: {
onGetAllStoreList(){
allList().then(res => {
this.stores = res.data
})
},
onGetRoomListByStoreId(id) {
this.queryParams.roomId = null;
queryRoom().then(res => {
this.rooms = res.data.filter(item => item.storeId === id)
})
},
/** 查询设备状态变更记录列表 */
getList() {
this.loading = true;
......
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