feat: 新丰江 回滚表单编辑按钮逻辑
This commit is contained in:
@ -841,7 +841,6 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
||||
const schemaIdComputedRef = ref();
|
||||
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
|
||||
const menuId = currentRoute.value.meta.menuId;
|
||||
|
||||
${
|
||||
hasStartWorkButton
|
||||
@ -1019,8 +1018,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
router.push({
|
||||
path: '/form/${lowerClassName}/' + record.id + '/viewForm',
|
||||
query: {
|
||||
formPath: '${model.outputConfig.outputValue}/${lowerClassName}',
|
||||
menuId: menuId
|
||||
formPath: '${model.outputConfig.outputValue}/${lowerClassName}'
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1349,8 +1347,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
router.push({
|
||||
path: '/form/${lowerClassName}/' + record.id + '/viewForm',
|
||||
query: {
|
||||
formPath: '${model.outputConfig.outputValue}/${lowerClassName}',
|
||||
menuId: menuId
|
||||
formPath: '${model.outputConfig.outputValue}/${lowerClassName}'
|
||||
}
|
||||
});`
|
||||
: `
|
||||
@ -1481,7 +1478,6 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
onClick: handleView.bind(null, record),
|
||||
code: button.code
|
||||
});
|
||||
}
|
||||
if (['edit', 'copyData', 'delete'].includes(button.code)) {
|
||||
@ -1511,6 +1507,18 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
act.onClick = handleStartwork.bind(null, record);
|
||||
}
|
||||
actionsList.unshift(act);
|
||||
${
|
||||
hasFlowRecordButton
|
||||
? `if (hasFlowRecord) {
|
||||
actionsList.splice(1, 0, {
|
||||
tooltip: '查看流转记录',
|
||||
icon: 'liuzhuanxinxi|svg',
|
||||
onClick: handleFlowRecord.bind(null, record),
|
||||
});
|
||||
}`
|
||||
: ''
|
||||
}
|
||||
|
||||
} else {
|
||||
actionsList.unshift({
|
||||
icon: 'faqishenpi|svg',
|
||||
@ -1525,14 +1533,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
}
|
||||
}
|
||||
return filterAction(actionsList, record);
|
||||
}
|
||||
function filterAction(list, record) {
|
||||
const result = list.filter((item)=> {
|
||||
let conditions = item.code !== 'view'
|
||||
return conditions
|
||||
})
|
||||
return result
|
||||
return actionsList;
|
||||
}
|
||||
`
|
||||
: `
|
||||
@ -1543,7 +1544,6 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
tooltip: button?.name,
|
||||
color: button.code === 'delete' ? 'error' : undefined,
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
code: button?.code
|
||||
};
|
||||
} else {
|
||||
if (button.code === 'view') {
|
||||
@ -1551,21 +1551,13 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
code: button?.code
|
||||
};
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
});
|
||||
return filterAction(actionsList, record);
|
||||
}
|
||||
function filterAction(list, record) {
|
||||
const result = list.filter((item)=> {
|
||||
let conditions = item.code === 'view' || item.code === 'delete'
|
||||
return conditions
|
||||
})
|
||||
return result
|
||||
return actionsList;
|
||||
}`
|
||||
}
|
||||
${
|
||||
|
||||
Reference in New Issue
Block a user