29 lines
727 B
TypeScript
29 lines
727 B
TypeScript
import axios from 'axios';
|
|
// import type { RouteRecordNormalized } from 'vue-router';
|
|
// import { UserState } from '@/store/modules/user/types';
|
|
|
|
export interface ProjectRecord {
|
|
id: string;
|
|
name: string;
|
|
type: string;
|
|
}
|
|
|
|
export interface ProjectParams extends Partial<ProjectRecord> {
|
|
current: number;
|
|
pageSize: number;
|
|
}
|
|
|
|
// 全部项目列表
|
|
export function getAllProjectList() {
|
|
return axios.get<any>('/project/getAllProjectList');
|
|
}
|
|
|
|
// 项目信息
|
|
export function getProjectDetail(id: string) {
|
|
return axios.get<any>(`/project/getProject?id=${id}`);
|
|
}
|
|
// 项目列表(分页)
|
|
export function queryPolicyList(params: ProjectParams) {
|
|
return axios.post<any>('/project/getProjectList', { params });
|
|
}
|