智慧农业大数据平台
zengh
2022-07-09 827c74bbf2ca37a7b76b8e48a635944235227564
市场流通
3 files modified
73 ■■■■■ changed files
src/api/farm/farmingrecord.js 9 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 4 ●●●● patch | view | raw | blame | history
src/views/manage/index.vue 60 ●●●●● patch | view | raw | blame | history
src/api/farm/farmingrecord.js
@@ -115,6 +115,15 @@
        }
    })
}
export const statisticsStockMonth = (params) => {
    return request({
        url: '/farmProductStock/statisticsStockMonth',
        method: 'get',
        params: {
            ...params
        }
    })
}
export const pageCount = (params) => {
    return request({
src/views/home/index.vue
@@ -65,7 +65,7 @@
                            <div class="state">在使用</div>
                            <div class="text">
                                <div class="num">{{ landsnum.toFixed(2) }}</div>
                                <div class="num">{{ landsnum.toFixed(0) }}</div>
                                <div class="unit">亩</div>
                            </div>
                        </div>
@@ -75,7 +75,7 @@
                            <div class="state">空闲中</div>
                            <div class="text">
                                <div class="num">{{ landwnum }}</div>
                                <div class="num">{{ landwnum.toFixed(0) }}</div>
                                <div class="unit">亩</div>
                            </div>
                        </div>
src/views/manage/index.vue
@@ -237,7 +237,18 @@
<script>
    import { selectXCount } from '@/api/land/land'
    // eslint-disable-next-line no-unused-vars
    import { page, getStockCount, pagePalnt, statisticsStockAndYield, pageCount, pageCountNz, selectMarketCirculate, countTaskNum, farmingRecords } from '@/api/farm/farmingrecord'
    import {
        page,
        getStockCount,
        pagePalnt,
        statisticsStockAndYield,
        pageCount,
        pageCountNz,
        selectMarketCirculate,
        countTaskNum,
        farmingRecords,
        statisticsStockMonth
    } from '@/api/farm/farmingrecord'
    export default {
        data () {
@@ -255,6 +266,8 @@
                stockNCP: 0,
                // 加工产品数量统计
                stockJG: 0,
                // 产量按月统计
                yieldMonth: [],
                // 年产量统计
                yieldTj: 0,
                // 农产品年产量统计
@@ -282,6 +295,8 @@
            this.page()
            // 年产量与库存数量
            this.statisticsStockAndYield()
            // 按月统计产量
            this.statisticsStockMonth()
            // 农产品投入
            this.pageCount()
            // 农资投入
@@ -295,7 +310,6 @@
        },
        mounted () {
            // this.initNcpBar('NcpEcharts')
            this.initClSyBar('ClSyEcharts')
        },
        methods: {
            initBar (dom) {
@@ -630,12 +644,12 @@
                    '12'
                ]
                var data1 = [
                    '180',
                    '320',
                    '400',
                    '200',
                    '110',
                    '180',
                    '0',
                    '0',
                    '0',
                    '0',
                    '0',
                    '0',
                    '0',
                    '0',
                    '0',
@@ -643,20 +657,11 @@
                    '0',
                    '0'
                ]
                var data2 = [
                    '0',
                    '0',
                    '0',
                    '260',
                    '0',
                    '230',
                    '0',
                    '0',
                    '0',
                    '0',
                    '0',
                    '0'
                ]
                var data2 = []
                var ncp = this.yieldMonth
                for (let i = 1; i <= 12; i++) {
                    data2.push(ncp[i])
                }
                const option = {
                    grid: {
@@ -802,6 +807,17 @@
                    this.yieldTj = res.data.data.ncpNcl + res.data.data.jgNcl
                })
            },
            // 按月统计产量
            statisticsStockMonth () {
                var params = {}
                params.tenantId = '000000'
                params.deptId = '1123598813738675201'
                params.year = '2022'
                statisticsStockMonth(Object.assign(params)).then((res) => {
                    this.yieldMonth = res.data.data
                    this.initClSyBar('ClSyEcharts')
                })
            },
            // 农产品投入
            pageCount () {
                var params = {}