| | |
| | | const params = { |
| | | record, |
| | | isUpdate: true, |
| | | ifSave: false, |
| | | ifSave: objParams['ifSave'], |
| | | entityName: props.entityName, |
| | | formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`), |
| | | cType, |
| | |
| | | if (isNullOrUnDef(custImport.value['default'])) { |
| | | openDrawer(true, { |
| | | isUpdate: false, |
| | | ifSave: false, |
| | | ifSave: objParams.value['ifSave'], |
| | | entityName: props.entityName, |
| | | formJson: _cruds, //getFormSchema(`${entityName.value}_Crud`), |
| | | crudColSlots: colSlots.value, |
| | |
| | | }); |
| | | } else { |
| | | const [{ CreateAction }] = custImport.value['default'](); |
| | | const result = CreateAction(fnName); |
| | | const result = CreateAction(props.entityName); |
| | | switch (result.action) { |
| | | case 'go': |
| | | sessionStorage.removeItem(`${result.params.Name}_update_params`); |
| | | // 将对象转换为JSON字符串并保存到sessionStorage |
| | | sessionStorage.setItem( |
| | | `${result.params.Name}_params`, |
| | | `${result.params.Name}_update_params`, |
| | | encodeURI(JSON.stringify(result.params)), |
| | | ); |
| | | go( |
| | | `/${result.url}/${encodeURI(JSON.stringify({ sName: result.params.Name, Name: result.params.Name }))}`, |
| | | `/${result.url}/${encodeURI(JSON.stringify({ sName: `${result.params.Name}_update`, Name: result.params.Name }))}`, |
| | | ); |
| | | break; |
| | | case 'drawer': |
| | | openDrawer(true, { |
| | | isUpdate: false, |
| | | ifSave: false, |
| | | ifSave: objParams.value['ifSave'], |
| | | entityName: props.entityName, |
| | | formJson: _cruds, //getFormSchema(`${entityName.value}_Crud`), |
| | | crudColSlots: colSlots.value, |