From b850badcf800eff5819e0789d1b81e5e27fcd037 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 29 十一月 2024 17:21:34 +0800
Subject: [PATCH] ll

---
 h5/pages/operation/record.vue |  154 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 105 insertions(+), 49 deletions(-)

diff --git a/h5/pages/operation/record.vue b/h5/pages/operation/record.vue
index 818efb9..aaa32ae 100644
--- a/h5/pages/operation/record.vue
+++ b/h5/pages/operation/record.vue
@@ -3,64 +3,113 @@
 		<view class="head_wrap">
 			<view class="search_wrap">
 				<image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
-				<input v-model="param.keyword" @confirm="getList()" type="text" placeholder="鎼滅储璁惧鍚嶇О/缂栧彿" placeholder-class="placeholder9" />
+				<input v-model="param.keyword" @confirm="getList()" type="text" placeholder="鎼滅储璁惧鍚嶇О/缂栧彿"
+					placeholder-class="placeholder9" />
 			</view>
-			<view class="name_wrap" @click="showModal = true">
-				<view class="name">杩愮淮浜�</view>
+			<view class="name_wrap" @click="handleMem">
+				<view class="name">{{ param.realname ? param.realname : '杩愮淮浜�' }}</view>
 				<u-icon :name="showModal  ? 'arrow-right' : 'arrow-down'" color="#999999" size="12"></u-icon>
 			</view>
 		</view>
 		<!--  -->
 		<view class="list">
-			<view class="item" v-for="item in 10" @click="itemClick(item)">
+			<view class="item" v-for="item in list" @click="itemClick(item)">
 				<image src="@/static/side/ic_shuiyu@2x.png" class="icon"></image>
 				<view class="content">
 					<view class="name_wrap">
 						<view class="name">
-							<text class="device">xx璁惧</text>
-							<text>D20231</text>
+							<text class="device">{{item.deviceName}}</text>
+							<text>{{item.deviceCode}}</text>
 						</view>
-						<view class="status red">姝e父</view>
+						<view class="status" v-if="item.status == 0">姝e父</view>
+						<view class="status red" v-if="item.status == 1">鎹熷潖</view>
+						<view class="status red" v-if="item.status == 2">鎶ュ簾</view>
 					</view>
-					<view class="line">杩愮淮浜猴細xxx</view>
-					<view class="line">杩愮淮鏃堕棿锛�121212</view>
+					<view class="line">杩愮淮浜猴細{{item.realName}}</view>
+					<view class="line">杩愮淮鏃堕棿锛歿{item.dealDate}}</view>
 				</view>
 
 			</view>
 		</view>
 		<!--  -->
-		<u-picker :show="showModal" keyName="name" @cancel="showModal = false" @confirm='confirm'
+		<u-picker :show="showModal" keyName="realname" @cancel="showModal = false" @confirm='confirm'
 			:columns="columns"></u-picker>
 	</view>
 </template>
 
 <script>
+	import {
+		ywDeviceRecord,
+		findInternalList
+	} from '@/api'
 	export default {
 		data() {
 			return {
 				param: {},
 				columns: [],
-				showModal: false
+				showModal: false,
+				list: [],
+				total: 0,
+				page: 1,
 			};
 		},
-		methods: {
-			getList() {},
+		onLoad() {
+			this.getpeo()
+			this.getList()
+
+		},
+		mounted() {
+			this.$eventBus.$on('memberSel', (option) => {
+				this.$set(this.param, 'realname', option.realname)
+				this.$set(this.param, 'memberId', option.id)
+				this.getList()
+			})
+			
+		},
+		methods: {
+			getList() {
+				const {
+					page,
+					total,
+					list,
+					param
+				} = this
+				ywDeviceRecord({
+					page,
+					capacity: 10,
+					model: param
+				}).then(res => {
+					this.list = res.data.records || []
+					this.total = res.data.total
+				})
+			},
+			handleMem() {
+				uni.navigateTo({
+					url: '/pages/common/memberSel'
+				})
+			},
+			getpeo() {
+				findInternalList().then(res => {
+					this.columns = [res.data]
+				})
+			},
 			confirm() {
 				this.showModal = false
-			},
-			itemClick() {
-				uni.navigateTo({
-					url: '/pages/operation/detail'
-				})
+			},
+			itemClick(item) {
+				uni.navigateTo({
+					url: '/pages/operation/detail?id='+ item.id
+				})
 			}
 		}
 	}
 </script>
 
-<style lang="scss" scoped>
-	.main_app{
-		padding: 0 30rpx;
+<style lang="scss" scoped>
+	.main_app {
+		padding: 0 30rpx;
 	}
+
 	.head_wrap {
 		display: flex;
 		align-items: center;
@@ -73,9 +122,11 @@
 			background: #F7F7F7;
 			border-radius: 38rpx;
 			padding-left: 30rpx;
-			input{
-				flex: 1;
+
+			input {
+				flex: 1;
 			}
+
 			.search {
 				width: 28rpx;
 				height: 28rpx;
@@ -94,39 +145,44 @@
 	.list {
 		.item {
 			display: flex;
-			height: 228rpx;
-			padding: 30rpx 0;
+			height: 228rpx;
+			padding: 30rpx 0;
 			border-bottom: 2rpx solid #E5E5E5;
+
 			.icon {
 				width: 80rpx;
-				height: 80rpx;
+				height: 80rpx;
 				margin-right: 24rpx;
 			}
 
 			.content {
-				flex: 1;
-				color: #666666;
-				display: flex;
-				flex-direction: column;
-				justify-content: space-between;
-				.name_wrap{
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					.name{
-						display: flex;
-						align-items: flex-end;
-						font-size: 26rpx;
-						.device{
-							font-weight: 600;
-							font-size: 34rpx;
-							color: #222222;
-							margin-right: 6rpx;
-						}
-					}
-					.status{
-						color: $primaryColor;
-					}
+				flex: 1;
+				color: #666666;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.name_wrap {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.name {
+						display: flex;
+						align-items: flex-end;
+						font-size: 26rpx;
+
+						.device {
+							font-weight: 600;
+							font-size: 34rpx;
+							color: #222222;
+							margin-right: 6rpx;
+						}
+					}
+
+					.status {
+						color: $primaryColor;
+					}
 				}
 			}
 		}

--
Gitblit v1.9.3