| | |
| | | <p style="position: relative; top: -12px"> |
| | | <span |
| | | style="font-size: 32px; font-weight: 550; margin-top: -10px" |
| | | >{{ landInfo.rate || 0 }}</span |
| | | >% |
| | | >{{ landInfo.rate || 0 }}</span>% |
| | | </p> |
| | | </div> |
| | | <div class="avue-statis"> |
| | |
| | | <div class="land-statis"> |
| | | <div class="land-title">地块总面积</div> |
| | | <div class="land-num"> |
| | | <span>{{ landInfo.zarea }}</span |
| | | > 亩 |
| | | <span>{{ landInfo.zarea }}</span> 亩 |
| | | </div> |
| | | </div> |
| | | <div class="land-statis"> |
| | | <div class="land-title">当前种养面积</div> |
| | | <div class="land-num"> |
| | | <span>{{ landInfo.sarea }}</span |
| | | > 亩 |
| | | <span>{{ landInfo.sarea }}</span> 亩 |
| | | </div> |
| | | </div> |
| | | <div class="land-statis"> |
| | | <div class="land-title">当前种养品种</div> |
| | | <div class="land-num"> |
| | | <span>{{ landInfo.num }}</span |
| | | > 种 |
| | | <span>{{ landInfo.num }}</span> 种 |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="title">当前种养品种</div> |
| | | <div class="content"> |
| | | <div class="farm" v-for="(item, index) in farmPlanList" :key="index"> |
| | | <div class="farm-img" @click="recoveryDetail(item)"><img :src="item.url" class="img" /></div> |
| | | <div class="farm-img" @click="recoveryDetail(item)"> |
| | | <img :src="item.url" class="img" /> |
| | | </div> |
| | | <div class="cai">{{ item.strainName }}</div> |
| | | <div class="area">种植面积:<span>{{ item.area }}</span>亩</div> |
| | | <div class="area"> |
| | | 种植面积: |
| | | <span>{{ item.area }}</span>亩 |
| | | </div> |
| | | <div class="btn"> |
| | | <el-button plain size="small" @click="recovery(item)" |
| | | ><span style="color: #5abf78">采收</span></el-button |
| | | > |
| | | <el-button plain size="small" @click="over(item.id)" |
| | | >结束</el-button |
| | | > |
| | | <el-button plain size="small" @click="recovery(item)"> |
| | | <span style="color: #5abf78">采收</span> |
| | | </el-button> |
| | | <el-button plain size="small" @click="over(item.id)">结束</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="text">添加种养品种</div> |
| | | </div> |
| | | <div |
| | | class="button" |
| | | style="background-color: #f37ba1" |
| | | @click="farming" |
| | | > |
| | | <div class="button" style="background-color: #f37ba1" @click="farming"> |
| | | <div class="btn-img"> |
| | | <img src="../../../public/img/wel/tuo.png" class="img" /> |
| | | </div> |
| | |
| | | <div class="left"> |
| | | <div class="farm-text">本年农事操作</div> |
| | | <div class="num"> |
| | | <span>{{ total }}</span |
| | | > 次 |
| | | <span>{{ total }}</span> 次 |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <el-link type="success" :underline="false" @click="farmPlantDetail" |
| | | >明细>></el-link |
| | | > |
| | | <el-link type="success" :underline="false" @click="farmPlantDetail">明细>></el-link> |
| | | </div> |
| | | </div> |
| | | <div class="farming-divider" v-if="isFarmingDetail"> |
| | | <el-divider></el-divider> |
| | | </div> |
| | | <div class="farming-details" :v-if="isFarmingDetail"> |
| | | <div class="detail" v-for="(item, index) in farmingList" :key="index" @click="farmPlantDetails(item)"> |
| | | <div |
| | | class="detail" |
| | | v-for="(item, index) in farmingList" |
| | | :key="index" |
| | | @click="farmPlantDetails(item)" |
| | | > |
| | | <div class="detail-title">{{ item.name }}</div> |
| | | <div class="detail-number"> |
| | | <span>{{ item.value }}</span |
| | | >次 |
| | | <span>{{ item.value }}</span>次 |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="repertory-centont"> |
| | | <div class="detail" v-for="(item, index) in stockList" :key="index" @click="stockDetails(item)"> |
| | | <div |
| | | class="detail" |
| | | v-for="(item, index) in stockList" |
| | | :key="index" |
| | | @click="stockDetails(item)" |
| | | > |
| | | <div class="detail-title">{{ item.name}}</div> |
| | | <div class="detail-number">剩余库存 <span>{{ item.val}}</span>公斤</div> |
| | | <div class="detail-number"> |
| | | 剩余库存 |
| | | <span>{{ item.val}}</span>公斤 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | import { getList, update } from "@/api/farmplant/farmplant"; |
| | | import { getFarmingCount, getFarmingStatis } from "@/api/farm/farmingrecord"; |
| | | import { selectCount } from "@/api/land/land"; |
| | | import { mapGetters } from "vuex" |
| | | import { getList, update } from "@/api/farmplant/farmplant" |
| | | import { getFarmingCount, getFarmingStatis } from "@/api/farm/farmingrecord" |
| | | import { selectCount } from "@/api/land/land" |
| | | import {StockCount} from "@/api/stock/stock" |
| | | import recovery from "./recovery.vue"; |
| | | import land from "./land.vue"; |
| | | import plant from "./plant.vue"; |
| | | import farming from "./farming.vue"; |
| | | import stock from "./stock.vue"; |
| | | import recovery from "./recovery.vue" |
| | | import land from "./land.vue" |
| | | import plant from "./plant.vue" |
| | | import farming from "./farming.vue" |
| | | import stock from "./stock.vue" |
| | | export default { |
| | | components: { |
| | | recovery, |
| | |
| | | span: 8, |
| | | data: [], |
| | | }, |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | }, |
| | | created() { |
| | | //地块使用率统计 |
| | | this.getCountStatis(); |
| | | this.getCountStatis() |
| | | //采收列表 |
| | | this.onLoad(); |
| | | this.onLoad() |
| | | //本年农事操作记录 |
| | | this.getFarmingCount(); |
| | | this.getFarmingCount() |
| | | //本年农事操作记录,分组 |
| | | this.getFarmingStatis(); |
| | | this.StockCount(); |
| | | this.getFarmingStatis() |
| | | this.StockCount() |
| | | }, |
| | | methods: { |
| | | //本年农事操作记录 |
| | | getFarmingCount() { |
| | | var that = this; |
| | | var that = this |
| | | getFarmingCount(this.userInfo.farmId).then((res) => { |
| | | that.total = res.data.data; |
| | | that.total = res.data.data |
| | | // that.total = 0; |
| | | if (that.total > 0) { |
| | | that.isFarmingDetail = true; |
| | | that.isFarmingDetail = true |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | //本年农事操作记录,分组统计 |
| | | getFarmingStatis() { |
| | | var that = this; |
| | | var that = this |
| | | getFarmingStatis(this.userInfo.farmId).then((res) => { |
| | | that.farmingList = res.data.data; |
| | | }); |
| | | that.farmingList = res.data.data |
| | | }) |
| | | }, |
| | | StockCount() { |
| | | var that = this; |
| | | var that = this |
| | | StockCount(this.userInfo.farmId).then((res) => { |
| | | that.stockList= res.data.data; |
| | | that.stockList = res.data.data |
| | | console.log(that.stockList) |
| | | }); |
| | | }) |
| | | }, |
| | | //地块使用率统计 |
| | | getCountStatis() { |
| | | var that = this; |
| | | var that = this |
| | | selectCount(this.userInfo.farmId).then((res) => { |
| | | var data = res.data.data; |
| | | that.landInfo = data; |
| | | }); |
| | | var data = res.data.data |
| | | that.landInfo = data |
| | | }) |
| | | }, |
| | | handleChange(val) { |
| | | window.console.log(val); |
| | | window.console.log(val) |
| | | }, |
| | | //获取种植中的种养品 |
| | | onLoad() { |
| | | var params = { |
| | | status: 1, |
| | | }; |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['farmId'] = this.userInfo.farmId; |
| | | } |
| | | params['tenantId'] = this.userInfo.tenant_id |
| | | params['farmId'] = this.userInfo.farmId |
| | | getList(1, 10, Object.assign(params)).then((res) => { |
| | | const data = res.data.data; |
| | | this.farmPlanList = data.records; |
| | | }); |
| | | const data = res.data.data |
| | | this.farmPlanList = data.records |
| | | }) |
| | | }, |
| | | //采收 |
| | | recovery(data) { |
| | | this.recoveryVisible = true; |
| | | this.recoveryVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.recovery.init(data); |
| | | }); |
| | | this.$refs.recovery.init(data) |
| | | }) |
| | | }, |
| | | //结束种植 |
| | | over(id) { |
| | | var that = this; |
| | | var that = this |
| | | this.$confirm("确定结束当前种植的农产品?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | const data = { |
| | | id: id, |
| | | status: 2, |
| | | }; |
| | | return update(data); |
| | | } |
| | | return update(data) |
| | | }) |
| | | .then(() => { |
| | | that.onLoad(); |
| | | that.onLoad() |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | //圈地 |
| | | land() { |
| | | this.landVisible = true; |
| | | this.landVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.land.init(); |
| | | }); |
| | | this.$refs.land.init() |
| | | }) |
| | | }, |
| | | //种植 |
| | | plant() { |
| | | this.plantVisible = true; |
| | | this.plantVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.plant.init(); |
| | | }); |
| | | this.$refs.plant.init() |
| | | }) |
| | | }, |
| | | //农事操作 |
| | | farming() { |
| | | this.farmingVisible = true; |
| | | this.farmingVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.farming.init(); |
| | | }); |
| | | this.$refs.farming.init() |
| | | }) |
| | | }, |
| | | //农资入库 |
| | | stock() { |
| | | this.stockVisible = true; |
| | | this.stockVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.stock.init(); |
| | | }); |
| | | this.$refs.stock.init() |
| | | }) |
| | | }, |
| | | //本年农事操作明细 |
| | | farmPlantDetail() { |
| | | const data = { |
| | | activeName: "tab2", |
| | | }; |
| | | } |
| | | this.$router.push({ |
| | | path: `/farmDetail`, |
| | | query: data, |
| | | }); |
| | | }) |
| | | }, |
| | | stockDetail() { |
| | | this.$router.push({ |
| | | path: `/stockmanage`, |
| | | }); |
| | | }) |
| | | }, |
| | | //本年农事操作明细--有参 |
| | | farmPlantDetails(item) { |
| | | console.log(item,11111); |
| | | console.log(item, 11111) |
| | | const data = { |
| | | type:item.value, |
| | | activeName: "tab2", |
| | | }; |
| | | } |
| | | this.$router.push({ |
| | | path: `/farmDetail`, |
| | | query: data, |
| | | }); |
| | | }) |
| | | }, |
| | | //农资库存点击事件 |
| | | stockDetails(item) { |
| | | var type; |
| | | var type |
| | | if (item.name=="化肥"){ |
| | | type=0 |
| | | } |
| | |
| | | } |
| | | const data = { |
| | | type:type, |
| | | }; |
| | | } |
| | | this.$router.push({ |
| | | path: `/stockmanage`, |
| | | query: data, |
| | | }); |
| | | }) |
| | | }, |
| | | //采收记录 |
| | | recoveryDetail() { |
| | | const data = { |
| | | activeName: "tab1", |
| | | }; |
| | | } |
| | | this.$router.push({ |
| | | path: `/farmDetail`, |
| | | query: data, |
| | | }); |
| | | }) |
| | | }, |
| | | }, |
| | | }; |