| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="more"> |
| | | <div class="more" @click="popDetailedSupervise"> |
| | | 明细 |
| | | <img src="/img/icon/more.png" alt/> |
| | | </div> |
| | |
| | | <div class="title-box"> |
| | | <div> |
| | | <div class="item" :class="{on : cltjOrsym == 'cltj'}"> |
| | | <div @click="cltjOrsym='cltj'" class="title">产量统计</div> |
| | | <div @click="cltjOrSymChange('cltj')" class="title">产量统计</div> |
| | | <span></span> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="item" :class="{on : cltjOrsym == 'sym'}"> |
| | | <div @click="cltjOrsym='sym'" class="title">溯源查询趋势图</div> |
| | | <div @click="cltjOrSymChange('sym')" class="title">溯源查询趋势图</div> |
| | | <span></span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="more"> |
| | | <div class="more" @click="popDetailedFarming"> |
| | | 更多 |
| | | <img src="/img/icon/more.png" alt/> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <public-box v-show="trpPopupFlag" class="public-trace-table"> |
| | | <template slot="public-box-header"> |
| | | <div class="logo"></div> |
| | | <div class="title">投入品监管明细</div> |
| | | <img |
| | | @click="trpPopupFlag = false" |
| | | src="/img/icon/public-close.png" |
| | | alt |
| | | class="close" |
| | | /> |
| | | </template> |
| | | <template slot="public-box-content"> |
| | | <div class="action-bar"> |
| | | <div class="search"> |
| | | <el-input |
| | | class="search-input" |
| | | size="small" |
| | | prefix-icon="el-icon-search" |
| | | placeholder="请输入内容" |
| | | v-model="input1" |
| | | ></el-input> |
| | | </div> |
| | | <div class="btn-grounp"> |
| | | <el-button |
| | | size="small" |
| | | class="search" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | >查询</el-button> |
| | | <el-button |
| | | size="small" |
| | | class="reset" |
| | | type="info" |
| | | icon="el-icon-refresh-right" |
| | | >重置</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table-list"> |
| | | <div class="t-header"> |
| | | <div class="sym-style">农资</div> |
| | | <div>分类</div> |
| | | <div>规格</div> |
| | | <div>数量</div> |
| | | <div>操作</div> |
| | | </div> |
| | | <div class="t-body"> |
| | | <div class="table-list"> |
| | | <div class="sym-style"> |
| | | <div>硝酸复合肥(15-15-15)</div> |
| | | </div> |
| | | <div>化肥</div> |
| | | <div>1克/袋</div> |
| | | <div>42袋</div> |
| | | <div> |
| | | <el-button |
| | | @click="openPopup('/img/icon/sym.png')" |
| | | size="small" |
| | | class="look" |
| | | type="info" |
| | | >查看</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </public-box> |
| | | |
| | | <public-box v-show="nsjlPopupFlag" class="public-trace-table"> |
| | | <template slot="public-box-header"> |
| | | <div class="logo"></div> |
| | | <div class="title">农事记录</div> |
| | | <img |
| | | @click="nsjlPopupFlag = false" |
| | | src="/img/icon/public-close.png" |
| | | alt |
| | | class="close" |
| | | /> |
| | | </template> |
| | | <template slot="public-box-content"> |
| | | <div class="action-bar"> |
| | | <div class="search"> |
| | | <el-input |
| | | class="search-input" |
| | | size="small" |
| | | prefix-icon="el-icon-search" |
| | | placeholder="请输入内容" |
| | | v-model="input1" |
| | | ></el-input> |
| | | </div> |
| | | <div class="btn-grounp"> |
| | | <el-button |
| | | size="small" |
| | | class="search" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | >查询</el-button> |
| | | <el-button |
| | | size="small" |
| | | class="reset" |
| | | type="info" |
| | | icon="el-icon-refresh-right" |
| | | >重置</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table-list"> |
| | | <div class="t-header"> |
| | | <div class="sym-style">农事类型</div> |
| | | <div>所属地块</div> |
| | | <div>农资</div> |
| | | <div>作业方式</div> |
| | | <div>操作</div> |
| | | </div> |
| | | <div class="t-body"> |
| | | <div class="table-list"> |
| | | <div class="sym-style"> |
| | | <div>施肥</div> |
| | | </div> |
| | | <div>1号地块</div> |
| | | <div>1524217070160453633</div> |
| | | <div>人工</div> |
| | | <div> |
| | | <el-button |
| | | @click="openPopup('/img/icon/sym.png')" |
| | | size="small" |
| | | class="look" |
| | | type="info" |
| | | >查看</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </public-box> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | statisticsStockMonth, |
| | | productsSupervise, |
| | | pageCountNzCrk, |
| | | getSweepRecordStatistics |
| | | getSweepRecordStatistics, |
| | | getSweepRecordStatisticsByDayOrMonthOrYear |
| | | } from '@/api/farm/farmingrecord' |
| | | |
| | | export default { |
| | |
| | | NcpJg: [], |
| | | // 溯源次数 |
| | | sweepList: {}, |
| | | // 溯源趋势 |
| | | sweepTrend: [], |
| | | nzOrNcp: 'ncp', |
| | | trpOrNcp: 'trp', |
| | | nsjlOrnz: 'nsjl', |
| | | cltjOrsym: 'cltj' |
| | | cltjOrsym: 'cltj', |
| | | // 投入品监管窗体控制 |
| | | trpPopupFlag: false, |
| | | // 农事记录 |
| | | nsjlPopupFlag: false |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | this.selectMarketCirculate() |
| | | // 统计任务总数 |
| | | this.countTaskNum('2022-07') |
| | | // 溯源趋势统计 |
| | | this.getSweepRecordStatisticsByDayOrMonthOrYear('2022-07') |
| | | // 农事操作 |
| | | this.farmingRecords() |
| | | // 农产品监管 |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | // 投入品监管明细弹窗 |
| | | popDetailedSupervise () { |
| | | this.trpPopupFlag = true |
| | | }, |
| | | // 农事记录明细弹窗 |
| | | popDetailedFarming () { |
| | | this.nsjlPopupFlag = true |
| | | }, |
| | | // 任务总数时间查询 |
| | | getTaskTime (e) { |
| | | this.countTaskNum(e) |
| | |
| | | getCltjTime (e) { |
| | | this.statisticsStockMonth(e) |
| | | }, |
| | | // 溯源码时间查询 |
| | | // 溯源趋势时间查询 |
| | | getSymTime (e) { |
| | | this.getSweepRecordStatisticsByDayOrMonthOrYear(e) |
| | | }, |
| | | initBar (dom) { |
| | | const that = this |
| | |
| | | const that = this |
| | | const chartDom = document.getElementById(dom) |
| | | const myChart = this.$echarts.init(chartDom) |
| | | myChart.clear() |
| | | var nztrData = this.nztr |
| | | var nztrX = [] |
| | | var nztrY = [] |
| | |
| | | initClSyBar (dom) { |
| | | const chartDom = document.getElementById(dom) |
| | | const myChart = this.$echarts.init(chartDom) |
| | | |
| | | myChart.clear() |
| | | var data = [] |
| | | var data1 = [ |
| | | '0', |
| | |
| | | ] |
| | | } |
| | | |
| | | option && myChart.setOption(option) |
| | | }, |
| | | initSymyBar (dom) { |
| | | const chartDom = document.getElementById(dom) |
| | | const myChart = this.$echarts.init(chartDom) |
| | | myChart.clear() |
| | | |
| | | var data = this.sweepTrend |
| | | var x = [] |
| | | var y = [] |
| | | for (var i = 0; i < data.length; i++) { |
| | | y.push(data[i].num) |
| | | x.push(data[i].time) |
| | | } |
| | | |
| | | var option = { |
| | | grid: { |
| | | top: '10%', |
| | | right: '0%', |
| | | left: '0%', |
| | | bottom: '0%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: x |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | min: 0, |
| | | type: 'value', |
| | | axisLabel: { |
| | | interval: 0, |
| | | show: true, |
| | | textStyle: { |
| | | color: '#B4B5BE' |
| | | } |
| | | }, |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#697B89', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: 'rgba(62,81,97, .5)', |
| | | type: 'dashed' |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | data: y, |
| | | type: 'line', |
| | | smooth: true, |
| | | areaStyle: {} |
| | | } |
| | | ] |
| | | } |
| | | option && myChart.setOption(option) |
| | | }, |
| | | // 农场使用率 |
| | |
| | | this.sweepList = res.data.data |
| | | }) |
| | | }, |
| | | // 溯源趋势统计 |
| | | getSweepRecordStatisticsByDayOrMonthOrYear (year) { |
| | | var params = {} |
| | | // 农场id |
| | | params.farmId = '1' |
| | | params.time = year |
| | | getSweepRecordStatisticsByDayOrMonthOrYear(Object.assign(params)).then((res) => { |
| | | this.sweepTrend = res.data.data |
| | | if (this.cltjOrsym == 'sym') { |
| | | this.initSymyBar('ClSyEcharts') |
| | | } |
| | | }) |
| | | }, |
| | | // 监管图表切换 |
| | | trpOrNcpChange (item) { |
| | | var that = this |
| | |
| | | // 农产品监管 |
| | | that.initNcpBar('TrpEcharts') |
| | | } |
| | | }, |
| | | // 产量统计图表切换 |
| | | cltjOrSymChange (item) { |
| | | var that = this |
| | | that.cltjOrsym = item |
| | | if (item == 'cltj') { |
| | | this.initClSyBar('ClSyEcharts') |
| | | } else { |
| | | // 溯源码 |
| | | this.initSymyBar('ClSyEcharts') |
| | | } |
| | | } |
| | | } |
| | | } |