路由
作者:
表单
const hash = appRouterHashManager.generateHash(EN_WorkforceResource, PageModeEnum.Form, {
id: props.data.id,
mode: BizFormModeEnum.View,
});
proxyHistory.push(hash, {
onSuccess: () => {
console.log(111, 'onSuccess');
},
});
列表
/**
* ListSolution 的透传支持传递查询条件
*/
export interface IListHashOptions<T = extraParamsType> {
groupName: string;
queryItems?: IQueryItem[];
criteriaStr?: string;
queryStringParams?: { [key: string]: string };
queryCriterias?: IQueryCriteria[];
queryListDefId?: string;
listColumnsDefId?: string;
autoload?: boolean;
isOldWay?: boolean;
extraParams?: T;
}
// 列表,只跳转
const hash = appRouterHashManager.generateHash(EN_SettlementMethod, PageModeEnum.List);
// 列表,指定列表方案
const hash = appRouterHashManager.generateHash(EN_SettlementMethod, PageModeEnum.ListV2, {
groupName: EN_SettlementMethod
});
proxyHistory.replace(hash, { needRefresh: true }, true);
// 列表,带参数
const url = appRouterHashManager.generateHash(EN_FormView, PageModeEnum.ListV2, {
groupName: 'FormView_list',
queryCriterias: criterias,
queryStringParams: {
createdOrgId,
formTemplateId: templateId,
entityName: entityName,
},
});
const hash = appRouterHashManager.generateHash(
EN_WorkforceResource,
PageModeEnum.ListV2,
{
groupName: 'WorkforceResourceDetailQuery_list',
criteriaStr: `id = '${props.data.id}'`,
},
);
proxyHistory.push(hash, { needRefresh: true });