Jelajahi Sumber

指派人列表改为具有改善权限的人员列表,任务顶部加切换按钮,查核组长情景卡片内容修改

jiangniuniu 4 tahun lalu
induk
melakukan
6061be871f

+ 37 - 37
pages/calendar/calendar.vue

@@ -93,20 +93,20 @@ export default {
       this.isInitWs = websocket.ws ? false : true;
       this.init(this.isInitWs);
     }, 3 * 60 * 1000);
-    this.messStatus();
+    // this.messStatus();
   },
   beforeDestroy() {
     // 关闭ws连接
     websocket.close();
     clearInterval(this.refTimer);
   },
-  watch: {
-    $route: {
-      handler(route) {
-        this.messStatus();
-      },
-    },
-  },
+  // watch: {
+  //   $route: {
+  //     handler(route) {
+  //       this.messStatus();
+  //     },
+  //   },
+  // },
   methods: {
     getCanList() {
       this.$store
@@ -182,35 +182,35 @@ export default {
         });
       }
     },
-    messStatus() {
-      let num = 1;
-      let timer = setInterval(() => {
-        this.$store
-          .dispatch({
-            type: "calendar/commActions",
-            payload: {
-              key: "messagesList",
-              data: {
-                pageNum: num,
-                pageSize: 100,
-              },
-            },
-          })
-          .then((res) => {
-            if (res && res.list.length == 0) {
-              clearInterval(timer);
-            } else if (res && res.list.length != 0) {
-              res.list.map((item) => {
-                if (!item.readStatus) {
-                  this.messageType = true;
-                  return;
-                }
-              });
-            }
-          });
-        num++;
-      }, 100);
-    },
+    // messStatus() {
+    //   let num = 1;
+    //   let timer = setInterval(() => {
+    //     this.$store
+    //       .dispatch({
+    //         type: "calendar/commActions",
+    //         payload: {
+    //           key: "messagesList",
+    //           data: {
+    //             pageNum: num,
+    //             pageSize: 100,
+    //           },
+    //         },
+    //       })
+    //       .then((res) => {
+    //         if (res && res.list.length == 0) {
+    //           clearInterval(timer);
+    //         } else if (res && res.list.length != 0) {
+    //           res.list.map((item) => {
+    //             if (!item.readStatus) {
+    //               this.messageType = true;
+    //               return;
+    //             }
+    //           });
+    //         }
+    //       });
+    //     num++;
+    //   }, 100);
+    // },
   },
 };
 </script>

+ 7 - 1
pages/mission-action/components/assign-mission.vue

@@ -147,7 +147,13 @@
                 _empDeptList.push(item);
               }
             })
-            this.empDeptList = _empDeptList;
+			let _empDeptList2 =[];
+			 _empDeptList.map((item)=>{
+				if(item.isImprove){
+					_empDeptList2.push(item)
+				}
+			})
+            this.empDeptList = _empDeptList2;
 					}
 				});
 			}

+ 82 - 40
pages/mission/mission.vue

@@ -3,6 +3,9 @@
 		<view class="message-remind" @click="toMessagePage">
 			<image :src="messageType?'/static/message-unread.png':'/static/message-read.png'" mode=""></image>
 		</view>
+		<view class="radio-group" v-if="permission == 1 || permission == 4">
+			<text :style="checkIndex==1?{background:'#3377ff',color:'#fff'}:{background:'#F5F6FA',color:'#3377ff'}" @click="cheangeRadioIndex(1)">我的单位</text>
+			<text :style="checkIndex==2?{background:'#3377ff',color:'#fff'}:{background:'#F5F6FA',color:'#3377ff'}" @click="cheangeRadioIndex(2)">待处理</text></view>
 	 	<scroll-view class="scroll-y" scroll-y="true">
 			<list-item
 				v-for="(item, i) in improvingTaskList"
@@ -81,6 +84,10 @@
 				refTimer: null,
 				isInitWs:null,
 				messageType:null,
+				checkIndex:2,
+				improvingTaskList2:[],
+				list:[],
+				permission:'',
 			}
 		},
 		created() {
@@ -90,20 +97,20 @@
 			    this.isInitWs = websocket.ws ? false : true;
 			    this.init(this.isInitWs);
 			}, 3 * 60 * 1000);
-			this.messStatus();
+			// this.messStatus();
 		},
 		beforeDestroy() {
 		    // 关闭ws连接
 		    websocket.close();
 		    clearInterval(this.refTimer);
 		  },
-		  watch:{
-		  	  "$route":{
-		  		  handler(route){
-		  			  this.messStatus();
-		  		  }
-		  	  }
-		  },
+		  // watch:{
+		  // 	  "$route":{
+		  // 		  handler(route){
+		  // 			  this.messStatus();
+		  // 		  }
+		  // 	  }
+		  // },
 		methods: {
 			toggleBtn() {
 				let flag = !this.showCloseList;
@@ -127,12 +134,24 @@
 					}
 				}).then(data => {
 					if(data) {
-						this.improvingTaskList = data.improvingTaskResponses || [];
+						// this.improvingTaskList = data.improvingTaskResponses || [];
+						this.improvingTaskList2 = data.improvingTaskResponses || [];
 						this.completeTaskList = data.improveCompleteResponses || [];
 						let hiId = uni.getStorageSync('hiId');
 						let user = uni.getStorageSync('id');
 						let permission = uni.getStorageSync('nowPermission');
 						this.isInitWs && this.initWebsocket(hiId,user,permission);
+						this.permission = permission;
+						if(this.checkIndex == 2){
+							let list = [];
+							this.improvingTaskList2.map(item=>{
+								if(item.tackCare){
+									list.push(item)
+								}
+							})
+							this.list = list;
+							this.improvingTaskList = list;
+						}
 					}
 				});
 				/** 请求参数 data
@@ -162,33 +181,41 @@
 				  url: `/pages/messages/messages`
 				});
 			},
-			messStatus(){
-				let num = 1;
-				let timer = setInterval(()=>{
-				  this.$store.dispatch({
-					  type: "calendar/commActions",
-					  payload: {
-						key: "messagesList",
-						data: {
-						  pageNum: num,
-						  pageSize: 100,
-						},
-					  },
-					}).then((res)=>{
-						if(res && res.list.length == 0){
-							clearInterval(timer)
-						}else if(res && res.list.length != 0){
-							res.list.map((item)=>{
-								if(!item.readStatus){
-									this.messageType = true;
-									return;
-								}
-							})
-						}
-					})
-				  num++;
-				},100)
-			}
+			// messStatus(){
+			// 	let num = 1;
+			// 	let timer = setInterval(()=>{
+			// 	  this.$store.dispatch({
+			// 		  type: "calendar/commActions",
+			// 		  payload: {
+			// 			key: "messagesList",
+			// 			data: {
+			// 			  pageNum: num,
+			// 			  pageSize: 100,
+			// 			},
+			// 		  },
+			// 		}).then((res)=>{
+			// 			if(res && res.list.length == 0){
+			// 				clearInterval(timer)
+			// 			}else if(res && res.list.length != 0){
+			// 				res.list.map((item)=>{
+			// 					if(!item.readStatus){
+			// 						this.messageType = true;
+			// 						return;
+			// 					}
+			// 				})
+			// 			}
+			// 		})
+			// 	  num++;
+			// 	},100)
+			// }
+			cheangeRadioIndex(index){
+				this.checkIndex = index;
+				if(this.checkIndex == 1){
+					this.improvingTaskList = this.improvingTaskList2;
+				}else{
+					this.improvingTaskList = this.list;
+				}
+			},
 		},
 		components: {
 			listItem
@@ -204,8 +231,8 @@
 		width: 62.5rpx;
 		height: 62.5rpx;
 		position: fixed;
-		top: 25rpx;
-		right: 25rpx;
+		top: 6.25rpx;
+		right: 6.25rpx;
 		background: rgba(255, 255, 255, 0.95);
 		border-radius: 50%;
 		z-index: 2;
@@ -216,8 +243,23 @@
 			height: 28.75rpx;
 		}
 	}
-   	.scroll-y {
-			height: calc(100% - 87.5rpx);
+   	.radio-group{
+		margin: 12.5rpx 25rpx;
+		width: calc(100% - 50rpx);
+		border: 0.62rpx solid #3377ff;
+		border-radius: 25rpx;
+		font-size: 22.5rpx;
+		line-height: 50rpx;
+		color: #3377ff;
+		overflow: hidden;
+		text{
+			width: 50%;
+			display: inline-block;
+			text-align: center;
+		}
+	}
+	.scroll-y {
+			height: calc(100% - 176rpx);
 
 			.completed-box {
 

+ 38 - 36
pages/situationsCenter/situationsCenter.vue

@@ -25,7 +25,8 @@
 							<text class="title-name">{{item.name}}</text>
 						</view>
 						<view class="check-group">
-							<text class="group-text">{{item.checkGroupName}}</text>
+							<text class="group-text">
+							{{nowPermission==2?'剩余'+item.toDistributeCount+'个待分配':item.checkGroupName}}</text>
 						</view>
 						<view class="row">
 							<image class="situation-check" src="/static/situation-check.png"></image>
@@ -73,20 +74,20 @@
 			  this.isInitWs = websocket.ws ? false : true;
 			  this.init(this.isInitWs);
 			}, 3 * 60 * 1000);
-			this.messStatus();
+			// this.messStatus();
 		},
 		beforeDestroy() {
 		  // 关闭ws连接
 		  websocket.close();
 		  clearInterval(this.refTimer);
 		},
-		watch:{
-			  "$route":{
-				  handler(route){
-					  this.messStatus();
-				  }
-			  }
-		},
+		// watch:{
+		// 	  "$route":{
+		// 		  handler(route){
+		// 			  this.messStatus();
+		// 		  }
+		// 	  }
+		// },
 		methods: {
 			openSearchBar(){
 				this.isSearchBarShow=true;
@@ -140,6 +141,7 @@
 						checkGroupName:item.checkGroupName,
 						topic:item.topic==0?true:false,
 						situationID:item.id,
+						toDistributeCount:item.toDistributeCount,
 					});
 				});
 			},
@@ -211,33 +213,33 @@
 					this.isInitWs && this.initWebsocket(hiId, user, permission);
 				});
 			},
-			messStatus(){
-				let num = 1;
-				let timer = setInterval(()=>{
-				  this.$store.dispatch({
-					  type: "calendar/commActions",
-					  payload: {
-						key: "messagesList",
-						data: {
-						  pageNum: num,
-						  pageSize: 100,
-						},
-					  },
-					}).then((res)=>{
-						if(res && res.list.length == 0){
-							clearInterval(timer)
-						}else if(res && res.list.length != 0){
-							res.list.map((item)=>{
-								if(!item.readStatus){
-									this.messageType = true;
-									return;
-								}
-							})
-						}
-					})
-				  num++;
-				},200)
-			}
+			// messStatus(){
+			// 	let num = 1;
+			// 	let timer = setInterval(()=>{
+			// 	  this.$store.dispatch({
+			// 		  type: "calendar/commActions",
+			// 		  payload: {
+			// 			key: "messagesList",
+			// 			data: {
+			// 			  pageNum: num,
+			// 			  pageSize: 100,
+			// 			},
+			// 		  },
+			// 		}).then((res)=>{
+			// 			if(res && res.list.length == 0){
+			// 				clearInterval(timer)
+			// 			}else if(res && res.list.length != 0){
+			// 				res.list.map((item)=>{
+			// 					if(!item.readStatus){
+			// 						this.messageType = true;
+			// 						return;
+			// 					}
+			// 				})
+			// 			}
+			// 		})
+			// 	  num++;
+			// 	},200)
+			// }
 		}
 	}
 </script>