提交 f2631604 编写于 作者: KK's avatar KK

动态代码表排序

上级 0bbb77d1
......@@ -73,6 +73,7 @@ export class ${srfclassname('${item.getCodeName()}')} extends CodeListBase {
const service: any = await this.getService('${item.getPSAppDataEntity().codeName?lower_case}');
const response: any = await service.${item.getPSAppDEDataSet().codeName}(context, Object.assign(this.userParamNames,data));
if (response && response.status === 200 && response.data) {
response.data.sort((value: any,next: any)=>{ return value.ordervalue - next.ordervalue});
return new HttpResponse(200, this.doItems(response.data));
}
return new HttpResponse(200, []);
......@@ -93,6 +94,7 @@ export class ${srfclassname('${item.getCodeName()}')} extends CodeListBase {
const service: any = await this.getService('${item.getPSAppDataEntity().codeName?lower_case}');
const response: any = await service.${item.getPSAppDEDataSet().codeName}(context, { ...data, codelistid: '${item.id}' });
if (response && response.status === 200 && response.data) {
response.data.sort((value: any,next: any)=>{ return value.ordervalue - next.ordervalue});
return new HttpResponse(200, this.doItems(response.data));
}
return new HttpResponse(200, []);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册