You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
import { Injectable } from '@angular/core';
|
|
import {HttpClient} from "@angular/common/http";
|
|
import {environment} from "../../../environments/environment";
|
|
import {ObjectData} from "../../utils/objectData.service";
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class FileService {
|
|
|
|
constructor(private http: HttpClient) { }
|
|
|
|
/**
|
|
* 查询列表
|
|
* @param params
|
|
* @param callBack
|
|
*/
|
|
public getFileRecordsList(params: object, callBack:any) {
|
|
this.http.get(environment.baseUrl + 'file/getFileRecordsList?' + ObjectData.objectByString(params)).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 查询详情
|
|
* @param id
|
|
* @param callBack
|
|
*/
|
|
public findFileRecords(id: number, callBack:any) {
|
|
this.http.get(environment.baseUrl + 'file/findFileRecords?id=' + id + "&time=" + new Date().getTime()).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
public getDownLoad(id: number, callBack:any) {
|
|
this.http.get(environment.baseUrl + 'file/getDownLoad?id=' + id + "&time=" + new Date().getTime()).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
}
|
|
|