Explorar o código

查询核查图斑列表

maxiaoxiao hai 2 meses
pai
achega
76cc06da6f
Modificáronse 1 ficheiros con 18 adicións e 16 borrados
  1. 18 16
      pages/index/common/hcList.vue

+ 18 - 16
pages/index/common/hcList.vue

@@ -7,7 +7,7 @@
 		</view>
 		</view>
 		<view>
 		<view>
 			<van-sticky :offset-top="-10">
 			<van-sticky :offset-top="-10">
-				<van-tabs sticky v-model="queryParams.activeName" @click="tabclick" class="tabs">
+				<van-tabs sticky v-model="queryParams.stepState" @click="tabclick" class="tabs">
 					<van-tab v-for="(item, key) in tabOptions" :key="key" :name="item.stepState"
 					<van-tab v-for="(item, key) in tabOptions" :key="key" :name="item.stepState"
 						:title="`${item.name}(${hccount[item.prop]})`"></van-tab>
 						:title="`${item.name}(${hccount[item.prop]})`"></van-tab>
 				</van-tabs>
 				</van-tabs>
@@ -16,7 +16,7 @@
 				error-text="请求失败,点击重新加载" finished-text="没有更多了~" @load="loadList" @refresh="onRefresh">
 				error-text="请求失败,点击重新加载" finished-text="没有更多了~" @load="loadList" @refresh="onRefresh">
 				<view class="list-item" v-for="(item, key) in pcsjList" :key="key" @click="goDetail(item)">
 				<view class="list-item" v-for="(item, key) in pcsjList" :key="key" @click="goDetail(item)">
 					<div class="nameTitle">{{ item.name }}</div>
 					<div class="nameTitle">{{ item.name }}</div>
-					<div>{{ item.dkjdxxId }}</div>
+					<div>{{ item.dkbh }}</div>
 					<div>监测面积:{{ item.dkmj }}</div>
 					<div>监测面积:{{ item.dkmj }}</div>
 					<div>核查截止日期:{{ item.endTime }}</div>
 					<div>核查截止日期:{{ item.endTime }}</div>
 				</view>
 				</view>
@@ -44,7 +44,7 @@
 				queryParams: {
 				queryParams: {
 					pageNum: 1,
 					pageNum: 1,
 					pageSize: 10,
 					pageSize: 10,
-					activeName: 0,
+					stepState: 0,
 				},
 				},
 				loading: false,
 				loading: false,
 				finished: false,
 				finished: false,
@@ -60,7 +60,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			golist(a, hccount) {
 			golist(a, hccount) {
-				this.hccount = hccount;
+				if (hccount) this.hccount = hccount;
 				this.reset(a.stepState)
 				this.reset(a.stepState)
 				this.tabclick();
 				this.tabclick();
 			},
 			},
@@ -75,31 +75,33 @@
 			getList() {
 			getList() {
 				this.loading = true;
 				this.loading = true;
 				listDkjbxx(this.queryParams).then((res) => {
 				listDkjbxx(this.queryParams).then((res) => {
-					this.pcsjList = [this.pcsjList, ...res.rows];
+					this.pcsjList = [...this.pcsjList, ...res.rows];
 					this.total = res.total;
 					this.total = res.total;
 					this.loading = false;
 					this.loading = false;
 					this.finished = res.rows.length < 10;
 					this.finished = res.rows.length < 10;
+					this.$emit('addmap', this.pcsjList);
 				});
 				});
 			},
 			},
-			reset(activeName) {
+			reset(stepState) {
 				this.queryParams = {
 				this.queryParams = {
 					pageNum: 1,
 					pageNum: 1,
 					pageSize: 10,
 					pageSize: 10,
-					activeName: activeName || 0,
+					stepState: stepState || 0,
 					dkbh: ''
 					dkbh: ''
 				}
 				}
 			},
 			},
 			//跳转到详情页
 			//跳转到详情页
 			goDetail(value) {
 			goDetail(value) {
-				uni.setStorage({
-					key: "my_param",
-					data: value,
-					success: () => {
-						uni.switchTab({
-							url: "/pages/check/index",
-						});
-					},
-				});
+				this.$emit('goDetail', value)
+				// uni.setStorage({
+				// 	key: "my_param",
+				// 	data: value,
+				// 	success: () => {
+				// 		uni.switchTab({
+				// 			url: "/pages/check/index",
+				// 		});
+				// 	},
+				// });
 				//   uni.navigateTo({
 				//   uni.navigateTo({
 				//     url: "/pages/check/index?item=" + value,
 				//     url: "/pages/check/index?item=" + value,
 				//   });
 				//   });