| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- import request from '@/utils/request'
- // ============ 应急事件统一档案(全生命周期闭环) ============
- // 接报登记(0 待核实) -> 初判核实(1 已核实 / 4 不实事件) -> 开始处置(2 处置中) -> 事件解除(3 已解除)
- // 转接 / 报送 / 处置跟踪 / 工作催办只写操作日志,不改变事件状态
- export function getEventPage(pageNum, pageSize, params) {
- return request({ url: '/api/dispatch/event/findByPage', method: 'get', params: { pageNum, pageSize, ...params } })
- }
- export function getEventDetail(id) {
- return request({ url: '/api/dispatch/event/getDetail/' + id, method: 'get' })
- }
- export function getEventStats(params) {
- return request({ url: '/api/dispatch/event/stats', method: 'get', params })
- }
- // 事件状态下拉项(后端返回 EventStatusEnum 的 编码 + 中文)
- export function getEventStatusOptions() {
- return request({ url: '/api/dispatch/event/statusOptions', method: 'get' })
- }
- // 接报登记
- export function saveEventReport(data) {
- return request({ url: '/api/dispatch/event/saveReport', method: 'post', data })
- }
- export function updateEventInfo(data) {
- return request({ url: '/api/dispatch/event/updateById', method: 'put', data })
- }
- export function deleteEventInfo(id) {
- return request({ url: '/api/dispatch/event/deleteById', method: 'delete', params: { id } })
- }
- // 初判核实:verifyResult 0-真实 1-不实
- export function verifyEventInfo(id, data) {
- return request({ url: '/api/dispatch/event/verify/' + id, method: 'put', data })
- }
- // 责任处置人下拉项(系统用户:昵称 + 联系电话 + 所属部门),选中后自动带出联系电话
- export function getUserOptions() {
- return request({ url: '/api/dispatch/event/userOptions', method: 'get' })
- }
- // 责任单位候选(系统部门,前端据 parentId 建树)
- export function getDeptOptions() {
- return request({ url: '/api/dispatch/event/deptOptions', method: 'get' })
- }
- // 调度首页看板(统计卡 + GIS 点位 + 处置中事件 + 类型/等级分布)
- export function getHomeBoard() {
- return request({ url: '/api/dispatch/event/home', method: 'get' })
- }
- // 我的催办消息(未读在前)+ 未读数
- export function getMyNotifies(limit = 20) {
- return request({ url: '/api/dispatch/notify/my', method: 'get', params: { limit } })
- }
- // 标记单条催办消息已读
- export function markNotifyRead(id) {
- return request({ url: '/api/dispatch/notify/read/' + id, method: 'post' })
- }
- // 全部标记已读
- export function markAllNotifiesRead() {
- return request({ url: '/api/dispatch/notify/readAll', method: 'post' })
- }
- // 转接 / 报送(不改状态)
- export function transferEvent(data) {
- return request({ url: '/api/dispatch/event/transfer', method: 'post', data })
- }
- export function reportEvent(data) {
- return request({ url: '/api/dispatch/event/report', method: 'post', data })
- }
- // 处置:开始处置 / 跟踪 / 解除
- export function startDisposeEvent(data) {
- return request({ url: '/api/dispatch/event/startDispose', method: 'post', data })
- }
- export function trackEvent(data) {
- return request({ url: '/api/dispatch/event/track', method: 'post', data })
- }
- export function releaseEventInfo(id, data) {
- return request({ url: '/api/dispatch/event/release/' + id, method: 'post', data })
- }
- // 工作催办(不改状态)
- export function getEventUrgePage(pageNum, pageSize, params) {
- return request({ url: '/api/dispatch/event/urge/findByPage', method: 'get', params: { pageNum, pageSize, ...params } })
- }
- export function urgeEvent(data) {
- return request({ url: '/api/dispatch/event/urge', method: 'post', data })
- }
- // 事件操作日志(时间线);operType 可选:8 为工作催办记录
- export function getEventLogs(eventId, operType) {
- return request({ url: '/api/dispatch/event/logs/' + eventId, method: 'get', params: { operType } })
- }
- // ============ 应急事件分级标准 ============
- export function getEventGradePage(pageNum, pageSize, params) {
- return request({ url: '/api/dispatch/grade/findByPage', method: 'get', params: { pageNum, pageSize, ...params } })
- }
- export function getEventGradeStatusOptions() {
- return request({ url: '/api/dispatch/grade/statusOptions', method: 'get' })
- }
- export function addEventGrade(data) {
- return request({ url: '/api/dispatch/grade/save', method: 'post', data })
- }
- export function updateEventGrade(data) {
- return request({ url: '/api/dispatch/grade/updateById', method: 'put', data })
- }
- export function deleteEventGrade(id) {
- return request({ url: '/api/dispatch/grade/deleteById', method: 'delete', params: { id } })
- }
- // ============ 应急预案(编辑 + 审批共用一套数据) ============
- // 0 草稿 -> 1 待审核 -> 2 已通过 / 3 已驳回;已通过的预案再保存视为「修订」,生成审核中的候选版本
- export function getEventPlanPage(pageNum, pageSize, params) {
- return request({ url: '/api/dispatch/plan/findByPage', method: 'get', params: { pageNum, pageSize, ...params } })
- }
- export function getEventPlanById(id) {
- return request({ url: '/api/dispatch/plan/getDetail/' + id, method: 'get' })
- }
- export function getPlanStatusOptions() {
- return request({ url: '/api/dispatch/plan/statusOptions', method: 'get' })
- }
- export function getPlanTemplates(pageNum = 1, pageSize = 50, params = {}) {
- return request({ url: '/api/dispatch/plan/templates', method: 'get', params: { pageNum, pageSize, ...params } })
- }
- // 新增草稿 / 修改预案 / 修订已通过预案
- export function saveEventPlan(data) {
- return request({ url: '/api/dispatch/plan/save', method: 'post', data })
- }
- export function deleteEventPlan(id) {
- return request({ url: '/api/dispatch/plan/deleteById', method: 'delete', params: { id } })
- }
- export function submitEventPlan(id) {
- return request({ url: '/api/dispatch/plan/submit/' + id, method: 'post' })
- }
- export function approvePlan(id, data) {
- return request({ url: '/api/dispatch/plan/approve/' + id, method: 'post', data })
- }
- export function rejectPlan(id, data) {
- return request({ url: '/api/dispatch/plan/reject/' + id, method: 'post', data })
- }
- export function getPlanVersions(planId) {
- return request({ url: '/api/dispatch/plan/versions/' + planId, method: 'get' })
- }
- export function getPlanVersion(versionId) {
- return request({ url: '/api/dispatch/plan/version/' + versionId, method: 'get' })
- }
- export function getPlanLogs(planId) {
- return request({ url: '/api/dispatch/plan/logs/' + planId, method: 'get' })
- }
- // ============ 数字预案库匹配(应急预案选择) ============
- export function getPlanLibraryList() {
- return request({ url: '/api/dispatch/plan-library/list', method: 'get' })
- }
- export function matchPlan(data) {
- return request({ url: '/api/dispatch/plan-library/match', method: 'post', data })
- }
- export function matchPlanByTopic(data) {
- return request({ url: '/api/dispatch/plan-library/matchByTopic', method: 'post', data })
- }
- export function getPlanMatchHistory(limit = 10) {
- return request({ url: '/api/dispatch/plan-library/history', method: 'get', params: { limit } })
- }
- export function applyPlan(data) {
- return request({ url: '/api/dispatch/plan-library/apply', method: 'post', data })
- }
- // ============ 应急事件事后评估(总结评估) ============
- // 事件(已解除) -> 四维评分 -> 生成报告/录入案例库
- export function getEventAssess(eventId) {
- return request({ url: '/api/dispatch/assess/findByEventId', method: 'get', params: { eventId } })
- }
- export function listEventAssess(eventIds) {
- return request({ url: '/api/dispatch/assess/listByEventIds', method: 'get', params: { eventIds: eventIds.join(',') } })
- }
- export function saveEventAssess(data) {
- return request({ url: '/api/dispatch/assess/save', method: 'post', data })
- }
- export function deleteEventAssess(eventId) {
- return request({ url: '/api/dispatch/assess/delete', method: 'delete', params: { eventId } })
- }
|