map 语法
// 解析 sn 字符串转为数组,a,b,c=>[a,b,c]
const snList = data?.sn ? data.sn.split(',').map((s: string) => s.trim()).filter(Boolean) : [''];
// 转换为组件需要的格式
serialNumbers.value = snList.map((value: string, index: number) => ({
id: index + 1,
value: value
}));
刷新表格
1、const tableKey = ref(0);
2、tableKey.value += 1;
3、<publicFormAgGrid :key="tableKey" :agGridConfig="agGridConfig" style="height: 400px;"></publicFormAgGrid>
开启过滤
filterable:true el-select的属性
formJson: [
{type: 'text', field: 'rfidNo', label: 'RFID', clearable: true},
{ type: 'select', field: 'salesOrderItemNo', label: '项目号', otherField: 'salesOrderItemNo', parentId: 'business:PD_SALES_ORDER_ITEM_SQL_DICT', dictParams: { grpFlg },clearable: true,
filterable: true, },
]