--添加测试模块

This commit is contained in:
2025-10-13 11:53:54 +08:00
parent c3c93fe308
commit e1326c7ce8
146 changed files with 11171 additions and 807 deletions

View File

@ -645,6 +645,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
import { usePermission } from '/@/hooks/web/usePermission';
import { useFormConfig } from '/@/hooks/web/useFormConfig';
import { useRouter } from 'vue-router';
import { setIndexFlowStatus } from '/@/utils/flow/index'
import { get${pascalMainTableName} } from '/@/api/${
model.outputConfig.outputValue
}/${lowerClassName}';
@ -1493,7 +1494,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
if (record.workflowData?.enabled) {
//与工作流有关联的表单
if (record.workflowData.status) {
// 查看按钮现在同时有流程和表单的功能
actionsList.unshift(setIndexFlowStatus(record.workflowData))
} else {
actionsList = actionsList.concat(editAndDelBtn);
}
@ -1674,7 +1675,7 @@ export function buildSimpleFormCode(model: GeneratorConfig, _tableInfo: TableInf
import { reactive, ref,onBeforeMount,onMounted } from 'vue';
import { formProps, formEventConfigs ,formConfig} from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { add${pascalMainTableName}, get${pascalMainTableName}, update${pascalMainTableName} } from '/@/api/${
import { add${pascalMainTableName}, get${pascalMainTableName}, update${pascalMainTableName}, delete${pascalMainTableName} } from '/@/api/${
model.outputConfig.outputValue
}/${lowerClassName}';
import { cloneDeep } from 'lodash-es';
@ -1867,6 +1868,12 @@ export function buildSimpleFormCode(model: GeneratorConfig, _tableInfo: TableInf
systemFormRef.value,
formProps.schemas); //表单事件:加载表单
}
function getFormModel() {
return systemFormRef.value.formModel
}
async function handleDelete(id) {
return await delete${pascalMainTableName}([id]);
}
defineExpose({
setFieldsValue,
resetFields,
@ -1878,6 +1885,8 @@ export function buildSimpleFormCode(model: GeneratorConfig, _tableInfo: TableInf
setMenuPermission,
setWorkFlowForm,
getRowKey,
getFormModel,
handleDelete
});
</script>\n
`;