import { ApiClientFactory } from '../core/api.client.factory'; import { SearchReminderModel, EditReminderModel, AddReminderModel } from '../model/reminder.model'; // 提醒日志 // const host = 'http://10.1.70.88:8001/gss-api'; const host = ''; export class ReminderService { constructor(private factory: ApiClientFactory) {} // 检索 async queryReminderList(projectId: string, params: SearchReminderModel, groupFlag: string): Promise { return await this.factory.gssApi.get(`${host}/web/projects/${projectId}/reminder/listPagesByTitle`, { ...params, groupFlag, }); } // 删除 async delReminderItem(projectId: string, id: string, groupFlag: string): Promise { return await this.factory.gssApi.delete(`${host}/web/projects/${projectId}/reminder/delete/${id}`); } // 编辑 async updateReminderItem(projectId: string, params: EditReminderModel, groupFlag: string): Promise { return await this.factory.gssApi.put(`${host}/web/projects/${projectId}/reminder/edit`, params); } // 详情 async queryReminderItem(projectId: string, id: string, groupFlag: string): Promise { return await this.factory.gssApi.get(`${host}/web/projects/${projectId}/reminder/get/${id}`); } // 添加 async addReminderItem(projectId: string, params: AddReminderModel, groupFlag: string): Promise { return await this.factory.gssApi.post(`${host}/web/projects/${projectId}/reminder/add`, { ...params, groupFlag, }); } // 界面列表 async queryReminderPages(projectId: string, params: SearchReminderModel, groupFlag: string): Promise { return await this.factory.gssApi.get(`${host}/web/projects/${projectId}/reminder/listPages`, { ...params, groupFlag, }); } // 组件标题 async queryComponentTitle(projectId: string, widgetFlag: string): Promise { return await this.factory.gssApi.get(`${host}/web/projects/${projectId}/reminder/widget/getByFlag`, { widgetFlag, }); } // 修改标题 async saveComponentTitle(projectId: string, params: any): Promise { return await this.factory.gssApi.post(`${host}/web/projects/${projectId}/reminder/widget/saveByFlag`, params); } }