diff --git a/src/api/DecisionInfo.ts b/src/api/DecisionInfo.ts new file mode 100644 index 0000000..32659f3 --- /dev/null +++ b/src/api/DecisionInfo.ts @@ -0,0 +1,65 @@ +import { api } from 'src/boot/axios'; +import { PageDto, PageQueryDto } from './ApiCommon'; + +const DraftUriBase = '/api/alertTip'; + +export interface createParams { + alertType: string; + timeType: string; + locationType: string; + infoJson: string; +} + +interface Item { + id: number; + alertType: string; + timeType: string; + locationType: string; + infoJson: string; +} + +export class PagingQueryParams extends PageQueryDto { + alertType?: string; + timeType?: string; + locationType?: string; +} + +/** + * 分页查询决策信息 + * @param params + * @returns + */ +export async function alarmInfoPageQuery( + params: PagingQueryParams +): Promise> { + const response = await api.get(`${DraftUriBase}/page`, { + params: params, + }); + return response.data; +} + +/** + * 创建决策信息 + * @param params + * @returns + */ +export function createAlarmInfo(draftData: createParams) { + return api.post(`${DraftUriBase}`, draftData); +} + +/** + * 删除决策信息 + * @param id 草稿id + */ +export function deleteAlarmInfo(id: number) { + return api.delete(`${DraftUriBase}/id/${id}`); +} + +/** + * 更新决策信息 + * @param data + * @returns + */ +export function updataAlarmInfo(id: number, data: Item) { + return api.put(`${DraftUriBase}/id`, data); +} diff --git a/src/components/SysMenu.vue b/src/components/SysMenu.vue index cd3d17e..728a3af 100644 --- a/src/components/SysMenu.vue +++ b/src/components/SysMenu.vue @@ -74,6 +74,11 @@ const list = reactive([ label: '线路信息管理', icon: 'app_registration', }, + { + path: '/dataManage/decisionInfo', + label: '决策信息管理', + icon: 'app_registration', + }, ], }, { diff --git a/src/pages/DecisionInfoManage.vue b/src/pages/DecisionInfoManage.vue new file mode 100644 index 0000000..54c017c --- /dev/null +++ b/src/pages/DecisionInfoManage.vue @@ -0,0 +1,299 @@ + + + diff --git a/src/router/routes.ts b/src/router/routes.ts index b553b77..c0fabba 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -40,6 +40,11 @@ const routes: RouteRecordRaw[] = [ name: 'lineInfo', component: () => import('pages/LineInfoManage.vue'), }, + { + path: 'decisionInfo', + name: 'decisionInfo', + component: () => import('pages/DecisionInfoManage.vue'), + }, ], }, {