From 964faa1077a89713910063c39ebe08fac4e4c56e Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期四, 24 七月 2025 17:44:18 +0800
Subject: [PATCH] 企业维修适配修改

---
 pages/ToDoList/ToDoList.vue |  392 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 197 insertions(+), 195 deletions(-)

diff --git a/pages/ToDoList/ToDoList.vue b/pages/ToDoList/ToDoList.vue
index 1989d82..c3452a3 100644
--- a/pages/ToDoList/ToDoList.vue
+++ b/pages/ToDoList/ToDoList.vue
@@ -3,6 +3,11 @@
 		<cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask">
 			<block slot="backText">杩斿洖</block>
 			<block slot="content">寰呭姙</block>
+			<block slot="right">
+				<view @click="search">
+					<image class="search" src="/static/icon/sear.png" style="width: 25px; height: 25px;" alt="" />
+				</view>
+			</block>
 		</cu-custom>
 
 		<view style="width: 100%;">
@@ -11,40 +16,71 @@
 					<!-- 鍩虹琛ㄥ崟鏍¢獙 -->
 					<uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext">
 						<uni-group title="" top="0">
-							<uni-forms-item name="numbers" label="棰嗘枡鐢宠鍗曞彿:">
-								<uni-easyinput type="text" v-model="formData.num" placeholder="璇疯緭鍏ラ鏂欑敵璇峰崟鍙锋绱�" />
+							<uni-forms-item name="num" :labelWidth="80" label="娴佺▼鍒嗙被:">
+
+
+								<uni-data-select v-model="formData.type" :localdata="typeList" @change="changetypeList"
+									placeholder="璇烽�夋嫨娴佺▼" />
 							</uni-forms-item>
-							<uni-forms-item name="name" label="棰嗘枡浜у搧:">
-								<uni-easyinput v-model="formData.partNumNameModel" placeholder="璇疯緭鍏ラ鏂欎骇鍝�" />
+							<uni-forms-item name="name" :labelWidth="80" label="璁惧缂栧彿:">
+								<uni-easyinput v-model="formData.num" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" />
 							</uni-forms-item>
 						</uni-group>
+						<uni-forms-item>
+							<view class="flex">
+								<view
+									class="cuIcon-search flex-sub bg-blue radius padding-sm margin-xs margin-left-lg margin-right-lg text-sm text-center"
+									@click="getSera">鏌ヨ
+								</view>
+								<view
+									class="cuIcon-refresh flex-sub bg-white solids padding-sm margin-xs radius text-sm text-center margin-left-lg margin-right-lg"
+									@click="resetTask">閲嶇疆</view>
+							</view>
+						</uni-forms-item>
 					</uni-forms>
-					<view class="flex">
-
-						<view
-							class="cuIcon-search flex-sub bg-blue padding-sm margin-xs margin-left-lg margin-right-lg text-sm text-center"
-							@click="getSera">鏌ヨ
-						</view>
-						<view
-							class="cuIcon-refresh flex-sub bg-white solids padding-sm margin-xs radius text-sm text-center margin-left-lg margin-right-lg"
-							@click="resetTask">閲嶇疆</view>
-					</view>
+					
 
 				</view>
 			</uni-popup>
 		</view>
 
 		<view class="container">
-		
+
 			<mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="top" @down="downCallback" @up="upCallback">
 				<!-- 鍒楄〃淇℃伅寮�濮� -->
 				<view class="content">
 					<uni-card margin="10px" spacing="1px" v-for="(item,index) in msgList" :key="index"
 						@click="onClickProductionTask(item)">
 						<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 text-blue  radius text-right">
+								{{item.category_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.flowName}}
+							</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.preNodeAssignee_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-yellow   radius text-right">
+								{{item.preNode}}
+							</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-olive  radius text-right">
+								{{item.name}}
 							</view>
 						</view>
 						<view class="flex">
@@ -53,25 +89,6 @@
 								{{item.title}}
 							</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-blue   radius text-right">
-								{{item.preNodeAssignee_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-blue   radius text-right">
-								{{item.preNode}}
-							</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.name}}
-							</view>
-						</view>	
 					</uni-card>
 				</view>
 
@@ -81,21 +98,23 @@
 </template>
 
 <script>
+	
+	
 	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin], // 浣跨敤mixin
 		data() {
 			return {
 				type: 'top',
-				scrollLeft:0,
+				scrollLeft: 0,
 				formData: {
 					num: '',
-					partNumNameModel: ''
+					type: ''
 				},
 				NavBarColor: this.NavBarColor,
 				activeColor: '#5277A6',
 				url: {
-	
+					flowType: "/sys/dict/getDictItems/flow_type",
 					stallList: "/assign/flow/toTaskBySelf"
 				},
 
@@ -117,6 +136,7 @@
 					color: '#2979FF',
 					borderColor: '#2979FF'
 				},
+				typeList: [],
 				msgList: [], //鍒楄〃鏁版嵁
 				announcement1: [],
 				msg1Count: 0,
@@ -126,7 +146,7 @@
 		},
 		computed: {
 			top() {
-				return this.CustomBar * 2 + 130
+				return this.CustomBar * 2 + 50
 			},
 			style() {
 				var StatusBar = this.StatusBar;
@@ -143,66 +163,133 @@
 			}
 		},
 
-		created() {},
+		created() {
+			this.getTypeList()
+		},
 		methods: {
-			
+			/**
+			 * 娴佺▼鍒嗙被鍒楄〃浜嬩欢
+			 */
+			getTypeList() {
+				this.$http.get(this.url.flowType).then(res => {
+					//璁剧疆鍒楄〃鏁版嵁
+					if (res.data.success) {
+						console.log(res)
+						this.typeList = res.data.result
+					}
+				}).catch(() => {
+					//鑱旂綉澶辫触, 缁撴潫鍔犺浇
+				})
+
+			},
+			changetypeList(e) {
+				this.formData.type = e;
+			},
 			/**
 			 * @param {Object} item
 			 * 璇︽儏椤甸潰
 			 */
 			onClickProductionTask(item) {
-				
-			uni.navigateTo({
-				url: '/pages/ToDoList/ToDoListDeils/ToDoListDeils?item=' +
-					encodeURIComponent(JSON.stringify(item))
-			
-			})
+				const name = item.name;
+				const type = item.category_dictText;
+				let url = '';
 
+				switch (true) {
+					case (name === '鏄惁闇�瑕侀鐢ㄥ浠�' && type === '璁惧缁翠慨'):
+						url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts';
+						break;
+					case (name === '鐐规鎵ц' && type === '璁惧鐐规'):
+						url = '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils';
+						break;
+					case (name === '鍛ㄤ繚鎵ц' && type === '璁惧鍛ㄤ繚'):
+						url = '/pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou';
+						break;
+					case (name === '鐝粍闀跨‘璁�' && type === '璁惧鐐规'):
+						url = '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure';
+						break;
+					case (name === '鐝粍闀跨‘璁�' && type === '璁惧鍛ㄤ繚'):
+						url = '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure';
+						break;
+					case (name === '璁剧鍛樺垵楠�' && type === '璁惧鍛ㄤ繚'):
+						url = '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure';
+						break;
+					case (name === '璁捐兘閮ㄧ粓楠�' && type === '璁惧鍛ㄤ繚'):
+						url = '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure';
+						break;
+					case (name === '绛夊緟澶囦欢涓�' && type === '璁惧缁翠慨'):
+						url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts';
+						break;
+					case (name === '鎿嶄綔宸ョ‘璁�' && type === '璁惧缁翠慨'):
+						url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts';
+						break;
+					case (name === '缁翠慨鎵ц' && type === '璁惧缁翠慨'):
+						url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts';
+						break;
+					case (name === '鐐规宸ュ崟' && type === '璁惧鐐规'):
+						url = '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils';
+						case (name === '鐐规宸ュ崟' && type === '璁惧鐐规'):
+							url = '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils';
+						
+						break;
+					default:ToDoCheckDetils
+						console.warn(`No URL found for name: ${name} and type: ${type}`);
+						return;
+				}
+
+				if (url) {
+	
+					uni.navigateTo({
+						url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}`
+					});
+					// uni.redirectTo({
+					// 	url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}`
+					// });
+				}
 			},
-			
+
+
 			search() {
 				this.$refs.popup.open();
 			},
 
-		
 			upCallback(page) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: page.num,
-							pageSize: page.size,
-							order: 'asc',
-							column: 'createTime'
-						},
+				this.$http.get(this.url.stallList, {
+					params: {
+						pageNo: page.num,
+						pageSize: page.size,
+						order: 'desc',
+						column: 'createTime'
+					},
 
-					}).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)
-							}
+				}).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); //杩藉姞鏂版暟鎹�
-						}
+					}
+					if (page.num == 1) {
+						this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
+						this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
+					}
 
-					}).catch(() => {
-						//鑱旂綉澶辫触, 缁撴潫鍔犺浇
-						this.mescroll.endErr();
-					})
-				
+				}).catch(() => {
+					//鑱旂綉澶辫触, 缁撴潫鍔犺浇
+					this.mescroll.endErr();
+				})
+
 			},
 
 
 			resetTask() {
 				this.formData.num = ''
-				this.formData.partNumNameModel = ''
+				this.formData.type = ''
 				this.$refs.popup.close();
 				this.mescroll.resetUpScroll()
 
@@ -210,125 +297,41 @@
 			/* 妫�绱� */
 			getSera() {
 				this.$refs.popup.close();
-				let keyword = this.TabCur
 				this.msgList = [];
+				this.$http.get(this.url.stallList, {
+					params: {
+						pageNo: 1,
+						pageSize: 9999,
+						order: "desc",
+						column: "createTime",
+						title: this.formData.num,
+						category: this.formData.type
 
-				if (keyword == 0) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: 1,
-							pageSize: 999,
-							order: "desc",
-							column: "createTime",
-							num: '*' + this.formData.num + '*',
-							partNumNameModel: '*' + this.formData.partNumNameModel + '*',
-							status: 'published'
+					}
+				}).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)
 						}
-					}).then(res => {
-						//鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��;
+					}
+					if (page.num == 1) {
+						this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
+						this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
+					}
 
-						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();
-					})
-
-				} else if (keyword == 1) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: 1,
-							pageSize: 999,
-							order: "desc",
-							column: "createTime",
-							status: 'training',
-							num: '*' + this.formData.num + '*',
-							partNumNameModel: '*' + this.formData.partNumNameModel + '*'
-
-						}
-					}).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.msg2Title = "閫氱煡(" + 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();
-					})
-
-				} else if (keyword == 2) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: 1,
-							pageSize: 999,
-							order: "desc",
-							column: "createTime",
-							status: 'completed',
-							num: '*' + this.formData.num + '*',
-							partNumNameModel: '*' + this.formData.partNumNameModel + '*'
-
-						}
-					}).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.msg3Count = 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();
-					})
-
-				}
-
-
-
-
-
+				}).catch(() => {
+					//鑱旂綉澶辫触, 缁撴潫鍔犺浇
+					this.mescroll.endErr();
+				})
 			},
 
 
@@ -342,7 +345,6 @@
 </script>
 
 <style>
-
 	.is-hover {
 		color: rgba(255, 255, 255, 0.6);
 		background-color: #55aaff;
@@ -350,7 +352,7 @@
 	}
 
 
-	
+
 	.content {
 		margin-top: 5px;
 	}
@@ -360,7 +362,7 @@
 	}
 
 	.popupView {
-		margin-top: 85px;
+		margin-top: 45px;
 		height: auto;
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3