智慧农业后台管理页面
xiebin
2022-08-01 3de9eb34a21123f0e67ae356f2cb98a7802827c8
地块详情添加农资使用记录
5 files modified
46 ■■■■■ changed files
src/api/farm/farmingrecord.js 13 ●●●●● patch | view | raw | blame | history
src/views/farm/farmingrecord.vue 1 ●●●● patch | view | raw | blame | history
src/views/farmplant/farmplant.vue 16 ●●●● patch | view | raw | blame | history
src/views/land/LandDetail.vue 6 ●●●●● patch | view | raw | blame | history
src/views/recovery/recovery.vue 10 ●●●●● patch | view | raw | blame | history
src/api/farm/farmingrecord.js
@@ -11,6 +11,17 @@
        }
    })
}
export const getListByNz = (current, size, params) => {
  return request({
    url: '/api/farmingRecord/pageNz',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const remove = (ids) => {
    return request({
        url: '/api/farmingRecord/remove',
@@ -66,4 +77,4 @@
            deptId
        }
    })
}
}
src/views/farm/farmingrecord.vue
@@ -67,6 +67,7 @@
                editBtn: true,
                delBtn: true,
                viewBtn: true,
                header:false,
                menuWidth: 200,
                menuAlign: "center",
                align: "center",
src/views/farmplant/farmplant.vue
@@ -42,7 +42,7 @@
        <detection v-if="detectionVisible" ref="detection"></detection>
    </basic-container>
</template>
<script>
import { getDetail, getList, update, remove, save } from "@/api/farmplant/farmplant"
import { getStrainList } from "@/api/farmplant/strain"
@@ -71,12 +71,14 @@
            },
            selectionList: [],
            landList: [],
            landId: 0,
            option: {
                tip: false,
                height: 520,
                editBtn: true,
                delBtn: true,
                viewBtn: true,
                header:false,
                menuWidth: 280,
                menuAlign: "center",
                align: "center",
@@ -183,6 +185,9 @@
                            value: "id"
                        },
                        labelWidth: 110,
                        change: (val) => {
                          this.landId = val.value
                        },
                        rules: [
                            {
                                required: true,
@@ -683,6 +688,11 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            var datas = this.$route.query.id
            params.landId = datas
            if (this.landId) {
              params['landId'] = this.landId
            }
            params['tenantId'] = this.userInfo.tenant_id
            params['deptId'] = this.userInfo.dept_id
            this.loading = true
@@ -708,6 +718,6 @@
    },
};
</script>
<style>
</style>
</style>
src/views/land/LandDetail.vue
@@ -34,6 +34,10 @@
                    <el-tab-pane label="采收记录" name="tab3">
                        <recovery></recovery>
                    </el-tab-pane>
                    <!-- 农资记录 -->
                    <el-tab-pane label="农资使用记录" name="tab4">
                      <stockUseInfo></stockUseInfo>
                    </el-tab-pane>
                </el-tabs>
            </div>
        </div>
@@ -60,6 +64,7 @@
import farmplant from "@/views/farmplant/farmplant.vue"
import farming from "@/views/farm/farmingrecord.vue"
import recovery from "@/views/recovery/recovery.vue"
import stockUseInfo from "@/views/farm/stockUseInfo.vue"
import getMapDataInThere from "./getMapDataInThere.vue"
import { remove, update } from "@/api/land/land"
@@ -68,6 +73,7 @@
        farmplant,
        farming,
        recovery,
        stockUseInfo,
        getMapDataInThere
    },
    data () {
src/views/recovery/recovery.vue
@@ -57,6 +57,7 @@
            },
            selectionList: [],
            landList: [],
            landId:0,
            option: {
                tip: false,
                height: 520,
@@ -64,6 +65,7 @@
                delBtn: true,
                viewBtn: false,
                addBtn: false,
                header:false,
                menuWidth: 200,
                menuAlign: "center",
                align: "center",
@@ -110,6 +112,9 @@
                        props: {
                            label: "landName",
                            value: "id"
                        },
                        change: (val) => {
                          this.landId = val.value
                        },
                        rules: [
                            {
@@ -427,6 +432,11 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            var datas = this.$route.query.id
            params.landId = datas
            if (this.landId) {
              params['landId'] = this.landId
            }
            params['tenantId'] = this.userInfo.tenant_id
            params['deptId'] = this.userInfo.dept_id
            this.loading = true