From 8ea122ff1ec010e9819a55f6750c4cfd513b9945 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Fri, 19 Aug 2022 17:56:36 +0800
Subject: [PATCH] 农场选择,已注释
---
src/views/equipment/index.vue | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/src/views/equipment/index.vue b/src/views/equipment/index.vue
index f8506b4..c1b8e23 100644
--- a/src/views/equipment/index.vue
+++ b/src/views/equipment/index.vue
@@ -21,6 +21,20 @@
:value="item.id"
></el-option>
</el-select>
+<!--
+ <el-select
+ class="equipment-plot-select"
+ v-model="farmName"
+ placeholder="选择地块"
+ @change="farmChangeValue($event)"
+ >
+ <el-option
+ v-for="(item, index) in farmList"
+ :key="index"
+ :label="item.farmName"
+ :value="item.id"
+ ></el-option>
+ </el-select> -->
</div>
</div>
@@ -207,6 +221,9 @@
getLandList
} from '@/api/land/land'
import {
+ getFarmList
+} from '@/api/farm/farmingrecord'
+import {
getStationAndVideoByLandId,
getStationDateByStcd
} from '@/api/equipment/equipment'
@@ -220,6 +237,9 @@
plotNameObj: {},
plotName: '',
plotList: [],
+ farmNameObj:{},
+ farmName:"",
+ farmList:[],
currentDetails: {},
echartsBosShow: false,
vidList: [],
@@ -233,6 +253,7 @@
created () {
this.getParams()
this.getLandList()
+ // this.getFarmList()
},
mounted () {
@@ -394,6 +415,32 @@
this.getStationAndVideoByLandId(this.plotNameObj.id, 'ALL')
})
},
+ // farmChangeValue(value){
+ // this.getStationAndVideoByFarmId(value,'ALL')
+ // },
+ // getFarmList(){
+ // getFarmList().then((res)=>{
+ // this.farmList = res.data.data
+ // this.farmNameObj = this.farmList[0]
+ // this.farmName = this.farmNameObj
+ // })
+ // // this.getStationAndVideoByFarmId(this.farmNameObj.id,'ALL')
+ // },
+ // getStationAndVideoByFarmId(id,type){
+ // this.vidList = []
+ // this.staList = []
+ // var landList = []
+ // getLandList(id).then((res)=>{
+ // landList = res.data.data
+ // landList.forEach((e)=>{
+ // getStationAndVideoByLandId(e.id,type).then((res)=>{
+ // this.vidList.push(res.data.data.vidList)
+ // this.staList.push(res.data.data.staList)
+ // })
+ // })
+ // })
+ // },
+
// 根据地块id查询监控和监测设备
getStationAndVideoByLandId (id, type) {
getStationAndVideoByLandId(id, type).then((res) => {
--
Gitblit v1.9.3