Explorar o código

修改搜索牧场

Shan9312 hai 8 meses
pai
achega
eae9485ca2

BIN=BIN
dist-正式-现代牧业-20240701.zip


BIN=BIN
dist-测试-现代牧业-20240701.zip


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/index.html


+ 5 - 10
src/views/report/vehiclUtilizaRate/index.vue

@@ -11,7 +11,7 @@
       >
       </el-date-picker>
       <el-select
-        v-model="getdataListParm.pastureName"
+        v-model="getdataListParm.pastureId"
         placeholder="牧场"
         class="filter-item"
         style="width: 120px"
@@ -21,7 +21,7 @@
           v-for="item in findAllPasture"
           :key="item.id"
           :label="item.name"
-          :value="item.name"
+          :value="item.id"
         />
       </el-select>
       <el-input
@@ -113,7 +113,7 @@ export default {
       getdataListParm: {
         pagecount: 10,
         offset: 1,
-        pastureId: Cookies.get('pastureid'),
+        pastureId: parseInt(Cookies.get('pastureid')),
         pastureName: Cookies.get('pasturename'),
         date: parseTime(new Date(), '{y}-{m}'), // 日期
         eqCode: ''
@@ -185,13 +185,8 @@ export default {
   methods: {
     // 点击
     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() {

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio