zouling 1 rok temu
rodzic
commit
9bef54ee64

+ 12 - 7
work/components/zb-table/zb-tablesearch.vue

@@ -35,10 +35,10 @@
 														  },getHeaderCellStyle(item,index)]"
 	                      v-for="(item,index) in transColumns" :key="index">
                       <template v-if="item.type==='selection'">
-                        <view class="checkbox-item">
+                        <!-- <view class="checkbox-item">
                           <tableCheckbox
                               :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
-                        </view>
+                        </view> -->
                       </template>
                       <template v-else>
 						  {{ item.label }}
@@ -181,10 +181,10 @@
 					:class="border?'':'nborder'"
 	            >
                 <template v-if="item.type==='selection'">
-                  <view class="checkbox-item">
+                  <!-- <view class="checkbox-item">
                     <tableCheckbox
                         :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
-                  </view>
+                  </view> -->
                 </template>
                 <template v-else>
                   {{ item.label }}
@@ -293,10 +293,10 @@
 														  }"
 	                      v-for="(item,index) in transColumns" :key="index">
                       <template v-if="item.type==='selection'">
-                        <view class="checkbox-item">
+                        <!-- <view class="checkbox-item">
                           <tableCheckbox
                               :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
-                        </view>
+                        </view> -->
                       </template>
                       <template v-else>
                         {{ item.label||'' }}
@@ -592,7 +592,12 @@ export default {
             if(!this.selectArr.length){
               this.selectArr.push(item)
             }
-          }
+          }else{
+			  var indexNum = (this.selectArr || []).findIndex((ite) => ite.userId === item.userId);
+			  if(indexNum!=-1){
+			  	this.selectArr.splice(indexNum,1)
+			  }
+		  }
         }
         if(this.rowKey){
           if(typeof this.rowKey==='function'){

+ 7 - 3
work/pages/case/lmtapeople.vue

@@ -96,9 +96,13 @@
 			},
 			getDelFn(ite,idx){
 				this.checkList.splice(idx,1);
-				// var indexNum = (this.tableData || []).findIndex((item) => item.userId === ite.userId);
-				// console.log(indexNum)
-				// this.tableData[indexNum].checked=false;
+				var newArr=this.tableData
+				var indexNum = (this.tableData || []).findIndex((item) => item.userId === ite.userId);
+				if(indexNum!=-1){
+					newArr[indexNum].checked=false;
+					this.tableData=[];
+					this.tableData=JSON.parse(JSON.stringify(newArr));
+				}
 			},
 			toggleRowSelection(e,data,item){
 				this.checkList=JSON.parse(JSON.stringify(data))