diff --git a/public/config/config.json b/public/config/config.json index 22f4711..1053b40 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11643", + "baseUrl": "http://10.30.7.26:20705", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://10.30.7.26:20705/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", diff --git a/public/config/config.json b/public/config/config.json index 22f4711..1053b40 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11643", + "baseUrl": "http://10.30.7.26:20705", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://10.30.7.26:20705/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts index cc36a2f..d1a2ed1 100644 --- a/src/api/home/alarm/current.ts +++ b/src/api/home/alarm/current.ts @@ -67,6 +67,16 @@ }, }) } +// 手动消警 +export function batchHandDelete(codes: any) { + return request({ + url: '/system/alarmRecords/cancelAlarmByLedgerNumber', + method: 'post', + data: { + codes, + }, + }) +} export function exportCurrentAlarm(data: any) { return request({ url: '/system/alarmRecords/batchExport', diff --git a/public/config/config.json b/public/config/config.json index 22f4711..1053b40 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11643", + "baseUrl": "http://10.30.7.26:20705", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://10.30.7.26:20705/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts index cc36a2f..d1a2ed1 100644 --- a/src/api/home/alarm/current.ts +++ b/src/api/home/alarm/current.ts @@ -67,6 +67,16 @@ }, }) } +// 手动消警 +export function batchHandDelete(codes: any) { + return request({ + url: '/system/alarmRecords/cancelAlarmByLedgerNumber', + method: 'post', + data: { + codes, + }, + }) +} export function exportCurrentAlarm(data: any) { return request({ url: '/system/alarmRecords/batchExport', diff --git a/src/components.d.ts b/src/components.d.ts index b6e680f..003b04b 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -75,21 +74,6 @@ SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] Trend: typeof import('./components/Trend/index.vue')['default'] - VanBackTop: typeof import('vant/es')['BackTop'] - VanCell: typeof import('vant/es')['Cell'] - VanCellGroup: typeof import('vant/es')['CellGroup'] - VanDatePicker: typeof import('vant/es')['DatePicker'] - VanDialog: typeof import('vant/es')['Dialog'] - VanEmpty: typeof import('vant/es')['Empty'] - VanField: typeof import('vant/es')['Field'] - VanForm: typeof import('vant/es')['Form'] - VanIcon: typeof import('vant/es')['Icon'] - VanPicker: typeof import('vant/es')['Picker'] - VanPickerGroup: typeof import('vant/es')['PickerGroup'] - VanPopup: typeof import('vant/es')['Popup'] - VanRadio: typeof import('vant/es')['Radio'] - VanRadioGroup: typeof import('vant/es')['RadioGroup'] - VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/public/config/config.json b/public/config/config.json index 22f4711..1053b40 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11643", + "baseUrl": "http://10.30.7.26:20705", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://10.30.7.26:20705/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts index cc36a2f..d1a2ed1 100644 --- a/src/api/home/alarm/current.ts +++ b/src/api/home/alarm/current.ts @@ -67,6 +67,16 @@ }, }) } +// 手动消警 +export function batchHandDelete(codes: any) { + return request({ + url: '/system/alarmRecords/cancelAlarmByLedgerNumber', + method: 'post', + data: { + codes, + }, + }) +} export function exportCurrentAlarm(data: any) { return request({ url: '/system/alarmRecords/batchExport', diff --git a/src/components.d.ts b/src/components.d.ts index b6e680f..003b04b 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -75,21 +74,6 @@ SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] Trend: typeof import('./components/Trend/index.vue')['default'] - VanBackTop: typeof import('vant/es')['BackTop'] - VanCell: typeof import('vant/es')['Cell'] - VanCellGroup: typeof import('vant/es')['CellGroup'] - VanDatePicker: typeof import('vant/es')['DatePicker'] - VanDialog: typeof import('vant/es')['Dialog'] - VanEmpty: typeof import('vant/es')['Empty'] - VanField: typeof import('vant/es')['Field'] - VanForm: typeof import('vant/es')['Form'] - VanIcon: typeof import('vant/es')['Icon'] - VanPicker: typeof import('vant/es')['Picker'] - VanPickerGroup: typeof import('vant/es')['PickerGroup'] - VanPopup: typeof import('vant/es')['Popup'] - VanRadio: typeof import('vant/es')['Radio'] - VanRadioGroup: typeof import('vant/es')['RadioGroup'] - VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index f0cadbc..c649738 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -186,6 +186,20 @@ } } }) + // 处理挂起结束 + const pending = alarmDynamics.value.find((item: any) => item.process_name === '挂起' && item.confirmValue) + if(pending) { + const pendingIndex = alarmDynamics.value.findIndex((item: any) => item.process_name === '挂起' && item.confirmValue) + // 上一个状态 + const lastStatus = alarmDynamics.value[pendingIndex - 1] + alarmDynamics.value.splice(pendingIndex+ 1, 1, { + process_name: `挂起时间到,状态改为${lastStatus?.process_name || ' '}`, + approvalTime: pending.confirmValue, + approvalPerson: '', + dept_name: '', + name: '' + }) + } loadingDynamics.value = false }).catch(() => { loadingDynamics.value = false diff --git a/public/config/config.json b/public/config/config.json index 22f4711..1053b40 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11643", + "baseUrl": "http://10.30.7.26:20705", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://10.30.7.26:20705/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts index cc36a2f..d1a2ed1 100644 --- a/src/api/home/alarm/current.ts +++ b/src/api/home/alarm/current.ts @@ -67,6 +67,16 @@ }, }) } +// 手动消警 +export function batchHandDelete(codes: any) { + return request({ + url: '/system/alarmRecords/cancelAlarmByLedgerNumber', + method: 'post', + data: { + codes, + }, + }) +} export function exportCurrentAlarm(data: any) { return request({ url: '/system/alarmRecords/batchExport', diff --git a/src/components.d.ts b/src/components.d.ts index b6e680f..003b04b 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -75,21 +74,6 @@ SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] Trend: typeof import('./components/Trend/index.vue')['default'] - VanBackTop: typeof import('vant/es')['BackTop'] - VanCell: typeof import('vant/es')['Cell'] - VanCellGroup: typeof import('vant/es')['CellGroup'] - VanDatePicker: typeof import('vant/es')['DatePicker'] - VanDialog: typeof import('vant/es')['Dialog'] - VanEmpty: typeof import('vant/es')['Empty'] - VanField: typeof import('vant/es')['Field'] - VanForm: typeof import('vant/es')['Form'] - VanIcon: typeof import('vant/es')['Icon'] - VanPicker: typeof import('vant/es')['Picker'] - VanPickerGroup: typeof import('vant/es')['PickerGroup'] - VanPopup: typeof import('vant/es')['Popup'] - VanRadio: typeof import('vant/es')['Radio'] - VanRadioGroup: typeof import('vant/es')['RadioGroup'] - VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index f0cadbc..c649738 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -186,6 +186,20 @@ } } }) + // 处理挂起结束 + const pending = alarmDynamics.value.find((item: any) => item.process_name === '挂起' && item.confirmValue) + if(pending) { + const pendingIndex = alarmDynamics.value.findIndex((item: any) => item.process_name === '挂起' && item.confirmValue) + // 上一个状态 + const lastStatus = alarmDynamics.value[pendingIndex - 1] + alarmDynamics.value.splice(pendingIndex+ 1, 1, { + process_name: `挂起时间到,状态改为${lastStatus?.process_name || ' '}`, + approvalTime: pending.confirmValue, + approvalPerson: '', + dept_name: '', + name: '' + }) + } loadingDynamics.value = false }).catch(() => { loadingDynamics.value = false diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index 69fae06..fab569f 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -8,7 +8,7 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import { ArrowLeftBold, ArrowRightBold } from '@element-plus/icons-vue' import MapCom from './components/map.vue' -import { batchDelete, detailAlarm, exportCurrentAlarm, getCurrentAlarmListPage, viewAlarm } from '@/api/home/alarm/current' +import { batchDelete, batchHandDelete, detailAlarm, exportCurrentAlarm, getCurrentAlarmListPage, viewAlarm } from '@/api/home/alarm/current' import { getStationListPage } from '@/api/home/station/station' import { getDictByCode } from '@/api/system/dict' import { getAlarmLevelListPage, getAlarmTypeListPage } from '@/api/home/rule/alarm' @@ -547,6 +547,31 @@ }) }) } +// 手动消警 +const handAlarm = () => { + if (!multipleTable.value.length) { + ElMessage.warning('请先选中数据') + return + } + ElMessageBox.confirm( + '确定要消除选中的数据吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }, + ).then(res => { + batchHandDelete(multipleTable.value.map((item: any) => item.ledgerNumber)).then(res => { + ElMessage.success('操作成功') + // 清空多选 + multipleTable.value = [] + tableRef.value.clearMulti() + fetchData() + }) + }) +} +// batchHandDelete // 跳转设备详情 const toDeviceDetail = (row: any) => { if (!row.devcode || !row.devTypeName) { @@ -779,6 +804,9 @@