|
@@ -11,7 +11,7 @@
|
|
>
|
|
>
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
<el-select
|
|
<el-select
|
|
- v-model="getdataListParm.pastureName"
|
|
|
|
|
|
+ v-model="getdataListParm.pastureId"
|
|
placeholder="牧场"
|
|
placeholder="牧场"
|
|
class="filter-item"
|
|
class="filter-item"
|
|
style="width: 120px"
|
|
style="width: 120px"
|
|
@@ -21,7 +21,7 @@
|
|
v-for="item in findAllPasture"
|
|
v-for="item in findAllPasture"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
- :value="item.name"
|
|
|
|
|
|
+ :value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
<el-input
|
|
<el-input
|
|
@@ -113,7 +113,7 @@ export default {
|
|
getdataListParm: {
|
|
getdataListParm: {
|
|
pagecount: 10,
|
|
pagecount: 10,
|
|
offset: 1,
|
|
offset: 1,
|
|
- pastureId: Cookies.get('pastureid'),
|
|
|
|
|
|
+ pastureId: parseInt(Cookies.get('pastureid')),
|
|
pastureName: Cookies.get('pasturename'),
|
|
pastureName: Cookies.get('pasturename'),
|
|
date: parseTime(new Date(), '{y}-{m}'), // 日期
|
|
date: parseTime(new Date(), '{y}-{m}'), // 日期
|
|
eqCode: ''
|
|
eqCode: ''
|
|
@@ -185,13 +185,8 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 点击
|
|
// 点击
|
|
chosePasture(val) {
|
|
chosePasture(val) {
|
|
- const arr = this.findAllPasture.filter((item) => {
|
|
|
|
- if ((item.name = val)) {
|
|
|
|
- return item
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- console.log(val, arr, 'hss')
|
|
|
|
- this.getdataListParm.pastureId = arr[0].id
|
|
|
|
|
|
+ this.getdataListParm.pastureId = this.findAllPasture.find(item => item.id == val).id
|
|
|
|
+ console.log(val, this.getdataListParm.pastureId, 'hss')
|
|
},
|
|
},
|
|
// 点击搜索
|
|
// 点击搜索
|
|
handlerSerch() {
|
|
handlerSerch() {
|