chore: 流程监控 - 待办任务页面的id不唯一 改为前端处理

This commit is contained in:
dap
2024-12-18 14:10:50 +08:00
parent 86013b44a6
commit 75d059f15a
2 changed files with 41 additions and 13 deletions

View File

@@ -12,12 +12,19 @@ interface Props extends TaskInfo {
active: boolean;
}
const props = withDefaults(defineProps<{ info: Props }>(), {});
const props = withDefaults(defineProps<{ info: Props; rowKey?: string }>(), {
rowKey: 'id',
});
const emit = defineEmits<{ click: [string] }>();
/**
* TODO: 这里要优化 事件没有用到
*/
function handleClick() {
emit('click', props.info.id);
console.log('click');
const idKey = props.rowKey as keyof TaskInfo;
emit('click', props.info[idKey]);
}
</script>