浏览代码

全选bug

zhengkaixin 4 年之前
父节点
当前提交
4eeff86225
共有 1 个文件被更改,包括 11 次插入4 次删除
  1. 11 4
      src/projects/business/views-xsy/PlanClass/Person.vue

+ 11 - 4
src/projects/business/views-xsy/PlanClass/Person.vue

@@ -112,6 +112,11 @@
 			selectAll(){
 				for(var j in this.arrangeShiftCompanyList){
 					var obj=this.arrangeShiftCompanyList[j]
+					
+					if(obj.type!='2'){
+						
+						continue;
+					}
 					var bl=true;
 					for(var i  in this.selectPerson){
 						
@@ -170,10 +175,12 @@
 				this.selectPerson=this.selectPersonOld;
 				this.$emit("confirm",{status:0})
 			},
-			ok(){
-				this.selectIdOld=this.selectId;
-				this.selectPersonOld=this.selectPerson;
-				this.$emit("confirm",{status:1,selectId:this.selectId,selectPerson:this.selectPerson})
+			ok(){
+				if(this.selectPerson.length){
+					this.selectIdOld=this.selectId;
+					this.selectPersonOld=this.selectPerson;
+					this.$emit("confirm",{status:1,selectId:this.selectId,selectPerson:this.selectPerson})
+				}
 			},
 		 getArrangeShiftPersonList(){
 		 		this.isLoading = true;