feat: 修改主键获取,并对没有值情况进行判断
This commit is contained in:
@ -1784,14 +1784,16 @@ export function buildSimpleFormCode(model: GeneratorConfig, _tableInfo: TableInf
|
||||
setDisabledForm(); //查看
|
||||
}
|
||||
state.formModel = formModels;
|
||||
if(formModels?.id) {
|
||||
get${pascalMainTableName}(formModels.id).then(res => {
|
||||
if(formModels[RowKey]) {
|
||||
get${pascalMainTableName}(formModels[RowKey]).then(res => {
|
||||
if(res) {
|
||||
setFieldsValue(res);
|
||||
}
|
||||
}).catch(err => {
|
||||
setFieldsValue(formModels);
|
||||
});
|
||||
} else {
|
||||
setFieldsValue(formModels);
|
||||
}
|
||||
} catch (error) {}
|
||||
await createFormEvent(formEventConfigs, state.formModel,
|
||||
|
||||
Reference in New Issue
Block a user