/* * @Author: wf * @Date: 2021-08-18 09:22:19 * @LastEditors: wf * @LastEditTime: 2021-08-18 17:22:40 * @Description: 告警记录数据配置 */ /* 系统告警查询参数和待处理、已处理查询|导出API */ // communityId: '', // 小区ID // handleUserName: '', // 处理人 // handleResultName: '', // 处理结果 // location: '', // 位置 // alarmCategory: '', // 告警分类 1:业务告警 2:设备故障 export const sysQuery = { params: { alarmCategory: '1', alarmName: '', productId: '', sceneType: '3' }, undone: {// 未处理告警列表查询字段 // getpageUrl: '/zoniot-rmcp-web/Abnormal/getAllAbnormal', exportUrl: '/zoniot-rmcp-web/Abnormal/getAllAbnormalExcel' }, done: {// 已处理告警列表查询字段 // getpageUrl: '/zoniot-rmcp-web/Abnormal/getAllHandleAbnormal', exportUrl: '/zoniot-rmcp-web/Abnormal/getAllHandleAbnormalExcel' } } /** * @description: 系统告警搜索条件配置 * @param : conditions 条件汇总 | alias 场景别名区分常显和更多过滤条件 * @return: */ export const sysSearchConfig = { conditions: [ { label: '', prop: 'alarmCategory', slot: 'alarmCategory', }, { label: '', prop: 'alarmName', slot: 'alarmName', placeholder: '告警名称', }, { label: '', prop: 'productId', slot: 'productId', placeholder: '请选择设备类型', } ], water: { normal: ['alarmCategory', 'alarmName', 'productId'], more: [], }, other: { normal: ['alarmCategory', 'alarmName', 'productId'], more: [], } } export const alarmMeasuringDatasFormat = (val) => { let str = ''; _.each(val, (item) => { str += `${item.measuringName}:${item.showData || '--'}${item.measuringUnit || ''};` }) return str; } /* 告警列表配置,按照场景别名区分 */ export const sysColumnConfig = { cols: [ { label: '所属小区', prop: 'communityName' }, { label: '设备类型', prop: 'productName' }, { label: '设备', prop: 'deviceName', }, { label: '告警名称', prop: 'alarmName', }, { label: '告警描述', prop: 'desc', }, { label: '规则', prop: 'alarmRuleNum', }, { label: '状态', prop: 'enabled', slot: 'enabled', }, { label: '操作', prop: 'opt', slot: 'opt', } ], done: ['productName', 'communityName','deviceName', 'alarmName', 'desc', 'alarmRuleNum', 'enabled', 'opt'], undone: ['productName', 'communityName','deviceName', 'alarmName', 'desc', 'alarmRuleNum', 'enabled', 'opt'], loraMeter: ['alarmTypeName', 'lastAlarmTime', 'deviceNo', 'meterNo', 'deviceModel', 'companyName', 'deptName', 'address', 'handleTime', 'opt'], nbiotMeter: ['alarmTypeName', 'lastAlarmTime', 'deviceNo', 'meterNo', 'deviceModel', 'companyName', 'deptName', 'address', 'handleTime', 'opt'], other: ['sceneName', 'deviceType', 'deviceName', 'alarmContent', 'attributeName', 'opState', 'state', 'opt'], } /* 用户告警=预警类型 */ const warningTypes = [ { id: '', label: '全部' }, { id: '1', label: '较上日用水量激增30%' }, { id: '2', label: '连续无用水量数据7天' } ] export const warningTypesStr = (status) => { return warningTypes[status].label } /* 用户告警=反馈状态 */ const feedbackStatus = [ { id: '', label: '全部' }, { id: '0', label: '待反馈' }, { id: '1', label: '已确认无异常' }, { id: '2', label: '已反馈信息' } ] export const feedbackStatusStr = (status) => { return feedbackStatus[status + 1].label }