From 174350e855349919ee287a52d3198c7c7558b858 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 02 四月 2024 14:21:22 +0800
Subject: [PATCH] mrshi

---
 wx/pages/dispatch_unit_records/dispatch_unit_records.vue |   95 ++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 73 insertions(+), 22 deletions(-)

diff --git a/wx/pages/dispatch_unit_records/dispatch_unit_records.vue b/wx/pages/dispatch_unit_records/dispatch_unit_records.vue
index 3862c3f..d8e31d3 100644
--- a/wx/pages/dispatch_unit_records/dispatch_unit_records.vue
+++ b/wx/pages/dispatch_unit_records/dispatch_unit_records.vue
@@ -1,20 +1,20 @@
 <template>
 	<view class="policy">
-		<Search :list="cate" label="鎵瑰崟鐢熸晥鏈�" />
+		<Search :list="cate" @search="getValue" label="鎵瑰崟鐢熸晥鏈�" />
 		<view class="policy_list">
-			<view class="policy_list_item" v-for="(item, index) in 6" :key="index">
-				<view class="item_top" :style="{ background: returnStyle(index) }">
+			<view class="policy_list_item" v-for="(item, index) in list" :key="index" @click="jump(item.id)">
+				<view class="item_top" :style="{ background: returnStyle(item.status) }">
 					<view class="item_top_info">
-						<text>澶у湴鎰忓淇濋櫓</text>
-						<text>鍏宠仈淇濆崟鍙凤細291029389889212938</text>
+						<text>{{item.solutionsName}}</text>
+						<text>鍏宠仈淇濆崟鍙凤細{{item.applyCode}}</text>
 					</view>
 					<view class="item_top_img">
-						<image v-if="index === 0" src="@/static/icon/progress_yishengxiao@2x.png" mode="widthFix"></image>
-						<image v-if="index === 1" src="@/static/icon/progress_daishenhe@2x.png" mode="widthFix"></image>
-						<image v-if="index === 2" src="@/static/icon/progress_daiqianshu@2x.png" mode="widthFix"></image>
-						<image v-if="index === 3" src="@/static/icon/progress_shenqingtuihui@2x.png" mode="widthFix"></image>
-						<image v-if="index === 4" src="@/static/icon/progress_yituihui@2x.png" mode="widthFix"></image>
-						<image v-if="index === 5" src="@/static/icon/progress_yiguanbi@2x.png" mode="widthFix"></image>
+						<image v-if="item.status === 2" src="@/static/icon/progress_yishengxiao@2x.png" mode="widthFix"></image>
+						<image v-if="item.status === 1" src="@/static/icon/progress_daishenhe@2x.png" mode="widthFix"></image>
+						<image v-if="item.status === 0" src="@/static/icon/progress_daiqianshu@2x.png" mode="widthFix"></image>
+						<image v-if="item.status === 3 || item.status === 4" src="@/static/icon/progress_shenqingtuihui@2x.png" mode="widthFix"></image>
+						<image v-if="item.status === 5 || item.status === 8" src="@/static/icon/progress_yituihui@2x.png" mode="widthFix"></image>
+						<image v-if="item.status === 6" src="@/static/icon/progress_yiguanbi@2x.png" mode="widthFix"></image>
 					</view>
 				</view>
 				<view class="item_center">
@@ -23,11 +23,11 @@
 				<view class="item_list">
 					<view class="item_list_item" style="width: 100%;">
 						<view class="item_list_item_label">鏇存崲娲鹃仯鍗曚綅浜烘暟锛�</view>
-						<view class="item_list_item_val">2浜�</view>
+						<view class="item_list_item_val">{{item.changeNum}}浜�</view>
 					</view>
 					<view class="item_list_item" style="width: 100%;">
 						<view class="item_list_item_label">鎵瑰崟鐢熸晥鏈燂細</view>
-						<view class="item_list_item_val">2024.01.01 00:00:00</view>
+						<view class="item_list_item_val">{{item.applyStartTime}}</view>
 					</view>
 				</view>
 			</view>
@@ -41,24 +41,75 @@
 		components: { Search },
 		data() {
 			return {
+				list: [],
+				page: 1,
+				next: false,
+				status: '',
+				solutionsName: '',
+				applyStartS: '',
+				applyStartE: '',
 				cate: [
 					{ name: '鍏ㄩ儴', id: '' },
-					{ name: '寰呯缃�', id: '3' },
-					{ name: '鐢宠閫�鍥�', id: '6' },
-					{ name: '宸查��鍥�', id: '7' },
-					{ name: '寰呭鏍�', id: '9' },
-					{ name: '宸茬敓鏁�', id: '8' },
-					{ name: '宸插叧闂�', id: '2' }
+					{ name: '寰呯缃�', id: '0' },
+					{ name: '鐢宠閫�鍥�', id: '3' },
+					{ name: '宸查��鍥�', id: '5' },
+					{ name: '寰呭鏍�', id: '1' },
+					{ name: '宸茬敓鏁�', id: '2' },
+					{ name: '宸插叧闂�', id: '6' }
 				]
 			};
 		},
+		onLoad() {
+			this.getList()
+		},
+		onReachBottom() {
+			this.getList()
+		},
 		methods: {
+			jump(id) {
+				uni.navigateTo({
+					url: `/pages/details_dispatch_unit/details_dispatch_unit?id=${id}`
+				})
+			},
+			getValue(e) {
+				this.solutionsName = e.name
+				this.applyStartS = e.startTime
+				this.applyStartE = e.endTime
+				this.status = e.status
+				this.list = []
+				this.page = 1
+				this.next = false
+				this.getList()
+			},
+			getList() {
+				if (this.next) return
+				this.$u.api.applyChangePage({
+					capacity: 10,
+					page: this.page,
+					model: {
+						type: 1,
+						solutionsName: this.solutionsName,
+						status: this.status,
+						applyStartS: this.applyStartS,
+						applyStartE: this.applyStartE
+					}
+				}).then(res => {
+					if (res.code === 200) {
+						if (res.data.records.length > 0) {
+							this.page++
+							this.list.push(...res.data.records)
+						} else {
+							this.next = true
+						}
+					}
+				})
+			},
 			returnStyle(type) {
-				if ([0].includes(type)) {
+				if ([2].includes(type)) {
 					return 'linear-gradient( 180deg, #E5F7F1 0%, rgba(255,255,255,0) 100%);'
-				} else if ([1,2].includes(type)) {
+				} else if ([1,0].includes(type)) {
 					return 'linear-gradient( 180deg, #FFF2E3 0%, rgba(255,255,255,0) 100%);'
-				} else if ([3,4,5].includes(type)) {
+				} else if ([3,4,5,8,6].includes(type)) {
 					return '#ffffff'
 				}
 			}

--
Gitblit v1.9.3