From 9901c2334f81c2761b6cd0edbc0ca9cc37e72650 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 23 Aug 2023 16:54:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E5=8E=BBany?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/DecisionInfo.ts | 18 +++++++++++------- src/pages/DecisionInfoManage.vue | 13 +++++++------ 2 files changed, 18 insertions(+), 13 deletions(-) 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 @@