| | |
| | | const go = useGo(); |
| | | const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); |
| | | // 从sessionStorage中读取参数并转换回对象 |
| | | const _savedParams =sessionStorage.getItem(`${objParams.value.sName}_params`) |
| | | const savedParams = _savedParams ? ref(JSON.parse(decodeURI(_savedParams))) : ref({}); |
| | | const _savedParams = sessionStorage.getItem(`${objParams.value.sName}_params`); |
| | | const savedParams = _savedParams ? ref(JSON.parse(decodeURI(_savedParams))) : ref({}); |
| | | const entityName = ref(objParams.value.ID); |
| | | const _columns = ref<any[]>([]); |
| | | const _searchFormSchema = ref<any[]>([]); |
| | |
| | | searchForms[i].componentProps.params.name = |
| | | `${objParams.value.ID}+${searchForms[i].field}s`; |
| | | searchForms[i].componentProps.labelField = unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name'; |
| | | searchForms[i].defaultValue = null; |
| | | } |
| | | if ( |
| | | !isNullOrEmpty(searchForms[i].componentProps) && |
| | |
| | | ) { |
| | | searchForms[i].componentProps.api = getEntity; |
| | | searchForms[i].componentProps.resultField = 'Data.Items'; |
| | | searchForms[i].defaultValue = null; |
| | | } |
| | | onChangeConfig(searchForms[i]); |
| | | } |
| | |
| | | _cruds[i].componentProps.api = GetEnum; |
| | | _cruds[i].componentProps.params.name = `${objParams.value.ID}+${_cruds[i].field}s`; |
| | | _cruds[i].componentProps.labelField = unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name'; |
| | | _cruds[i].defaultValue = null; |
| | | } |
| | | if ( |
| | | !isNullOrEmpty(_cruds[i].componentProps) && |
| | |
| | | ) { |
| | | _cruds[i].componentProps.api = getEntity; |
| | | _cruds[i].componentProps.resultField = 'Data.Items'; |
| | | _cruds[i].defaultValue = null; |
| | | } |
| | | if (_cruds[i].component == 'Upload') { |
| | | _cruds[i].componentProps = {}; |