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

---
 pages/ToDoList/ToDoList.vue |  222 ++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 170 insertions(+), 52 deletions(-)

diff --git a/pages/ToDoList/ToDoList.vue b/pages/ToDoList/ToDoList.vue
index 1989d82..ec6a11d 100644
--- a/pages/ToDoList/ToDoList.vue
+++ b/pages/ToDoList/ToDoList.vue
@@ -35,7 +35,7 @@
 		</view>
 
 		<view class="container">
-		
+
 			<mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="top" @down="downCallback" @up="upCallback">
 				<!-- 鍒楄〃淇℃伅寮�濮� -->
 				<view class="content">
@@ -47,12 +47,7 @@
 								{{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.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">
@@ -61,17 +56,23 @@
 						</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">
+							<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     radius text-right">
+							<view class="flex-sub bg-white padding-xs margin-xs   text-olive  radius text-right">
 								{{item.name}}
 							</view>
-						</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.title}}
+							</view>
+						</view>
 					</uni-card>
 				</view>
 
@@ -87,7 +88,7 @@
 		data() {
 			return {
 				type: 'top',
-				scrollLeft:0,
+				scrollLeft: 0,
 				formData: {
 					num: '',
 					partNumNameModel: ''
@@ -95,7 +96,7 @@
 				NavBarColor: this.NavBarColor,
 				activeColor: '#5277A6',
 				url: {
-	
+
 					stallList: "/assign/flow/toTaskBySelf"
 				},
 
@@ -126,7 +127,7 @@
 		},
 		computed: {
 			top() {
-				return this.CustomBar * 2 + 130
+				return this.CustomBar * 2 + 50
 			},
 			style() {
 				var StatusBar = this.StatusBar;
@@ -145,58 +146,176 @@
 
 		created() {},
 		methods: {
-			
+
 			/**
 			 * @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/ToDoCheckDetils';
+			      break;
+			    default:
+			      console.warn(`No URL found for name: ${name} and type: ${type}`);
+			      return;
+			  }
+			
+			  if (url) {
+			    uni.navigateTo({
+			      url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}`
+			    });
+			  }
 			},
+
 			
+			
+			// onClickProductionTask(item) {
+			// 	const name = item.name
+			// 	const  type=item.category_dictText	
+			// 	if (name == '鏄惁闇�瑕侀鐢ㄥ浠�' && type=='璁惧缁翠慨') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+			// 		})
+			// 	} else if (name == '鐐规鎵ц' && type=='璁惧鐐规') {
+
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	} else if (name == '鍛ㄤ繚鎵ц' && type=='璁惧鍛ㄤ繚') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '鐝粍闀跨‘璁�' && type=='璁惧鐐规') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '鐝粍闀跨‘璁�' && type=='璁惧鍛ㄤ繚') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '璁剧鍛樺垵楠�' && type=='璁惧鍛ㄤ繚') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '璁捐兘閮ㄧ粓楠�' && type=='璁惧鍛ㄤ繚') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '绠$悊鍛橀鐢ㄥ浠�' && type=='璁惧缁翠慨') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '鎿嶄綔宸ョ‘璁�' && type=='璁惧缁翠慨') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '缁翠慨鎵ц' && type=='璁惧缁翠慨') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts?item=' +
+			// 				encodeURIComponent(JSON.stringify(item))
+
+			// 		})
+			// 	}else if (name == '鐐规宸ュ崟' && type=='璁惧鐐规') {
+			// 		uni.navigateTo({
+			// 			url: '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils?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: 'asc',
+						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();
+				})
+
 			},
 
 
@@ -342,7 +461,6 @@
 </script>
 
 <style>
-
 	.is-hover {
 		color: rgba(255, 255, 255, 0.6);
 		background-color: #55aaff;
@@ -350,7 +468,7 @@
 	}
 
 
-	
+
 	.content {
 		margin-top: 5px;
 	}

--
Gitblit v1.9.3