|
@@ -1,5 +1,33 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <el-form :inline="true" :model="queryParams" ref="queryRef" v-show="true" label-width="60px">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="queryParams.project_id" placeholder="请输入项目名称" clearable
|
|
|
+ @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="queryParams.box_id" placeholder="请输入盒子名称" clearable
|
|
|
+ @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select v-model="queryParams.online_status" placeholder="请选择在线状态" clearable>
|
|
|
+ <el-option v-for="item in runStatOptions" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select v-model="queryParams.run_mode" placeholder="请选择运行模式" clearable>
|
|
|
+ <el-option v-for="item in runModeOptions" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" size="medium" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button type="success" size="medium" @click="handleDerive">导出</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
<el-table :data="tableData" border :span-method="objectSpanMethod">
|
|
|
<el-table-column label="序号" width="60" align="center" fixed>
|
|
|
<template slot-scope="scope">
|
|
@@ -341,6 +369,17 @@ export default {
|
|
|
4: { label: '预热', color: 'yellow' },
|
|
|
5: { label: '通风', color: 'rgb(182, 174, 227)' }
|
|
|
},
|
|
|
+ runStatOptions: [
|
|
|
+ { label:'在线', value:'1' },
|
|
|
+ { label:'离线', value:'0' },
|
|
|
+ ],
|
|
|
+ runModeOptions: [
|
|
|
+ { label:'制冷', value:'1' },
|
|
|
+ { label:'采暖', value:'2' },
|
|
|
+ { label:'除湿', value:'3' },
|
|
|
+ { label:'预热', value:'4' },
|
|
|
+ { label:'通风', value:'5' },
|
|
|
+ ],
|
|
|
connectStatMap: {
|
|
|
0: { label: '异常', color: 'yellow' },
|
|
|
1: { label: '正常', color: 'yellowgreen' }
|
|
@@ -533,6 +572,15 @@ export default {
|
|
|
}
|
|
|
];
|
|
|
},
|
|
|
+ /** 搜索 */
|
|
|
+ handleQuery(){
|
|
|
+ this.queryParams.page_index = 0;
|
|
|
+ this.getProjects();
|
|
|
+ },
|
|
|
+ /** 导出 */
|
|
|
+ handleDerive(){
|
|
|
+
|
|
|
+ },
|
|
|
/** 分页切换 */
|
|
|
handleSizeChange(val) {
|
|
|
this.queryParams.page_size = val;
|
|
@@ -581,4 +629,7 @@ export default {
|
|
|
.mt10 {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
+:deep.el-form--inline .el-form-item {
|
|
|
+ margin-bottom: 10rpx !important;
|
|
|
+}
|
|
|
</style>
|