From e174511f84d0ade1b9e67bc9a112b4cf619b559f Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Wed, 17 Aug 2022 17:27:22 +0800
Subject: [PATCH] 地图模式显示正在种养品种、销售后地区选择数据残留清空
---
src/views/farmplant/farmproductstock.vue | 8 +++++++-
src/views/mapPattern/index.vue | 13 +++++++------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/views/farmplant/farmproductstock.vue b/src/views/farmplant/farmproductstock.vue
index b7f1fad..75d40f4 100644
--- a/src/views/farmplant/farmproductstock.vue
+++ b/src/views/farmplant/farmproductstock.vue
@@ -150,6 +150,7 @@
<template slot-scope="{disabled,size}" slot="saleDestination">
<div>
<el-cascader
+ ref="cascader"
style="width: 100%;"
placeholder="请选择销售去向"
size="large"
@@ -277,6 +278,7 @@
<template slot-scope="{disabled,size}" slot="saleDestination">
<div>
<el-cascader
+ ref="cascader"
style="width: 100%;"
placeholder="请选择出库去向"
size="large"
@@ -1110,12 +1112,16 @@
cleanData () {
var that = this
that.form.saleDestination = ""
+ that.$refs.cascader.$refs.panel.clearCheckedNodes()
+ that.$refs.cascader.$refs.panel.activePath=[]
that.$refs.form.resetFields()
that.visible = false
},
cleanCKData () {
var that = this
that.formCK.saleDestination = ""
+ that.$refs.cascader.$refs.panel.clearCheckedNodes()
+ that.$refs.cascader.$refs.panel.activePath=[]
that.$refs.form.resetFields()
that.visibleCK = false
},
@@ -1172,7 +1178,7 @@
this.page.total = data.total
this.data = data.records
this.loading = false
- this.selectionClear()
+ // this.selectionClear()
})
},
getFarmListDic(){
diff --git a/src/views/mapPattern/index.vue b/src/views/mapPattern/index.vue
index 485ce09..0fb8430 100644
--- a/src/views/mapPattern/index.vue
+++ b/src/views/mapPattern/index.vue
@@ -199,7 +199,7 @@
},
computed: {
- ...mapGetters(["userInfo"]),
+ ...mapGetters(["userInfo","$farmId"]),
},
created () {
//获取种样品列表
@@ -216,7 +216,8 @@
methods: {
//获取种养品列表
getFarmPlantList (page, params = {}) {
- params['farmId'] = this.userInfo.farmId
+ params['farmId'] = this.$farmId
+ params['status'] = 1
this.loading = true
getList(
page.currentPage,
@@ -266,7 +267,7 @@
},
//获取地块列表
getLandList (page, params = {}) {
- params['farmId'] = this.userInfo.farmId
+ params['farmId'] = this.$farmId
params['tenantId'] = this.userInfo.tenant_id
this.loading = true
getLandList(
@@ -304,19 +305,19 @@
//获取农场信息
getFarmInfo () {
var that = this
- getDetails(this.userInfo.farmId).then(res => {
+ getDetails(this.$farmId).then(res => {
that.farmInfo = res.data.data
})
},
//获取统计面积信息
getLandCount () {
- selectCount(this.userInfo.farmId).then(res => {
+ selectCount(this.$farmId).then(res => {
this.landAreaInfo = res.data.data
})
},
//获取地块轮廓统计信息
getLandIsAreaStatistic () {
- getLandIsAreaStatistic(this.userInfo.farmId).then(res => {
+ getLandIsAreaStatistic(this.$farmId).then(res => {
console.log(res)
this.landIsAreaStatistic = res.data.data
})
--
Gitblit v1.9.3