修改路径

This commit is contained in:
小海
2020-05-16 22:18:45 +08:00
parent abc792a561
commit 42177a7721
683 changed files with 92 additions and 18398 deletions

26
src/app/utils/dataUtil.ts Normal file
View File

@@ -0,0 +1,26 @@
import {Observable, of} from 'rxjs';
import {PageList} from '../class/HttpReqAndResp';
/**
* 判断 一个Page<any>[] 中是否存在一条已查询的数据
* @param pageNum 页码
* @param pageSize 单页数量
* @param pageList 源数据
* @return 未查到null 查到:该条数据
*/
export function exist<T>(pageNum: number, pageSize: number, pageList: PageList<any>[]): Observable<PageList<T>> | null {
if (pageList === undefined || pageList == null || pageList.length === 0) {
return null;
}
// tslint:disable-next-line:prefer-for-of
for (let i = 0; i < pageList.length; i++) {
// tslint:disable-next-line:triple-equals
if (pageList[i].pageNum == pageNum && pageList[i].pageSize == pageSize) {
const ob: Observable<PageList<T>> = new Observable(o => {
o.next(pageList[i]);
o.complete();
})
}
}
return null;
}