|
@@ -10,37 +10,26 @@
|
|
|
<!-- 查询条件 -->
|
|
|
<div class="conditions">
|
|
|
<el-form ref="searchForm" inline :model="searchForm" size="mini" label-width="110px">
|
|
|
- <el-form-item label="注册时间:" prop="registerStartTime" style="width: 270px">
|
|
|
+ <el-form-item label="注册时间:" prop="registerTime" style="width: 310px">
|
|
|
<!-- <el-input v-model="searchForm.registerTime" placeholder=""></el-input> -->
|
|
|
<el-date-picker
|
|
|
- v-model="searchForm.registerStartTime"
|
|
|
- type="date"
|
|
|
+ v-model="searchForm.registerTime"
|
|
|
+ type="daterange"
|
|
|
placeholder="选择日期"
|
|
|
- style="width: 150px">
|
|
|
+ style="width: 200px">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="省市县:" prop="countyName" style="width: 270px">
|
|
|
- <!-- 改用组件 -->
|
|
|
- <!-- FIXME: 等待组件,到底是 countName 还是对应的编码不清楚,但一定使用选择下拉框 -->
|
|
|
- <el-input v-model="searchForm.countyName" placeholder="地县/编码" style="width: 150px"></el-input>
|
|
|
+ <el-form-item label="省市县:" prop="countyName" style="width: 310px">
|
|
|
+ <el-input v-model="searchForm.countyName" placeholder="地县名/编码" style="width: 200px"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="牧场:" prop="farmCode" style="width: 270px">
|
|
|
- <!-- <el-input v-model="searchForm.farm" placeholder="牧场名/牧场编号"></el-input> -->
|
|
|
- <!-- FIXME: 牧场数据还没有,el-option 的具体内容也没修正 -->
|
|
|
- <el-select v-model="searchForm.farmCode" style="width: 150px">
|
|
|
- <el-option
|
|
|
- v-for="item in farmList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="牧场:" prop="farmName" style="width: 310px">
|
|
|
+ <el-input v-model="searchForm.farmName" placeholder="牧场名/编码" style="width: 200px"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="栋舍:" prop="pigsty" style="width: 270px">
|
|
|
- <el-input v-model="searchForm.pigsty" placeholder="" style="width: 150px"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="网络通信状态:" prop="networkStatus" style="width: 270px">
|
|
|
- <el-select v-model="searchForm.networkStatus" style="width: 150px">
|
|
|
+ <!-- <el-form-item label="栋舍:" prop="pigsty" style="width: 310px">
|
|
|
+ <el-input v-model="searchForm.pigsty" placeholder="" style="width: 200px"></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="网络通信状态:" prop="networkStatus" style="width: 310px">
|
|
|
+ <el-select v-model="searchForm.networkStatus" style="width: 200px">
|
|
|
<el-option
|
|
|
v-for="item in networkList"
|
|
|
:key="item.value"
|
|
@@ -49,8 +38,8 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="采集状态:" prop="acqStatus" style="width: 270px">
|
|
|
- <el-select v-model="searchForm.acqStatus" style="width: 150px">
|
|
|
+ <el-form-item label="采集状态:" prop="acqStatus" style="width: 310px">
|
|
|
+ <el-select v-model="searchForm.acqStatus" style="width: 200px">
|
|
|
<el-option
|
|
|
v-for="item in acqList"
|
|
|
:key="item.value"
|
|
@@ -59,8 +48,8 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="注销状态:" prop="canStatus" style="width: 270px">
|
|
|
- <el-select v-model="searchForm.canStatus" style="width: 150px">
|
|
|
+ <el-form-item label="注销状态:" prop="canStatus" style="width: 310px">
|
|
|
+ <el-select v-model="searchForm.canStatus" style="width: 200px">
|
|
|
<el-option
|
|
|
v-for="item in canList"
|
|
|
:key="item.value"
|
|
@@ -69,11 +58,11 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="设备编码:" prop="deviceCode" style="width: 270px">
|
|
|
- <el-input v-model="searchForm.deviceCode" placeholder="" style="width: 150px"></el-input>
|
|
|
+ <el-form-item label="设备编码:" prop="deviceCode" style="width: 310px">
|
|
|
+ <el-input v-model="searchForm.deviceCode" placeholder="" style="width: 200px"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-left: 55px">
|
|
|
- <el-button plain @click="init">查询</el-button>
|
|
|
+ <el-button type="primary" @click="init">查询</el-button>
|
|
|
<el-button plain type="info" @click="resetForm('searchForm')">清空</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -258,13 +247,10 @@ export default {
|
|
|
//
|
|
|
],
|
|
|
searchForm: { // 查询条件
|
|
|
- farmCode: '',
|
|
|
- registerStartTime: '',
|
|
|
- registerEndTime: '',
|
|
|
+ registerTime: [],
|
|
|
deviceCode: '',
|
|
|
countyName: '',
|
|
|
- // farmName: '',
|
|
|
- pigsty: '',
|
|
|
+ farmName: '',
|
|
|
networkStatus: '',
|
|
|
acqStatus: '',
|
|
|
canStatus: '',
|
|
@@ -379,14 +365,14 @@ export default {
|
|
|
params: this.$http.adornParams({
|
|
|
'page': this.pageIndex,
|
|
|
'limit': this.pageSize,
|
|
|
- 'farmCode': this.searchForm.farmCode || undefined,
|
|
|
- 'registerStartTime': this.searchForm.registerStartTime || undefined,
|
|
|
- 'registerEndTime': this.searchForm.registerEndTime || undefined,
|
|
|
+ 'farmName': this.searchForm.farmName || undefined,
|
|
|
+ 'registerStartTime': this.searchForm.registerTime[0] || undefined,
|
|
|
+ 'registerEndTime': this.searchForm.registerTime[1] || undefined,
|
|
|
'deviceCode': this.searchForm.deviceCode || undefined,
|
|
|
'countyName': this.searchForm.countyName || undefined,
|
|
|
- 'farmName': this.searchForm.farmName || undefined,
|
|
|
- 'acqStatus': this.searchForm.acqStatus || undefined,
|
|
|
- 'sortord': this.searchForm.sortord || undefined
|
|
|
+ 'networkStatus': this.searchForm.networkStatus?? undefined,
|
|
|
+ 'acqStatus': this.searchForm.acqStatus?? undefined,
|
|
|
+ 'canStatus': this.searchForm.canStatus?? undefined
|
|
|
}, false)
|
|
|
}).then(async({data}) => {
|
|
|
console.log(data);
|