# add status select
This commit is contained in:
parent
b7fa1fea17
commit
306e477364
|
@ -11,13 +11,27 @@
|
|||
style="width: 10rem"
|
||||
auto-complete="off"
|
||||
@keyup.enter.native="onSubmit"
|
||||
placeholder="设备ID"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select size="mini"
|
||||
style="width: 5rem"
|
||||
v-model="DeviceSearchForm.status"
|
||||
placeholder="状态"
|
||||
>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="在线" value="1"></el-option>
|
||||
<el-option label="离线" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="onSubmit">提交</el-button>
|
||||
<el-button size="mini" @click="resetSearch">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- table -->
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="deviceList"
|
||||
|
@ -107,14 +121,15 @@ export default {
|
|||
},
|
||||
onSubmit() {
|
||||
const device_id = this.DeviceSearchForm.device_id
|
||||
this.getDevices({ device_id })
|
||||
const status = this.DeviceSearchForm.status
|
||||
this.getDevices({ device_id, status })
|
||||
},
|
||||
resetSearch() {
|
||||
this.DeviceSearchForm.device_id = ''
|
||||
this.DeviceSearchForm.status = ''
|
||||
this.getDevices()
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
// console.log(page)
|
||||
this.listLoading = true
|
||||
this.getDevices({ page })
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue