智慧农业后台管理页面
src/views/farmplant/inventorylist.vue
@@ -60,15 +60,19 @@
                column: [
                    {
                        label: "品种",
                        prop: "strainId",
                        prop: "kind",
                        search: true,
                        hide: true,
                        display: true,
                        display: false,
                        type: "select",
                        dicUrl: '/api/strain/strain-tree',
                        dicUrl: '/api/strain/kind-tree',
                        dicFormatter:(res)=>{
                          this.kindList = res.data
                          return res.data
                        },
                        props: {
                            label: "strainName",
                            value: "id"
                          label: "kindName",
                          value: "id"
                        }
                    },
                    {
@@ -140,6 +144,13 @@
            this.onLoad(this.page)
        },
        searchChange (params, done) {
            if (params.kind){
              this.kindList.forEach(e=>{
                if (e.id == params.kind){
                  params.type = e.type
                }
              })
            }
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
@@ -161,7 +172,7 @@
                    message: "操作成功!"
                });
            });
        },
        },
    }
}
</script>