代码生成器修改,流程新建,表单新建,流程审批等页面修改
This commit is contained in:
@ -825,12 +825,14 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
const btnEvent = ${btnEvent}
|
||||
|
||||
const { currentRoute } = useRouter();
|
||||
const router = useRouter();
|
||||
${
|
||||
hasTemplatePrint
|
||||
? `const printMenuId = computed(() => currentRoute.value.meta.menuId as string);`
|
||||
: ''
|
||||
}
|
||||
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
|
||||
const schemaIdComputedRef = computed(() => currentRoute.value.meta.schemaId as string);
|
||||
|
||||
${
|
||||
hasStartWorkButton
|
||||
@ -1000,16 +1002,17 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
hasAddButton
|
||||
? `
|
||||
function handleAdd() {
|
||||
${
|
||||
formType === 'modal'
|
||||
? `
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
});`
|
||||
: `
|
||||
openDrawer(true, {
|
||||
isUpdate: false,
|
||||
});`
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow'
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/form/${lowerClassName}/0/createForm',
|
||||
query: {
|
||||
formPath: '${model.outputConfig.outputValue}/${lowerClassName}'
|
||||
}
|
||||
});
|
||||
}
|
||||
}`
|
||||
: ''
|
||||
@ -1021,9 +1024,11 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
${
|
||||
formType === 'modal'
|
||||
? `
|
||||
openModal(true, {
|
||||
id: record.${camelCaseString(mainTable.pkField)},
|
||||
isUpdate: true,
|
||||
router.push({
|
||||
path: '/form/${lowerClassName}/' + record.id + '/updateForm',
|
||||
query: {
|
||||
formPath: '${model.outputConfig.outputValue}/${lowerClassName}'
|
||||
}
|
||||
});`
|
||||
: `
|
||||
openDrawer(true, {
|
||||
@ -1303,10 +1308,12 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
${
|
||||
formType === 'modal'
|
||||
? `
|
||||
openModal(true, {
|
||||
isView: true,
|
||||
id: record.${camelCaseString(mainTable.pkField)},
|
||||
});`
|
||||
router.push({
|
||||
path: '/form/${lowerClassName}/' + record.id + '/viewForm',
|
||||
query: {
|
||||
formPath: '${model.outputConfig.outputValue}/${lowerClassName}'
|
||||
}
|
||||
});`
|
||||
: `
|
||||
openDrawer(true, {
|
||||
isView: true,
|
||||
@ -1547,10 +1554,13 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
}
|
||||
}
|
||||
function handleApproveProcess(record: Recordable) {
|
||||
visibleApproveProcessRef.value = true;
|
||||
schemaIdRef.value = record.workflowData.schemaId;
|
||||
processIdRef.value = record.workflowData.processId;
|
||||
taskIdRef.value = record.workflowData.taskIds[0];
|
||||
const { processId, taskIds, schemaId } = record.workflowData;
|
||||
router.push({
|
||||
path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
|
||||
query: {
|
||||
taskId: taskIds[0]
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleCloseLaunch() {
|
||||
visibleLaunchProcessRef.value = false;
|
||||
|
||||
Reference in New Issue
Block a user