Commit 91564aa7 by hayden

设备管理-设备操作日志:新增筛选条件门店、房间

parent f1034c2e
...@@ -9,6 +9,27 @@ ...@@ -9,6 +9,27 @@
<!-- @keyup.enter.native="handleQuery"--> <!-- @keyup.enter.native="handleQuery"-->
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<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-form-item label="设备id" prop="devId">
<el-input <el-input
v-model="queryParams.devId" v-model="queryParams.devId"
...@@ -17,22 +38,6 @@ ...@@ -17,22 +38,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="门店名称" prop="storeName">
<el-input
v-model="queryParams.storeName"
placeholder="请输入门店名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房间名称" prop="roomName">
<el-input
v-model="queryParams.roomName"
placeholder="请输入房间名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="请求的序列号" prop="seq"> <el-form-item label="请求的序列号" prop="seq">
<el-input <el-input
v-model="queryParams.seq" v-model="queryParams.seq"
...@@ -235,12 +240,16 @@ ...@@ -235,12 +240,16 @@
<script> <script>
import { listLog, getLog, delLog } from "@/api/system/log"; import { listLog, getLog, delLog } from "@/api/system/log";
import {queryRoom} from "@/api/system/room";
import {allList} from "@/api/system/store";
export default { export default {
name: "Log", name: "Log",
dicts: ['device_log_result'], dicts: ['device_log_result'],
data() { data() {
return { return {
stores: [],
rooms: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -271,8 +280,8 @@ export default { ...@@ -271,8 +280,8 @@ export default {
payload: null, payload: null,
topic: null, topic: null,
createBy: null, createBy: null,
storeName: null, roomId: null,
roomName: null storeId: null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -287,8 +296,20 @@ export default { ...@@ -287,8 +296,20 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.onGetAllStoreList();
}, },
methods: { 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() { getList() {
this.loading = true; 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