智慧农业大数据平台
guanqb
2022-08-18 18a572d52dd64e039bc1f951cf7f8d5dd2682add
只显示当前正在种养品种
2 files modified
28 ■■■■ changed files
src/views/farm/index.vue 27 ●●●● patch | view | raw | blame | history
src/views/v/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/farm/index.vue
@@ -151,8 +151,7 @@
                    v-for="(item, index) in equipmentList"
                    :key="'equipmentList' + index"
                    class="lists-item"
                    @click="item.dictTypeNum == 0?goToJkDetail(item
                        ):goToDetail(item)"
                    @click="setSiteCenter(item)"
                >
                    <div class="title">
                        <img v-if="item.dictTypeNum == 0" src="/img/icon/jk.png" alt />
@@ -629,7 +628,6 @@
            getFarmingRecordList({ farmId: this.currentDetails.id, landId: params.id }).then(res => {
                this.plotDetailsRecordList = res.data.data
            })
            this.napePlotPopupFlag = true
        },
@@ -689,7 +687,7 @@
        },
        getFarmPlantList () {
            getFarmPlantList({ farmId: this.currentDetails.id }).then(res => {
            getFarmPlantList({ farmId: this.currentDetails.id, status: 1 }).then(res => {
                this.farmPlantList = res.data.data
            })
        },
@@ -719,6 +717,24 @@
            queryEquipmentList({ type: 'ALL', farmId: this.currentDetails.id }).then((res) => {
                if (JSON.stringify(res.data) != '{}' && res.data.data) {
                    that.equipmentList = res.data.data.equipmentList
                    that.equipmentList.forEach(item => {
                        // 气象
                        if (item.dictTypeNum == 1) {
                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-qx.png')
                        } else if (item.dictTypeNum == 2) {
                            // 空气
                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-qx.png')
                        } else if (item.dictTypeNum == 3) {
                            // 水质
                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-sz.png')
                        } else if (item.dictTypeNum == 4) {
                            // 土壤
                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-tr.png')
                        } else if (item.dictTypeNum == 0) {
                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-jk.png')
                        }
                    })
                }
            })
        },
@@ -954,6 +970,9 @@
                this.stationData = res.data.data
            })
        },
        setSiteCenter (item) {
            this.$refs.modalForm.setSiteCenter(item.name)
        }
    }
}
src/views/v/index.vue
@@ -203,6 +203,7 @@
        //获取种养品列表
        getFarmPlantList (page, params = {}) {
            params['farmId'] = 1
            params['status'] = 1
            getList(
                page.currentPage,
                page.pageSize,