diff --git a/src/api/DecisionInfo.ts b/src/api/DecisionInfo.ts index e6df3e4..223da7d 100644 --- a/src/api/DecisionInfo.ts +++ b/src/api/DecisionInfo.ts @@ -3,7 +3,7 @@ import { PageDto, PageQueryDto } from './ApiCommon'; const DraftUriBase = '/api/alertTip'; -export interface createParams { +interface AlarmInfoCreateParams { alertType: string; timeType: string; areaConfigId: number; @@ -11,7 +11,7 @@ export interface createParams { submissionInfo: string; } -interface Item { +export interface AlarmInfoListItem { id: number; alertType: string; timeType: string; @@ -33,7 +33,7 @@ export class PagingQueryParams extends PageQueryDto { */ export async function alarmInfoPageQuery( params: PagingQueryParams -): Promise> { +): Promise> { const response = await api.get(`${DraftUriBase}/page`, { params: params, }); @@ -44,7 +44,9 @@ export async function alarmInfoPageQuery( * 根据id获取决策信息 * @param id 草稿id */ -export function queryAlarmInfoById(id: number): Promise> { +export function queryAlarmInfoById( + id: number +): Promise> { return api.get(`${DraftUriBase}/id/${id}`); } @@ -52,7 +54,9 @@ export function queryAlarmInfoById(id: number): Promise> { * 根据报警类型获取决策信息 * @param type 草稿type */ -export function queryAlarmInfoByType(type: string): Promise> { +export function queryAlarmInfoByType( + type: string +): Promise> { return api.get(`${DraftUriBase}/type/${type}`); } @@ -61,7 +65,7 @@ export function queryAlarmInfoByType(type: string): Promise> { * @param params * @returns */ -export function createAlarmInfo(draftData: createParams) { +export function createAlarmInfo(draftData: AlarmInfoCreateParams) { return api.post(`${DraftUriBase}`, draftData); } @@ -78,7 +82,7 @@ export function deleteAlarmInfo(id: number) { * @param data * @returns */ -export function updataAlarmInfo(id: number, data: Item) { +export function updataAlarmInfo(id: number, data: AlarmInfoListItem) { return api.put(`${DraftUriBase}/id`, data); } diff --git a/src/pages/DecisionInfoManage.vue b/src/pages/DecisionInfoManage.vue index 809b893..a7c1bab 100644 --- a/src/pages/DecisionInfoManage.vue +++ b/src/pages/DecisionInfoManage.vue @@ -122,12 +122,13 @@