element 列表选中取消选中

		
			
				
					
						{{
							item.tzsm
						}}
					
				
				
					
				
			
			
(温馨提示:一线工程师环节的办理候选人由派单环节指定,此处不可更改)

ts方法

//选择的数据
const handleSelectionChange = (val: any) => {
	multipleSelection.value = val;
};
//多选方框选择
const selectFun = (a: Selection, b: any) => {
	if (allowChange.value == "N") {
	//取消选中
		multipleTableRef.value.toggleRowSelection(b, true);
	}
};
//多选方框样式显示隐藏
const cellClass = (row: any) => {
	if (row.columnIndex === 0 && allowChange.value == "N") {
		return "DisableSelection";
	}
};
//获取候选人名单
const getJdid = (val: any) => {
	manualForm.value.nextJdid = val;
	//根据节点ID查询候选人名单
	loadCandidateByJdid({ jdid: manualForm.value.nextJdid, ywbh: ywbh.value }).then((res: any) => {
		dispatchList.value = res.data.dispatchList;
		allowChange.value = res.data.allowChange;
		//如果是否允许修改为N,显示温馨提示信息并且全选列表
		if (allowChange.value == "N") {
			shoWarning.value = true;
			nextTick(() => {
				multipleTableRef.value.toggleAllSelection();
			});
		} else {
			shoWarning.value = false;
		}
	});
};

scss

// 隐藏全选框
:deep(.el-table .DisableSelection > .cell) {
	display: none !important;
}

你可能感兴趣的:(vue.js,elementui,javascript)