From 1d18ff904468e4a864312bdcf6d7c6a7c0477721 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期五, 25 四月 2025 14:57:36 +0800
Subject: [PATCH] 项目提交

---
 pages/device/device.vue |  111 +++++++++++++++++++++++--------------------------------
 1 files changed, 46 insertions(+), 65 deletions(-)

diff --git a/pages/device/device.vue b/pages/device/device.vue
index e76021f..55df6ab 100644
--- a/pages/device/device.vue
+++ b/pages/device/device.vue
@@ -1,13 +1,12 @@
 <template>
 	<view class="container">
-		<cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask">
-			<block slot="backText">杩斿洖</block>
+		<cu-custom :bgColor="NavBarColor">
 			<block slot="content">璁惧</block>
 		</cu-custom>
 		<view class="container">
 
-			<uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="blur" @focus="focus"
-				@input="input" @cancel="cancel" @clear="clear">
+			<uni-search-bar @confirm="search" :focus="true" v-model="searchValue"  placeholder="璇烽�氳繃鍚嶇О妫�绱�"
+				 @input="input" @cancel="cancel()"  cancelButton="always">
 			</uni-search-bar>
 			<mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="top" @down="downCallback" @up="upCallback">
 				<!-- 鍒楄〃淇℃伅寮�濮� -->
@@ -33,31 +32,6 @@
 								{{item.assetStatus_dictText}}
 							</view>
 						</view>
-						<!-- <view class="flex">
-							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">淇濆吇鐘舵��::</view>
-							<view class="flex-sub bg-white padding-xs margin-xs   text-orange   radius text-right">
-								{{item.maintenanceStatus_dictText}}
-							</view>
-						</view>
-
-						<view class="flex">
-							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">浣跨敤杞﹂棿:</view>
-							<view class="flex-sub bg-white padding-xs margin-xs     radius text-right">
-								{{item.orgId_dictText}}
-							</view>
-						</view>
-						<view class="flex">
-							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">璁惧绠$悊鍛�:</view>
-							<view class="flex-sub bg-white padding-xs margin-xs     radius text-right">
-								{{item.equipmentManager_dictText}}
-							</view>
-						</view>
-						<view class="flex">
-							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">璁惧鍒嗙被:</view>
-							<view class="flex-sub bg-white padding-xs margin-xs  text-bold    radius text-right">
-								{{item.equipmentCategory_dictText}}
-							</view>
-						</view> -->
 					</uni-card>
 				</view>
 
@@ -72,6 +46,7 @@
 		mixins: [MescrollMixin], // 浣跨敤mixin
 		data() {
 			return {
+
 				scrollLeft: 0,
 				searchValue: '',
 				formData: {
@@ -106,7 +81,8 @@
 				announcement1: [],
 				msg1Count: 0,
 				msg2Count: 0,
-				msg1Title: ""
+				msg1Title: "",
+				name: ''
 			}
 		},
 		computed: {
@@ -134,15 +110,20 @@
 		},
 		created() {},
 		methods: {
+
+			cancel() {
+
+				this.mescroll.resetUpScroll()
+			},
 			search(res) {
-				console.log(res)
-				this.getSera(res)
+				this.name = res
+				this.getSera()
 			},
 			/**
 			 * @param {Object} item
 			 * 璇︽儏椤甸潰
 			 */
-			
+
 			onClickProductionTask(item) {
 				uni.navigateTo({
 					url: '/pages/device/deviceDeils/deviceDeils?item=' + encodeURIComponent(JSON.stringify(item))
@@ -187,40 +168,40 @@
 			/* 妫�绱� */
 			getSera(res) {
 				this.msgList = [];
-				if (keyword == 0) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: 1,
-							pageSize: 999,
-							order: "desc",
-							column: "createTime",
-							equipmentCode: res
-						}
-					}).then(res => {
-						//鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��;
 
-						this.announcement1 = res.data.result.records
-						this.mescroll.endSuccess(this.announcement1.length);
-						console.log("url", res)
-						//璁剧疆鍒楄〃鏁版嵁
-						if (res.data.success) {
-							console.log("res", res.data)
-							this.msg1Count = res.data.result.total
-							this.msg1Title = "閫氱煡(" + res.data.result.total + ")";
-							for (let annItem of this.announcement1) {
-								this.msgList.push(annItem)
-							}
-						}
-						if (page.num == 1) {
-							this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
-							this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
-						}
+				this.$http.get(this.url.stallList, {
+					params: {
+						pageNo: 1,
+						pageSize: 999,
+						order: "desc",
+						column: "createTime",
+						equipmentCode: this.name.value
+					}
+				}).then(res => {
+					//鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��;
 
-					}).catch(() => {
-						//鑱旂綉澶辫触, 缁撴潫鍔犺浇
-						this.mescroll.endErr();
-					})
-				}
+					this.announcement1 = res.data.result.records
+					this.mescroll.endSuccess(this.announcement1.length);
+					console.log("url", res)
+					//璁剧疆鍒楄〃鏁版嵁
+					if (res.data.success) {
+						console.log("res", res.data)
+						this.msg1Count = res.data.result.total
+						this.msg1Title = "閫氱煡(" + res.data.result.total + ")";
+						for (let annItem of this.announcement1) {
+							this.msgList.push(annItem)
+						}
+					}
+					if (page.num == 1) {
+						this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
+						this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
+					}
+
+				}).catch(() => {
+					//鑱旂綉澶辫触, 缁撴潫鍔犺浇
+					this.mescroll.endErr();
+				})
+
 			},
 
 			mescrollInit(mescroll) {

--
Gitblit v1.9.3