diff --git a/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts b/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts index 0ea6ebc..88a661d 100644 --- a/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts +++ b/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts @@ -2,8 +2,8 @@ export enum energyAlarms { getTableList = '/carbon-smart/api/AlarmEnergyConsumption/selectAlarmEnergyConsumption', //能耗告警分页 addOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumption/creatOrUpdate', //能耗告警添加 修改 del = '/carbon-smart/api/AlarmEnergyConsumption/delete', //能耗删除 - configGetTableList = '/carbon-smart/api/AlarmEquipmentRule/selectAlarmEquipmentRule', //配置设备告警分页 - configAddOrUpNewData = '/carbon-smart/api/AlarmEquipmentRule/creatOrUpdate', //配置设备告警添加 修改 - configFindById = '/carbon-smart/api/AlarmEquipmentRule/findById', //配置设备告警 查询详情 - configDel = '/carbon-smart/api/AlarmEquipmentRule/delete', //配置设备告警删除 + configGetTableList = '/carbon-smart/api/AlarmEnergyConsumptionRule/selectAlarmEnergyConsumptionRule', //配置设备告警分页 + configAddOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumptionRule/creatOrUpdate', //配置设备告警添加 修改 + configFindById = '/carbon-smart/api/AlarmEnergyConsumptionRule/findById', //配置设备告警 查询详情 + configDel = '/carbon-smart/api/AlarmEnergyConsumptionRule/delete', //配置设备告警删除 } diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts index 8f30f9a..aaad9c2 100644 --- a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts +++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts @@ -8,6 +8,12 @@ export enum carbonEmissionFactorLibrary { getCarbonFactorTree = '/carbon-smart/api/carbon/emission/type/getCarbonFactorTree', creat = '/carbon-smart/api/carbon/emission/type/creatOrUpdate', delTreeNode = '/carbon-smart/api/carbon/emission/type/del', + // 单位管理 + dictionaryUnitManagement = '/carbon-smart/api/carbon/emission/factor/dictionaryUnitManagement', + findOutermost = '/carbon-smart/api/carbon/emission/factor/findOutermost', + createDictionary = '/carbon-smart/api/carbon/emission/factor/createDictionary', + updateDictionary = '/carbon-smart/api/carbon/emission/factor/updateDictionary', + delDictionary = '/carbon-smart/api/carbon/emission/factor/delDictionary', } // 碳排管理-碳排统计接口 export enum energyConsumption { @@ -17,4 +23,12 @@ export enum energyConsumption { creat = '/carbon-smart/api/carbon/stats/creat', update = '/carbon-smart/api/carbon/stats/update', del = '/carbon-smart/api/carbon/stats/del', +} +// 碳排管理-碳排速算接口 +export enum quickCalculation { + carbonQuickTree = '/carbon-smart/api/carbon/energy/correlation/carbonQuickTree', + queryCarbonEmissionPage = '/carbon-smart/api/carbon/energy/correlation/queryCarbonEmissionPage', + creat = '/carbon-smart/api/carbon/energy/correlation/creat', + update = '/carbon-smart/api/carbon/energy/correlation/update', + del = '/carbon-smart/api/carbon/energy/correlation/del', } \ No newline at end of file diff --git a/hx-ai-intelligent/src/api/deviceManage.ts b/hx-ai-intelligent/src/api/deviceManage.ts index 7ae63d2..29cfc9e 100644 --- a/hx-ai-intelligent/src/api/deviceManage.ts +++ b/hx-ai-intelligent/src/api/deviceManage.ts @@ -15,4 +15,17 @@ export enum group { queryGroupPage = `${BASE_URL}/deviceGroup/queryGroupPage`, // 分组列表 saveGroupList = `${BASE_URL}/deviceGroup/saveGroupList`, // 分组保存 delGroupList = `${BASE_URL}/deviceGroup/delGroupList`, // 分组删除 + queryGroupInfoPage = `${BASE_URL}/deviceGroup/queryGroupInfoPage`, // 计算列表 + queryEditCompute = `${BASE_URL}/deviceGroup/queryEditCompute`, // 计算树 + saveComputeList = `${BASE_URL}/deviceGroup/saveComputeList`, // 计算保存 + delComputeList = `${BASE_URL}/deviceGroup/delComputeList`, // 计算删除 + queryComputeGroup = `${BASE_URL}/deviceGroup/queryComputeGroup`, // 计算分组列表 + saveComputeGroup = `${BASE_URL}/deviceGroup/saveComputeGroup`, // 计算分组新增 + saveComputeGroupInfo = `${BASE_URL}/deviceGroup/saveComputeGroupInfo`, // 批量分组 + delComputeGroup = `${BASE_URL}/deviceGroup/delComputeGroup`, // 分组删除 + computeGroupNum = `${BASE_URL}/deviceGroup/computeGroupNum`, // 分组删除 + formula = `${BASE_URL}/deviceGroup/formula`, // 编辑公式 + queryFormula = `${BASE_URL}/deviceGroup/queryFormula`, // 公式查询 + dropGroupFilter = `${BASE_URL}/deviceGroup/dropGroupFilter`, // 分组列表查询 + dropGroupInfoFilter = `${BASE_URL}/deviceGroup/dropGroupInfoFilter`, // 计算列表查询 } diff --git a/hx-ai-intelligent/src/config/app.config.ts b/hx-ai-intelligent/src/config/app.config.ts index 8864550..77fbef6 100644 --- a/hx-ai-intelligent/src/config/app.config.ts +++ b/hx-ai-intelligent/src/config/app.config.ts @@ -27,6 +27,7 @@ export const appConfig = { themeConfig: { bgImageUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/login/background.png`, logoLessUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/headerIcon.png`, + logoUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/headerIcon.png`, }, // userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => { // console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig'); @@ -102,7 +103,7 @@ export const appConfig = { updatePassWordInfo: { title: '修改密码', subtitle: 'huaxing平台', - api: '/api/web/objs/User/changePassword', + api: '/carbon-smart/api/user/update/password', }, // headerBellInfo: { // isShow: true, diff --git a/hx-ai-intelligent/src/icon/common.svg b/hx-ai-intelligent/src/icon/common.svg new file mode 100644 index 0000000..6e5cb9e --- /dev/null +++ b/hx-ai-intelligent/src/icon/common.svg @@ -0,0 +1,4 @@ + + + + diff --git a/hx-ai-intelligent/src/router/alarmManagement.ts b/hx-ai-intelligent/src/router/alarmManagement.ts index 6b8a490..dd930f3 100644 --- a/hx-ai-intelligent/src/router/alarmManagement.ts +++ b/hx-ai-intelligent/src/router/alarmManagement.ts @@ -26,6 +26,26 @@ const alarmManagement = { ], }, { + path: 'equipmentAlarm ', + name: 'EquipmentAlarm', + meta: { title: '设备告警', hideChildren: true, icon: 'gaojingguanli' }, + component: Base, + redirect: { name: 'equipmentAlarmIndex' }, + children: [ + { + path: 'index', + name: 'equipmentAlarmIndex', + // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'), + component: () => import('/@/view/alarmManagement/equipmentAlarm/index.vue'), + meta: { + title: '设备告警', + keepAlive: true, + // backApi: [], + }, + }, + ], + }, + { path: 'alarmSettings', name: 'AlarmSettings', meta: { title: '告警设置', hideChildren: true, icon: 'gaojingguanli' }, diff --git a/hx-ai-intelligent/src/router/monitor.ts b/hx-ai-intelligent/src/router/monitor.ts index 65d21c1..8a21dde 100644 --- a/hx-ai-intelligent/src/router/monitor.ts +++ b/hx-ai-intelligent/src/router/monitor.ts @@ -5,25 +5,25 @@ const equipment = { meta: { title: '监控中心', icon: 'jiankongzhongxin', index: 1 }, redirect: { name: 'EnvironmentMonitor' }, children: [ - // { - // path: 'environmentMonitor', - // name: 'EnvironmentMonitor', - // meta: { title: '环境监测', hideChildren: true, icon: 'huanjingjiance' }, - // component: Base, - // redirect: { name: 'EnvironmentMonitorIndex' }, - // children: [ - // { - // path: 'index', - // name: 'EnvironmentMonitorIndex', - // component: () => import('/@/view/monitor/environmentMonitor/index.vue'), - // meta: { - // title: '环境监测', - // keepAlive: true, - // // backApi: [], - // }, - // }, - // ], - // }, + { + path: 'environmentMonitor', + name: 'EnvironmentMonitor', + meta: { title: '环境监测', hideChildren: true, icon: 'huanjingjiance' }, + component: Base, + redirect: { name: 'EnvironmentMonitorIndex' }, + children: [ + { + path: 'index', + name: 'EnvironmentMonitorIndex', + component: () => import('/@/view/monitor/environmentMonitor/index.vue'), + meta: { + title: '环境监测', + keepAlive: true, + // backApi: [], + }, + }, + ], + }, { path: 'deviceMonitor', name: 'DeviceMonitor', diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index bf0c008..4793714 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -30,7 +30,9 @@ style="flex: 1; height: 100%; background-color: white; border-radius: 4px; padding: 12px">
-
xxxx
+
+
+
@@ -49,8 +51,10 @@ const info = ref({}); let chartInstance: echarts.ECharts | null = null; let chartInstanceOne: echarts.ECharts | null = null; + let chartInstanceTow: echarts.ECharts | null = null; const graphChart = ref(null); const echartPieOne = ref(null); + const echartPieTow = ref(null); const getGraphChart = () => { let dayData = []; let energyAlarm = []; @@ -294,7 +298,7 @@ }, textAlign: 'center', x: '44.3%', - y: '46%', + y: '43%', }, ], tooltip: { @@ -327,9 +331,10 @@ clockwise: false, //饼图的扇区是否是顺时针排布 avoidLabelOverlap: false, label: { + show: true, normal: { show: true, - position: 'outter', + position: 'outside', textStyle: { fontSize: 14, fontWeight: 'bold', @@ -342,7 +347,7 @@ labelLine: { show: true, // 控制标签线是否显示 length: 10, // 标签线长度 - length2: 20, // 标签线引出部分长度 + length2: 0, // 标签线引出部分长度 // 其他样式属性,如 lineStyle 等 }, data: m2R2Data, @@ -352,11 +357,107 @@ chartInstanceOne = echarts.init(echartPieOne.value); chartInstanceOne.setOption(option); }; + const getEchartPieTow = () => { + if (chartInstanceTow) { + chartInstanceTow.dispose(); + } + chartInstanceTow = echarts.init(echartPieTow.value); + var m2R2Data = [ + { value: 335, name: '紧急', itemStyle: { color: '#F56E53' } }, + { value: 310, name: '重要', itemStyle: { color: '#F7C122' } }, + { value: 234, name: '一般', itemStyle: { color: '#3BC27F' } }, + ]; + const option = { + title: [ + { + text: '优先级 / 近30天', + textStyle: { + fontSize: 16, + fontWeight: 'normal', + color: '#aaaaaa', + }, + left: '2%', + top: '2%', + }, + { + text: '优先级', + subtext: 12312 + '个', + textStyle: { + fontSize: 24, + color: 'black', + }, + subtextStyle: { + fontSize: 24, + fontWeight: '700', + color: 'black', + }, + textAlign: 'center', + x: '44.3%', + y: '43%', + }, + ], + tooltip: { + trigger: 'item', + formatter: function (parms) { + var str = parms.marker + ' :' + parms.data.value; + return str; + }, + }, + legend: { + // 设置图例靠右,上下居中,垂直排列 + right: 50, + top: 'center', + orient: 'vertical', + // 图例图标设置为圆形 + icon: 'circle', + itemWidth: 12, + itemHeight: 12, + itemGap: 16, + textStyle: { + fontSize: 14, + }, + }, + series: [ + { + name: '优先级', + type: 'pie', + center: ['45%', '50%'], + radius: ['50%', '70%'], + clockwise: false, //饼图的扇区是否是顺时针排布 + avoidLabelOverlap: false, + label: { + show: true, + normal: { + show: true, + position: 'outside', + textStyle: { + fontSize: 14, + fontWeight: 'bold', + }, + formatter: function (parms) { + return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + }, + }, + }, + labelLine: { + show: true, // 控制标签线是否显示 + length: 10, // 标签线长度 + length2: 0, // 标签线引出部分长度 + // 其他样式属性,如 lineStyle 等 + }, + data: m2R2Data, + }, + ], + }; + chartInstanceTow = echarts.init(echartPieTow.value); + chartInstanceTow.setOption(option); + }; onMounted(() => { //渲染第三个图表 getGraphChart(); //优先级 getEchartPieOne(); + getEchartPieTow(); }); diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/config.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/config.ts new file mode 100644 index 0000000..2202a5e --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/config.ts @@ -0,0 +1,22 @@ +import { department } from '/@/api/origanizemanage'; + +export const editTreeConfig = (orgId) => ({ + selectedKeys: ['0-0'], + defaultExpandAll: true, + api: department.queryDeptTree, + params: { orgId }, + resultField: 'data.orgInfos', + fieldNames: { title: 'orgName', key: 'orgId' }, + formConfig: { + schemas: [ + { + field: 'orgName', + component: 'NsInput', + autoSubmit: true, + componentProps: { + placeholder: '请输入企业名称', + }, + }, + ], + }, +}); diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue new file mode 100644 index 0000000..a496735 --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue @@ -0,0 +1,341 @@ + + + + diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts index 77bec08..d5caddf 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts @@ -12,7 +12,7 @@ const tableKeyMap = [ }, { title: '优先级', - dataIndex: 'priority', + dataIndex: 'prioritys', }, { title: '告警标题', @@ -24,12 +24,11 @@ const tableKeyMap = [ }, { title: '重复次数', - dataIndex: 'repetitions', - textEllipsis: true, + dataIndex: 'rep', }, { title: '监测时长', - dataIndex: 'monitorFrequency', + dataIndex: 'monitorFrequencys', }, { title: '是否启用', @@ -99,6 +98,9 @@ export const energyAlarmConfigs = ( name: 'FeedBackDetail', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { + data.monitorFrequency = data.monitorFrequency.value; + data.priority = data.priority.value; + data.repetitions = data.repetitions.value; editeEnergyAlarm.value.toggle(data); }, }, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts index 5bcee5e..16cc06a 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts @@ -14,7 +14,7 @@ const tableKeyMap = [ }, { title: '优先级', - dataIndex: 'priority', + dataIndex: 'prioritys', }, { title: '告警标题', @@ -26,8 +26,7 @@ const tableKeyMap = [ }, { title: '重复次数', - dataIndex: 'repetitions', - textEllipsis: true, + dataIndex: 'repetition', }, { title: '监测时长', @@ -104,6 +103,9 @@ export const equipmentAlarmTableConfig = ( name: 'FeedBackDetail', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { + data.priority = data.priority.value; + data.repetitions = data.repetitions.value; + data.monitorTimeUnit = data.monitorTimeUnit.value; editEquipmentAlarm.value.toggle(data); }, }, diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/index.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/index.vue new file mode 100644 index 0000000..59d78bf --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/index.vue @@ -0,0 +1,28 @@ + + diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue new file mode 100644 index 0000000..62e9a31 --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue @@ -0,0 +1,283 @@ + + + diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/notificationManagementMock.json b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/notificationManagementMock.json new file mode 100644 index 0000000..6f442ed --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/notificationManagementMock.json @@ -0,0 +1,108 @@ +{ + "listData":[ + { + "id": "d4", + "isDel": "0", + "officesId": "84", + "deviceCode": "37430200143", + "deviceName": "地听测试电表", + "category": "1", + "type": "1001", + "energyCount": "1", + "serialNumber": "69", + "pidCode": null, + "brand": "", + "types": "", + "manufacturer": "elit non in", + "contacts": "ad reprehenderit", + "phonenumber": "34", + "position": "in esse commodo1", + "activeState": "1", + "measurementDirection": "1", + "deviceMagnification": 62, + "deviceAccuracy": "89", + "frequency": "anim consequat irure", + "standardFrequency": "ut elit", + "deviceHead": "pariatur ex velit", + "constructor": "84566", + "voltageType": "cillum aliquip reprehenderit", + "pt": 61, + "ct": 64, + "communicationProtocol": "cupidatat nisi ea ad", + "ip": "", + "port": "", + "com": "", + "slaveAddress": "", + "dlt": "", + "conversionIdentifier": "48", + "multiplicationAdjustment": "1", + "accessMethod": "1", + "replacementFrequency": "0", + "dataDetail": "sit", + "insertTime": null, + "children": null, + "devicePointList": null, + "insertUser": null, + "priority": "1", + "alarmTitle": "电压异常告警", + "errorCode": "A001", + "monitorTime":"1", + "repetitions":"1", + "monitorTimeUnit": "分", + "enableRules": "1", + "isUse":true + } , { + "id": "d5", + "isDel": "0", + "officesId": "84", + "deviceCode": "37430200143", + "deviceName": "地听测试电表", + "category": "1", + "type": "1001", + "energyCount": "1", + "serialNumber": "69", + "pidCode": null, + "brand": "", + "types": "", + "manufacturer": "elit non in", + "contacts": "ad reprehenderit", + "phonenumber": "34", + "position": "in esse commodo2", + "activeState": "1", + "measurementDirection": "1", + "deviceMagnification": 62, + "deviceAccuracy": "89", + "frequency": "anim consequat irure", + "standardFrequency": "ut elit", + "deviceHead": "pariatur ex velit", + "constructor": "84566", + "voltageType": "cillum aliquip reprehenderit", + "pt": 61, + "ct": 64, + "communicationProtocol": "cupidatat nisi ea ad", + "ip": "", + "port": "", + "com": "", + "slaveAddress": "", + "dlt": "", + "conversionIdentifier": "48", + "multiplicationAdjustment": "1", + "accessMethod": "1", + "replacementFrequency": "0", + "dataDetail": "sit", + "insertTime": null, + "children": null, + "devicePointList": null, + "insertUser": null, + "priority": "1", + "alarmTitle": "电压异常告警", + "errorCode": "A001", + "monitorTime":"1", + "repetitions":"1", + "monitorTimeUnit": "分", + "enableRules": "0", + "isUse":true + } + ] + +} \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue new file mode 100644 index 0000000..d6cb122 --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue @@ -0,0 +1,39 @@ + + diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts new file mode 100644 index 0000000..8adc472 --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts @@ -0,0 +1,164 @@ +import { dateUtil } from '/nerv-lib/util/date-util'; +import data from '../notificationManagementMock.json'; +import { http } from '/nerv-lib/util'; +import { ref } from 'vue'; +const tableKeyMap = [ + { + title: '序号', + dataIndex: 'address', + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '告警编号', + dataIndex: 'id', + }, + { + title: '告警描述', + dataIndex: 'deviceCode', + }, + { + title: '优先级', + dataIndex: 'deviceName', + }, + { + title: '状态', + dataIndex: 'position', + }, + { + title: '错误码', + dataIndex: 'position', + textEllipsis: true, + }, + { + title: '设备信息', + dataIndex: 'position', + }, + { + title: '更新时间', + dataIndex: 'enableRules', + }, + { + title: '重复次数', + dataIndex: 'enableRules', + }, +]; +const mockData = ref(data.listData); +export const notificationtableConfig = (look: any, status: any) => { + return { + title: '告警记录', + // api: '/carbon_emission/device/getDeviceList', + value: mockData.value, + headerActions: [{}], + columns: tableKeyMap, + // rowSelection: null, 选择按钮 + columnActions: { + title: '操作', + actions: [ + { + label: '详情', + name: 'FeedBackDetail', + dynamicParams: ['uuid', 'appealType'], + handle: (data: any) => { + console.log(look.value); + look.value.toggle(data); + }, + }, + { + label: '状态', + name: 'FeedBackDetail', + dynamicParams: ['uuid', 'appealType'], + handle: (data: any) => { + status.value.toggle(data); + }, + }, + ], + }, + + formConfig: { + schemas: [ + { + field: 'name', + label: '告警类型', + component: 'NsSelect', + componentProps: { + placeholder: '请选择告警优先级', + options: [ + { + label: '紧急', + value: '1', + }, + { + label: '重要', + value: '2', + }, + { + label: '一般', + value: '3', + }, + ], + }, + }, + { + field: 'provider', + label: '状态', + component: 'NsSelect', + componentProps: { + placeholder: '请选择状态', + options: [ + { + label: '待处理', + value: '1', + }, + { + label: '处理中', + value: '2', + }, + { + label: '已完成', + value: '3', + }, + { + label: '超时', + value: '4', + }, + { + label: '关闭', + value: '5', + }, + ], + }, + }, + { + field: 'provider', + label: '告警标题', + component: 'NsInput', + componentProps: { + placeholder: '请输入告警标题关键字', + }, + }, + { + field: 'provider', + label: '错误码', + component: 'NsInputApi', + componentProps: { + placeholder: '请输入告警错误码', + }, + }, + { + field: 'createTime', + label: '生产日期', + component: 'NsRangePicker', + fieldMap: ['manufactureBeginDate', 'manufactureEndDate'], + componentProps: { + valueFormat: 'YYYY-MM-DD', + placeholder: ['设备生产开始日期', '设备生产结束日期'], + }, + }, + ], + }, + // pagination: { pageSizeOptions: false }, + rowKey: 'id', + }; +}; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue index bbc926e..cf05dbf 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -36,27 +36,31 @@ :expanded-keys="expandedKeys" :auto-expand-parent="autoExpandParent" @expand="onExpand"> - - - - + + +
+ 新增分组 + 新增单位 +
+
+
+ + + {{ item.cnValue }} + + +
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + {{ item.cnValue }} + + + + +
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts index f5bc524..6c8fd15 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts @@ -77,4 +77,66 @@ export const tableColumns = [ key: 'action', width: 130 }, +]; +export const columns = [ + { + title: '序号', + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '因子值', + dataIndex: 'emissionFactors', + }, + { + title: '计量单位', + className: 'carbonEmissionSuffix', + dataIndex: 'carbonEmissionSuffix', + }, + { + title: '更新时间', + className: 'updateTime', + dataIndex: 'updateTime', + }, + { + title: '启用时间', + className: 'startTime ', + dataIndex: 'startTime ', + }, + { + title: '结束时间', + className: 'endTime', + dataIndex: 'endTime', + }, + { + title: '数据来源', + className: 'dataSources', + dataIndex: 'dataSources', + }, + { + title: '操作', + key: 'action', + width: 130 + }, +]; +export const drawerColumns = [ + { + title: '名称', + dataIndex: 'emissionSources', + }, + { + title: '因子值', + dataIndex: 'emissionFactors', + }, + { + title: '排放环节', + className: 'emissionProcess', + dataIndex: 'emissionProcess', + }, + { + title: '数据来源', + className: 'dataSources', + dataIndex: 'dataSources', + }, ]; \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue index 0e88f8d..7026fdb 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue @@ -181,6 +181,7 @@ const queryParams = ref({ pageNum: 1, pageSize: 10, + orgId: orgId.value, }) const isRequired = ref(false); const visible = ref(false); diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue index 2a74ad5..4c6d60c 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue @@ -1,16 +1,14 @@ - - @@ -29,12 +27,13 @@ import { editTreeConfig } from './config'; import { group } from '/@/api/deviceManage'; import { http } from '/nerv-lib/util/http'; + const emit = defineEmits(['sure']); const props = defineProps({ params: Object }); const result = JSON.parse(sessionStorage.getItem('ORGID')!); const config = computed(() => { return editTreeConfig(result); }); - const visible = ref(true); + const visible = ref(false); const dataSource = ref([]); const listStyle = { height: '100%', @@ -42,13 +41,16 @@ }; const targetKeys = ref([]); const currentId = ref(''); + + const clearData = () => { + dataSource.value = []; + targetKeys.value = []; + currentId.value = ''; + }; const toggle = () => { visible.value = !visible.value; - }; - const handleChange = (nextTargetKeys: string[], direction: string, moveKeys: string[]) => { - console.log('targetKeys: ', nextTargetKeys); - console.log('direction: ', direction); - console.log('moveKeys: ', moveKeys); + clearData(); + visible.value && getData(currentId.value); }; const filterOption = (inputValue: string, option: any) => { @@ -57,7 +59,10 @@ const btnClick = () => { // visible.value = false; - + if (!currentId.value) { + NsMessage.warn('请先选择公司'); + return; + } http .post(group.saveGroupList, { ...props.params, @@ -65,7 +70,9 @@ saveGroupIds: targetKeys.value, }) .then(() => { + emit('sure'); NsMessage.success('操作成功'); + toggle(); }); }; function treeSelect( @@ -98,8 +105,8 @@ item['key'] = item.id.toString(); return item; }); - targetKeys.value = res.data.linkGroups.map((item) => { - return item.id; + targetKeys.value = res.data.linkGroups?.map((item) => { + return item.id.toString(); }); }); }; diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/editCal.vue b/hx-ai-intelligent/src/view/equipmentManage/group/editCal.vue new file mode 100644 index 0000000..f60b997 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentManage/group/editCal.vue @@ -0,0 +1,126 @@ + + + diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/editFormula.vue b/hx-ai-intelligent/src/view/equipmentManage/group/editFormula.vue index df02997..8ab2a97 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/group/editFormula.vue +++ b/hx-ai-intelligent/src/view/equipmentManage/group/editFormula.vue @@ -2,34 +2,72 @@ +
+ 分组列表 +
+
+ + + diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue new file mode 100644 index 0000000..48caad7 --- /dev/null +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue @@ -0,0 +1,24 @@ + + + diff --git a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue index f4d24fa..757fdb2 100644 --- a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue @@ -194,7 +194,9 @@ const selectRoleRef = ref(); const formSchema = formConfig(disabled as any); const formSchema2 = formConfig2(roleDisabled as any); - const { orgName, projectId, orgId } = JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)); + const { orgName, projectId, orgId } = JSON.parse( + sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH), + ); // const orgId = JSON.parse(sessionStorage.getItem('ORGID')); const roleTreeData = ref([]); const rolePermissionTreeData = ref([]); @@ -340,7 +342,7 @@ const info = { node: { key: '0-0-0', dataRef: { ...roleTreeData.value[0].children[0] } }, }; - SelectUserTree([''], info); + // SelectUserTree([''], info); }); } }); diff --git a/hx-op/src/config/app.config.ts b/hx-op/src/config/app.config.ts index b5bd1b2..4dff0a0 100644 --- a/hx-op/src/config/app.config.ts +++ b/hx-op/src/config/app.config.ts @@ -89,8 +89,8 @@ export const appConfig = { // 修改密码配置 updatePassWordInfo: { title: '修改密码', - subtitle: 'huaxing平台', - api: '/api/web/objs/User/changePassword', + subtitle: 'huaxing管理平台', + api: '/carbon-smart/api/user/update/password', }, // headerBellInfo: { // isShow: true, diff --git a/lib/component/form/form/form-item.vue b/lib/component/form/form/form-item.vue index 216010f..e992469 100644 --- a/lib/component/form/form/form-item.vue +++ b/lib/component/form/form/form-item.vue @@ -13,7 +13,7 @@ @@ -47,6 +47,7 @@ mapKeys, upperFirst, get, + cloneDeep, } from 'lodash-es'; import { isInputType } from '/nerv-lib/component/form/form-util'; import { useParams } from '/nerv-lib/use/use-params'; @@ -332,6 +333,7 @@ getFormItemClass, getSlots, formLayout, + cloneDeep, }; }, beforeCreate() { diff --git a/lib/saas/theme/global-antd.less b/lib/saas/theme/global-antd.less index 7a71979..6ad0337 100644 --- a/lib/saas/theme/global-antd.less +++ b/lib/saas/theme/global-antd.less @@ -275,6 +275,7 @@ .ant-empty-description { color: rgba(0, 0, 0, 0.3); + margin-bottom: 0; } // 表头加粗 diff --git a/lib/saas/view/service/updatePassWord.vue b/lib/saas/view/service/updatePassWord.vue index e75810f..6743c02 100644 --- a/lib/saas/view/service/updatePassWord.vue +++ b/lib/saas/view/service/updatePassWord.vue @@ -19,7 +19,7 @@
@@ -32,8 +32,6 @@
- 登录已有豪恩账号 > - @@ -69,7 +67,7 @@ const { navigateBackV2: navigateBack } = useNavigate(); const formSchema = reactive([ { - field: 'oldPassword', + field: 'originPassword', label: '原密码', component: 'NsInputPassword', componentProps: { @@ -86,7 +84,7 @@ }, { - field: 'newPassword', + field: 'password', label: '新密码', component: 'NsInputPassword', componentProps: { @@ -147,7 +145,7 @@ if (!value) { return; } - if (value !== data.newPassword) { + if (value !== data.password) { return Promise.reject('两次密码不一致'); } }, @@ -166,14 +164,14 @@ async function update() { try { const res = await http.post(configStore.updatePassWordInfo?.api, data); - if (res.success) { - NsMessage.success('修改成功,需重新登陆', 1, () => { - Cookies.remove(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`); - sessionStorage.clear(); - router.push('/login'); - authorizationStore.clearAuthorization(); - }); - } + // if (res.success) { + NsMessage.success('修改成功,需重新登陆', 1, () => { + Cookies.remove(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`); + sessionStorage.clear(); + router.replace('/login'); + authorizationStore.clearAuthorization(); + }); + // } loading.value = false; } catch (err) { loading.value = false; diff --git a/lib/saas/view/system/login.vue b/lib/saas/view/system/login.vue index 8c59eab..83bc5be 100644 --- a/lib/saas/view/system/login.vue +++ b/lib/saas/view/system/login.vue @@ -129,8 +129,10 @@ accountNo: userName.value.trim(), password: password.value.trim(), }); - validator(null, value.code) + validator(null, value?.code) .then(() => { + console.log('登录'); + // 记住密码 rememberFunc(data); loading.value = true; @@ -257,13 +259,13 @@ created() { const _this = this; window.sessionStorage.clear(); - document.onkeydown = function (e) { - const key = window.event === undefined ? e.keyCode : window.event.keyCode; - key === 13 ? _this.submit() : ''; - }; + // document.onkeydown = function (e) { + // const key = window.event === undefined ? e.keyCode : window.event.keyCode; + // key === 13 ? _this.submit() : ''; + // }; }, beforeUnmount() { - document.onkeydown = function (e) {}; + // document.onkeydown = function (e) {}; }, mounted() {