| | |
| | | // 选择的农事类型 |
| | | farmOperType: '', |
| | | // 农场地块id |
| | | farmPlotId: '' |
| | | farmPlotId: '', |
| | | // 全局农场参数 |
| | | farmID: '' |
| | | } |
| | | }, |
| | | created () { |
| | | // 本年农事操作记录 |
| | | this.getFarmingStatis() |
| | | this.getFarmingCount() |
| | | this.pagePalnt() |
| | | this.selectXCount() |
| | | this.SelectCount() |
| | | this.selctSaletCount() |
| | | this.selctSaletZ() |
| | | this.selectMarketDistrict() |
| | | |
| | | // 数据刷新 |
| | | this.AllDataUpdate() |
| | | this.getFarmList() |
| | | this.getLandList() |
| | | }, |
| | |
| | | this.initRightPie('EquipmentEcharts') |
| | | }, |
| | | methods: { |
| | | // 全局数据刷新事件 |
| | | AllDataUpdate () { |
| | | this.getFarmingStatis() |
| | | this.getFarmingCount() |
| | | this.pagePalnt() |
| | | this.selectXCount() |
| | | this.SelectCount() |
| | | this.selctSaletCount() |
| | | this.selctSaletZ() |
| | | this.selectMarketDistrict() |
| | | }, |
| | | // 农事操作搜索 |
| | | farmSelectList () { |
| | | this.farmOperClick({ type: this.farmOperType, landId: this.farmPlotId }) |
| | |
| | | |
| | | setCenter (item) { |
| | | this.ncListShow = false |
| | | this.farmId = item.id |
| | | this.AllDataUpdate() |
| | | this.$refs.modalForm.setCenter(item.farmName) |
| | | }, |
| | | |
| | |
| | | // 企业概况 |
| | | SelectCount () { |
| | | var that = this |
| | | SelectCount().then((res) => { |
| | | var farmId = this.farmId |
| | | SelectCount(farmId).then((res) => { |
| | | that.ncnum = res.data.data.ncnum |
| | | that.rynum = res.data.data.rynum |
| | | }) |
| | |
| | | // 大屏销售统计 |
| | | selctSaletCount () { |
| | | var that = this |
| | | selctSaletCount().then((res) => { |
| | | var params = {} |
| | | params.farmId = this.farmId |
| | | selctSaletCount(Object.assign(params)).then((res) => { |
| | | that.salaNumY = res.data.data |
| | | this.initLine('TrendEcharts') |
| | | }) |
| | |
| | | // 按行政区统计市场流通 |
| | | selectMarketDistrict () { |
| | | var that = this |
| | | selectMarketDistrict().then((res) => { |
| | | var params = {} |
| | | params.farmId = this.farmId |
| | | selectMarketDistrict(Object.assign(params)).then((res) => { |
| | | that.marketDistrict = res.data.data |
| | | }) |
| | | }, |
| | | // 统计今年和去年的销售总额 |
| | | selctSaletZ () { |
| | | var that = this |
| | | selctSaletZ().then((res) => { |
| | | var params = {} |
| | | params.farmId = this.farmId |
| | | selctSaletZ(Object.assign(params)).then((res) => { |
| | | that.salaNum = res.data.data[0].num.toString().split('') |
| | | }) |
| | | }, |
| | | getFarmingCount () { |
| | | var that = this |
| | | var deptId = '1123598813738675201' |
| | | var farmId = this.farmId |
| | | |
| | | getFarmingCount(deptId).then((res) => { |
| | | getFarmingCount(farmId).then((res) => { |
| | | that.total = res.data.data |
| | | // that.total = 0; |
| | | if (that.total > 0) { |
| | |
| | | // 本年农事操作记录,分组统计 |
| | | getFarmingStatis () { |
| | | var that = this |
| | | var deptId = '1123598813738675201' |
| | | getFarmingStatis(deptId).then((res) => { |
| | | var farmId = this.farmId |
| | | getFarmingStatis(farmId).then((res) => { |
| | | that.farmingList = res.data.data |
| | | }) |
| | | }, |
| | |
| | | selectXCount () { |
| | | // eslint-disable-next-line no-unused-vars |
| | | var that = this |
| | | selectXCount().then((res) => { |
| | | var farmId = this.farmId |
| | | selectXCount(farmId).then((res) => { |
| | | that.landsnum = res.data.data.snum |
| | | that.landwnum = res.data.data.wnum |
| | | |
| | |
| | | status: 1 |
| | | } |
| | | params.tenantId = '000000' |
| | | params.deptId = '1123598813738675201' |
| | | params.farmId = this.farmId |
| | | pagePalnt(1, 10, Object.assign(params)).then((res) => { |
| | | const data = res.data.data |
| | | that.num = data.num |