Browse Source

fix:修改计划添加页面 根据ui修改页面

temp
zhaohy 3 months ago
parent
commit
e7642fe14c
  1. 6
      hx-ai-intelligent/src/api/planToAdd.ts
  2. 6
      hx-ai-intelligent/src/icon/del.svg
  3. 20
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue
  4. 35
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue
  5. 29
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue
  6. 21
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
  7. 39
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
  8. 29
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
  9. 12
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue
  10. 69
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue
  11. 12
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts
  12. 5
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
  13. 13
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts
  14. 1
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
  15. 5
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts
  16. 1
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
  17. 5
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts
  18. 7
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts
  19. 4
      hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue
  20. 152
      hx-ai-intelligent/src/view/equipmentControl/planToAdd/config.ts
  21. 153
      hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue

6
hx-ai-intelligent/src/api/planToAdd.ts

@ -1,5 +1,5 @@
export enum planToAddApi { export enum planToAddApi {
getActivatedPlanTree = '/carbon-smart/api/api/deviceCtrlPlan/getActivatedPlanTree', //计划树 getActivatedPlanTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanTree', //计划树
getActivatedPlanListByTree = '/carbon-smart/api/deviceCtrlPlan/getActivatedPlanListByTree', //计划列表 getActivatedPlanListByTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanListByTree', //计划列表
updPlan = '/carbon-smart/api/deviceCtrlPlan/updateActivatedPlan', //修改计划 updPlan = '/carbon-smart/deviceCtrlPlan/updateActivatedPlan', //修改计划
} }

6
hx-ai-intelligent/src/icon/del.svg

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="12px" height="12px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -347 -469 )">
<path d="M 10.684322033898304 5.219491525423729 C 10.685593220338983 4.930932203389831 10.452966101694914 4.698305084745764 10.165677966101695 4.698305084745764 C 9.878389830508475 4.698305084745764 9.644491525423728 4.930932203389831 9.644491525423728 5.219491525423729 L 9.644491525423728 10.426271186440678 C 9.644491525423728 10.7135593220339 9.410593220338983 10.947457627118645 9.123305084745763 10.947457627118645 L 2.8754237288135593 10.947457627118645 C 2.588135593220339 10.947457627118645 2.354237288135593 10.7135593220339 2.354237288135593 10.426271186440678 L 2.354237288135593 5.219491525423729 C 2.354237288135593 4.932203389830509 2.1216101694915253 4.698305084745764 1.833050847457627 4.698305084745764 C 1.5444915254237288 4.698305084745764 1.3118644067796608 4.930932203389831 1.3118644067796608 5.219491525423729 L 1.3118644067796608 10.426271186440678 C 1.3118644067796608 11.288135593220339 2.01228813559322 11.988559322033899 2.8741525423728818 11.988559322033899 L 9.122033898305085 11.988559322033899 C 9.983898305084745 11.988559322033899 10.684322033898304 11.288135593220339 10.684322033898304 10.426271186440678 L 10.684322033898304 5.219491525423729 Z M 11.98728813559322 2.8766949152542374 C 11.98728813559322 2.589406779661017 11.753389830508475 2.3555084745762715 11.467372881355931 2.3555084745762715 L 9.12457627118644 2.3555084745762715 L 9.12457627118644 1.314406779661017 C 9.12457627118644 0.5961864406779662 8.539830508474576 0.012711864406779662 7.8228813559322035 0.012711864406779662 L 4.177118644067797 0.012711864406779662 C 3.458898305084746 0.012711864406779662 2.87542372881356 0.5961864406779662 2.87542372881356 1.314406779661017 L 2.87542372881356 2.3555084745762715 L 0.5326271186440679 2.3555084745762715 C 0.24661016949152548 2.3555084745762715 0.011440677966101768 2.589406779661017 0.011440677966101768 2.8766949152542374 C 0.011440677966101768 3.1627118644067798 0.2453389830508475 3.3978813559322036 0.5326271186440679 3.3978813559322036 L 11.466101694915254 3.3978813559322036 C 11.752118644067796 3.3978813559322036 11.98728813559322 3.163983050847458 11.98728813559322 2.8766949152542374 Z M 8.083474576271188 2.3555084745762715 L 3.917796610169492 2.3555084745762715 L 3.917796610169492 1.314406779661017 C 3.917796610169492 1.1707627118644068 4.034745762711864 1.053813559322034 4.1783898305084755 1.053813559322034 L 7.822881355932205 1.053813559322034 C 7.966525423728815 1.053813559322034 8.083474576271188 1.1707627118644068 8.083474576271188 1.314406779661017 L 8.083474576271188 2.3555084745762715 Z M 4.698305084745764 9.385169491525422 C 4.985593220338984 9.385169491525422 5.219491525423729 9.149999999999999 5.219491525423729 8.863983050847457 L 5.219491525423729 5.739406779661016 C 5.219491525423729 5.453389830508475 4.985593220338984 5.21822033898305 4.698305084745764 5.21822033898305 C 4.411016949152542 5.21822033898305 4.177118644067797 5.452118644067796 4.177118644067797 5.739406779661016 L 4.177118644067797 8.863983050847457 C 4.177118644067797 9.149999999999999 4.411016949152542 9.385169491525422 4.698305084745764 9.385169491525422 Z M 7.301694915254236 9.385169491525422 C 7.58771186440678 9.383898305084745 7.8228813559322035 9.149999999999999 7.8228813559322035 8.863983050847457 L 7.8228813559322035 5.739406779661016 C 7.8228813559322035 5.453389830508475 7.5889830508474585 5.21822033898305 7.301694915254236 5.21822033898305 C 7.015677966101695 5.21822033898305 6.780508474576271 5.452118644067796 6.780508474576271 5.739406779661016 L 6.780508474576271 8.863983050847457 C 6.780508474576271 9.149999999999999 7.014406779661017 9.385169491525422 7.301694915254236 9.385169491525422 Z " fill-rule="nonzero" fill="#d9001b" stroke="none" transform="matrix(1 0 0 1 347 469 )" />
</g>
</svg>

20
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue

@ -167,6 +167,7 @@
customRender: (text: any) => { customRender: (text: any) => {
return text.index + 1; return text.index + 1;
}, },
width: 80,
}, },
{ {
title: '规则id', title: '规则id',
@ -179,6 +180,7 @@
{ {
title: '对比类型', title: '对比类型',
dataIndex: 'comparisonType', dataIndex: 'comparisonType',
width: 180,
}, },
{ {
title: '告警点位', title: '告警点位',
@ -196,11 +198,16 @@
{ {
title: '启用状态', title: '启用状态',
dataIndex: 'enableRules', dataIndex: 'enableRules',
width: 120,
}, },
], ],
// rowSelection: null, // rowSelection: null,
scroll: { x: 2500 },
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 200,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '编辑', label: '编辑',
@ -318,24 +325,25 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
</style> </style>
../../../../api/alarmManagement/alarmSettings/energyAlarm

35
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue

@ -2,12 +2,28 @@
<ns-drawer <ns-drawer
v-model:visible="visible" v-model:visible="visible"
width="520" width="520"
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'" :title="' '"
:footer-style="{ textAlign: 'right' }" :footer-style="{ textAlign: 'right' }"
:ok="btnClick" :ok="btnClick"
:cancel="handleClose" :cancel="handleClose"
@close="handleClose" @close="handleClose"
placement="right"> placement="right">
<div
class="ns-title-extra-box"
style="
width: 100%;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<div style="padding: 18px; width: 100%; overflow: hidden"> <div style="padding: 18px; width: 100%; overflow: hidden">
<a-form ref="formRef" :model="infoObject" :rules="rules"> <a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item ref="site" label="站点" name="site"> <a-form-item ref="site" label="站点" name="site">
@ -104,9 +120,7 @@
<div <div
style="width: 70px; align-items: center; cursor: pointer" style="width: 70px; align-items: center; cursor: pointer"
@click="deleteAlarmList(index - 1)"> @click="deleteAlarmList(index - 1)">
<img <img style="width: 14px; margin: 0 12px" src="../../../../../src/icon/del.svg" />
style="width: 14px; margin: 0 12px"
src="https://files.axshare.com/gsc/4T0UQR/5a/e6/81/5ae6813d499c422383c7a15dd956523f/images/设备规则/u72.svg?pageId=cbce6e61-bc6a-4283-802d-993fce6151c0" />
</div> </div>
</div> </div>
<div <div
@ -484,24 +498,26 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
:deep(.ant-form-item-label) { :deep(.ant-form-item-label) {
z-index: 20; z-index: 20;
@ -509,4 +525,3 @@
width: 23%; width: 23%;
} }
</style> </style>
../../../../api/alarmManagement/alarmSettings/energyAlarm

29
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue

@ -8,6 +8,22 @@
:cancel="handleClose" :cancel="handleClose"
placement="right" placement="right"
@close="handleClose"> @close="handleClose">
<div
class="ns-title-extra-box"
style="
width: 100%;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules"> <a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item name="alarmTitle" label="告警标题"> <a-form-item name="alarmTitle" label="告警标题">
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" /> <ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
@ -260,24 +276,26 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
:deep(.ant-form-item-label) { :deep(.ant-form-item-label) {
z-index: 20; z-index: 20;
@ -285,4 +303,3 @@
width: 23%; width: 23%;
} }
</style> </style>
../../../../api/alarmManagement/alarmSettings/energyAlarm

21
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue

@ -145,6 +145,7 @@
customRender: (text: any) => { customRender: (text: any) => {
return text.index + 1; return text.index + 1;
}, },
width: 80,
}, },
{ {
title: '规则id', title: '规则id',
@ -157,6 +158,7 @@
{ {
title: '告警点位', title: '告警点位',
dataIndex: 'devicePointName', dataIndex: 'devicePointName',
width: 120,
}, },
{ {
title: '判断条件', title: '判断条件',
@ -165,6 +167,7 @@
{ {
title: '取值类型', title: '取值类型',
dataIndex: 'valueType', dataIndex: 'valueType',
width: 140,
}, },
{ {
title: '异常描述', title: '异常描述',
@ -173,11 +176,16 @@
{ {
title: '启用状态', title: '启用状态',
dataIndex: 'enableRules', dataIndex: 'enableRules',
width: 120,
}, },
], ],
// rowSelection: null, // rowSelection: null,
scroll: { x: 2500 },
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 200,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '编辑', label: '编辑',
@ -304,24 +312,25 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
</style> </style>
../../../../api/alarmManagement/alarmSettings/deviceAlarms

39
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue

@ -2,13 +2,29 @@
<ns-drawer <ns-drawer
v-model:visible="visible" v-model:visible="visible"
width="520" width="520"
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'" :title="' '"
:footer-style="{ textAlign: 'right' }" :footer-style="{ textAlign: 'right' }"
:ok="btnClick" :ok="btnClick"
:cancel="handleClose" :cancel="handleClose"
placement="right" placement="right"
@close="handleClose"> @close="handleClose">
<div style="padding: 18px; width: 100%; overflow: hidden"> <div style="padding: 12px; width: 100%; overflow: hidden">
<div
class="ns-title-extra-box"
style="
width: 100%;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules"> <a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item ref="site" label="站点" name="site"> <a-form-item ref="site" label="站点" name="site">
<a-tree-select <a-tree-select
@ -123,9 +139,7 @@
<div <div
style="width: 70px; align-items: center; cursor: pointer" style="width: 70px; align-items: center; cursor: pointer"
@click="deleteAlarmList(index - 1)"> @click="deleteAlarmList(index - 1)">
<img <img style="width: 14px; margin: 0 12px" src="../../../../../src/icon/del.svg" />
style="width: 14px; margin: 0 12px"
src="https://files.axshare.com/gsc/4T0UQR/5a/e6/81/5ae6813d499c422383c7a15dd956523f/images/设备规则/u72.svg?pageId=cbce6e61-bc6a-4283-802d-993fce6151c0" />
</div> </div>
</div> </div>
<div <div
@ -508,29 +522,32 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
:deep(.ant-form-item-label) { :deep(.ant-form-item-label) {
z-index: 20; z-index: 20;
text-align: right; text-align: right;
width: 23%; width: 23%;
display: flex;
position: relative;
} }
</style> </style>
../../../../api/alarmManagement/alarmSettings/deviceAlarms

29
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue

@ -2,12 +2,28 @@
<ns-drawer <ns-drawer
v-model:visible="visible" v-model:visible="visible"
width="520" width="520"
:title="infoObject?.id ? '编辑告警' : '新增告警'" :title="' '"
:footer-style="{ textAlign: 'right' }" :footer-style="{ textAlign: 'right' }"
:ok="btnClick" :ok="btnClick"
:cancel="handleClose" :cancel="handleClose"
placement="right" placement="right"
@close="handleClose"> @close="handleClose">
<div
class="ns-title-extra-box"
style="
width: 100%;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules"> <a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item name="alarmTitle" label="告警标题"> <a-form-item name="alarmTitle" label="告警标题">
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" /> <ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
@ -320,24 +336,27 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: alarmSettings !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
} }
:deep(.ant-form-item-label) { :deep(.ant-form-item-label) {
z-index: 20; z-index: 20;

12
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue

@ -326,23 +326,25 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
</style> </style>

69
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue

@ -2,13 +2,29 @@
<ns-drawer <ns-drawer
v-model:visible="visible" v-model:visible="visible"
width="600" width="600"
:title="'设置通知联系人'" :title="' '"
:ok="btnClick" :ok="btnClick"
:cancel="handleClose" :cancel="handleClose"
placement="right" placement="right"
:footer-style="{ textAlign: 'right' }" :footer-style="{ textAlign: 'right' }"
@close="handleClose"> @close="handleClose">
<div style="width: 100%; overflow: hidden; overflow-y: hidden; height: 100%"> <div style="width: 100%; overflow: hidden; overflow-y: hidden; height: 100%">
<div
class="ns-title-extra-box"
style="
width: 100%;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
">
<span style="margin-left: 6px">设置通知联系人</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules" style="width: 80%"> <a-form ref="formRef" :model="infoObject" :rules="rules" style="width: 80%">
<a-form-item ref="notificationMethod" label="通知方式" name="notificationMethod"> <a-form-item ref="notificationMethod" label="通知方式" name="notificationMethod">
<a-select <a-select
@ -34,16 +50,28 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
<div style="width: 100%; height: 765px; overflow-y: auto"> <div style="width: 100%; height: 765px; overflow-y: auto">
<div style="margin-bottom: 8px"> <div style="margin-bottom: 8px; width: 100%; display: flex">
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box"> <div
<span style="margin-left: 12px; color: #333333">联系人名单</span> style="
width: auto;
height: 30px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 30px;
color: rgba(51, 51, 51, 1);
">
联系人名单
</div> </div>
<img <div style="margin-bottom: 16px; margin-left: 12px">
style="width: 100%; margin-top: -10px" <a-button
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" /> style="color: rgba(67, 136, 251, 1); border: 1px solid rgba(67, 136, 251, 1)"
@click="chengUser"
>选择联系人
</a-button>
</div> </div>
<div style="margin-bottom: 16px">
<a-button type="primary" @click="chengUser">选择联系人 </a-button>
</div> </div>
<a-table <a-table
:dataSource="dataSource" :dataSource="dataSource"
@ -136,8 +164,7 @@
showQuickJumper: true, showQuickJumper: true,
showLessItems: true, showLessItems: true,
// showSizeChanger: true, // // showSizeChanger: true, //
showTotal: (total: number, range: any) => showTotal: (total: number, range: any) => (total && range ? '' : ''),
total && range ? `显示第${range[0]}${range[1]}条记录,共 ${total} 条记录` : '',
onChange: handleChangePage, onChange: handleChangePage,
}); });
// //
@ -287,28 +314,38 @@
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.grey-background.ant-switch { .grey-background.ant-switch {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
.blue-background.ant-switch-checked .ant-switch-handle { .blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient( background-color: linear-gradient(
180deg, 180deg,
rgba(1, 206, 255, 1) 0%, rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100% rgba(57, 215, 187, 1) 100%
) !important; ) !important;
} }
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle { .grey-background.ant-switch .ant-switch-handle {
background-color: grey !important; background-color: rgba(238, 238, 238, 1) !important;
} }
:deep(.ant-form-item-label) { :deep(.ant-form-item-label) {
z-index: 20; z-index: 20;
text-align: left; text-align: left;
width: 20%; width: 20%;
} }
:deep(.ant-pagination-prev) {
border: 1px solid rgba(207, 212, 219, 1) !important;
margin-right: 6px !important;
}
:deep(.ant-pagination-next) {
border: 1px solid rgba(207, 212, 219, 1) !important;
margin-left: 6px !important;
}
</style> </style>

12
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts

@ -14,10 +14,12 @@ const tableKeyMap = [
customRender: (text: any) => { customRender: (text: any) => {
return text.index + 1; return text.index + 1;
}, },
width: 80,
}, },
{ {
title: '优先级', title: '优先级',
dataIndex: 'priority', dataIndex: 'priority',
width: 120,
}, },
{ {
title: '告警标题', title: '告警标题',
@ -26,26 +28,32 @@ const tableKeyMap = [
{ {
title: '错误码', title: '错误码',
dataIndex: 'errorCode', dataIndex: 'errorCode',
width: 120,
}, },
{ {
title: '告警频率', title: '告警频率',
dataIndex: 'alarmFrequency', dataIndex: 'alarmFrequency',
width: 120,
}, },
{ {
title: '重复次数', title: '重复次数',
dataIndex: 'repetitions', dataIndex: 'repetitions',
width: 120,
}, },
{ {
title: '频率间隔', title: '频率间隔',
dataIndex: 'interval', dataIndex: 'interval',
width: 120,
}, },
{ {
title: '监测时长', title: '监测时长',
dataIndex: 'monitorFrequency', dataIndex: 'monitorFrequency',
width: 120,
}, },
{ {
title: '是否启用', title: '是否启用',
dataIndex: 'enableRules', dataIndex: 'enableRules',
width: 140,
}, },
]; ];
const doWnload = (url: any) => { const doWnload = (url: any) => {
@ -103,9 +111,13 @@ export const energyAlarmConfigs = (
}, },
], ],
columns: tableKeyMap, columns: tableKeyMap,
scroll: { x: 1800 },
// rowSelection: null, 选择按钮 // rowSelection: null, 选择按钮
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 250,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '编辑', label: '编辑',

5
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts

@ -14,6 +14,7 @@ const tableKeyMap = [
customRender: (text: any) => { customRender: (text: any) => {
return text.index + 1; return text.index + 1;
}, },
width: 80,
}, },
{ {
title: '优先级', title: '优先级',
@ -105,8 +106,12 @@ export const equipmentAlarmTableConfig = (
], ],
columns: tableKeyMap, columns: tableKeyMap,
// rowSelection: null, 选择按钮 // rowSelection: null, 选择按钮
scroll: { x: 1800 },
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 250,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '编辑', label: '编辑',

13
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts

@ -12,14 +12,17 @@ const tableKeyMap = [
customRender: (text: any) => { customRender: (text: any) => {
return text.index + 1; return text.index + 1;
}, },
width: 80,
}, },
{ {
title: '优先级', title: '优先级',
dataIndex: 'prioritys', dataIndex: 'prioritys',
width: 120,
}, },
{ {
title: '告警类型', title: '告警类型',
dataIndex: 'alarmTypeName', dataIndex: 'alarmTypeName',
width: 140,
}, },
{ {
title: '告警标题', title: '告警标题',
@ -28,20 +31,24 @@ const tableKeyMap = [
{ {
title: '错误码', title: '错误码',
dataIndex: 'errorCode', dataIndex: 'errorCode',
width: 120,
}, },
{ {
title: '通知名单', title: '通知名单',
dataIndex: 'notificationList', dataIndex: 'notificationList',
width: 150, width: 220,
textEllipsis: true, textEllipsis: true,
textWidth: 150,
}, },
{ {
title: '通知方式', title: '通知方式',
dataIndex: 'notificationMethod', dataIndex: 'notificationMethod',
width: 160,
}, },
{ {
title: '启用通知', title: '启用通知',
dataIndex: 'enableNotifications', dataIndex: 'enableNotifications',
width: 140,
}, },
]; ];
export const notificationtableConfig = (notificationManagements: any) => { export const notificationtableConfig = (notificationManagements: any) => {
@ -50,8 +57,12 @@ export const notificationtableConfig = (notificationManagements: any) => {
api: notificationManagementApi.getTableList, api: notificationManagementApi.getTableList,
headerActions: [], headerActions: [],
columns: tableKeyMap, columns: tableKeyMap,
scroll: { x: 1800 },
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 140,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '联系方式', label: '联系方式',

1
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue

@ -97,6 +97,7 @@
infoObject.value = {}; infoObject.value = {};
visible.value = false; visible.value = false;
config.value.dataSource = []; config.value.dataSource = [];
formRef.value.resetFields();
}; };
const btnClick = () => { const btnClick = () => {
formRef.value.validate().then(() => { formRef.value.validate().then(() => {

5
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts

@ -57,11 +57,14 @@ export const notificationtableConfig = (look: any, status: any) => {
title: '告警记录', title: '告警记录',
api: energyAlarmApi.getTableList, api: energyAlarmApi.getTableList,
headerActions: [{}], headerActions: [{}],
scroll: { x: 2000 }, scroll: { x: 1800 },
columns: tableKeyMap, columns: tableKeyMap,
// rowSelection: null, 选择按钮 // rowSelection: null, 选择按钮
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 180,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '详情', label: '详情',

1
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue

@ -98,6 +98,7 @@
visible.value = false; visible.value = false;
config.value.dataSource = []; config.value.dataSource = [];
logList.value = []; logList.value = [];
formRef.value.resetFields();
}; };
const btnClick = () => { const btnClick = () => {
formRef.value.validate().then(() => { formRef.value.validate().then(() => {

5
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts

@ -59,11 +59,14 @@ export const notificationtableConfig = (look: any, status: any) => {
title: '告警记录', title: '告警记录',
api: equipmentAlarmApi.getTableList, api: equipmentAlarmApi.getTableList,
headerActions: [{}], headerActions: [{}],
scroll: { x: 2000 }, scroll: { x: 1800 },
columns: tableKeyMap, columns: tableKeyMap,
// rowSelection: null, 选择按钮 // rowSelection: null, 选择按钮
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 180,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '详情', label: '详情',

7
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts

@ -12,6 +12,7 @@ const tableKeyMap = [
customRender: (text: any) => { customRender: (text: any) => {
return text.index + 1; return text.index + 1;
}, },
width: 80,
}, },
{ {
title: '告警编号', title: '告警编号',
@ -24,10 +25,12 @@ const tableKeyMap = [
{ {
title: '优先级', title: '优先级',
dataIndex: 'priority', dataIndex: 'priority',
width: 120,
}, },
{ {
title: '状态', title: '状态',
dataIndex: 'alarmLogState', dataIndex: 'alarmLogState',
width: 140,
}, },
{ {
title: '错误码', title: '错误码',
@ -53,8 +56,12 @@ export const notificationtableConfig = (look: any, status: any) => {
headerActions: [{}], headerActions: [{}],
columns: tableKeyMap, columns: tableKeyMap,
// rowSelection: null, 选择按钮 // rowSelection: null, 选择按钮
scroll: { x: 1800 },
columnActions: { columnActions: {
title: '操作', title: '操作',
width: 180,
fixed: 'right',
dataIndex: 'tableAction',
actions: [ actions: [
{ {
label: '详情', label: '详情',

4
hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue

@ -117,10 +117,10 @@
clearInterval(intervalId); clearInterval(intervalId);
}); });
const tables = ref(null); const tables = ref(null);
const customRow = (record) => { const customRow = (record: any) => {
return { return {
// //
onClick: (event) => { onClick: () => {
detailed.value = !detailed.value; detailed.value = !detailed.value;
infoObject.value = record; infoObject.value = record;
tables.value.toggle(record); tables.value.toggle(record);

152
hx-ai-intelligent/src/view/equipmentControl/planToAdd/config.ts

@ -0,0 +1,152 @@
import { planToAddApi } from '/@/api/planToAdd';
import { ref } from 'vue';
import { http } from '/nerv-lib/util';
import { getEnum } from '/@/api';
import { NsMessage } from '/nerv-lib/component';
const enumData: any = await getEnum({ params: { enumType: 'CtrlDeviceType' } });
export const tableConfig = (
orgId: any,
projectId: any,
mainRef: any,
nsModalFormConfig: any,
modalFormRef: any,
) => {
return ref({
title: '计划库',
api: planToAddApi.getActivatedPlanListByTree,
params: { orgId, projectId, deviceType: enumData.data[0].value },
treeConfig: {
defaultExpandAll: true,
header: {
icon: 'name',
title: '执行计划',
},
params: { projectId, deviceType: enumData.data[0].value },
dynamicParams: {
id: 'id',
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
},
api: planToAddApi.getActivatedPlanTree,
fieldNames: {
title: 'name',
key: 'id',
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
children: 'childList',
},
formConfig: {
schemas: [
{
field: 'deviceType',
label: '告警优先级',
component: 'nsSelectApi',
autoSubmit: true,
componentProps: {
api: () => getEnum({ params: { enumType: 'CtrlDeviceType' } }),
immediate: true,
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
autoSelectFirst: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
},
},
],
},
},
rowSelection: null,
columns: [
{
title: '执行顺序',
dataIndex: 'address',
width: 100,
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '计划类型',
dataIndex: 'planGroupName',
},
{
title: '计划名称',
dataIndex: 'planName',
},
{
title: '执行时间',
dataIndex: 'executionTime',
},
],
columnActions: {
title: '操作',
width: 200,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '编辑',
name: 'energyAlarmEdit',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
const obj = { ...data };
nsModalFormConfig.value.title = '编辑';
setTimeout(() => {
nsModalFormConfig.value.data = {
id: obj.id,
};
if (obj.startTime) {
nsModalFormConfig.value.data.createTime = obj.startTime
? [obj.startTime, obj.endTime]
: [];
}
}, 1);
modalFormRef.value?.toggle();
},
},
{
label: '删除',
name: 'energyAlarmDel',
dynamicParams: ['uuid', 'appealType'],
confirm: true,
handle: (data: any) => {
http.post(planToAddApi.updPlan, { id: data.id, isDeleted: 1 }).then((res) => {
if (res.msg === 'success') {
NsMessage.success('操作成功');
mainRef.value?.nsTableRef.reload();
} else {
NsMessage.error(res.msg);
}
});
mainRef.value?.nsTableRef.reload();
},
},
],
},
formConfig: {
schemas: [
{
field: 'planName',
label: '计划标题',
component: 'NsInput',
componentProps: {
allowClear: true,
placeholder: '请输入计划名称关键字',
},
},
],
params: {},
},
// pagination: { pageSizeOptions: false },
rowKey: 'uuid',
});
};

153
hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue

@ -9,17 +9,15 @@
<NsModalFrom ref="modalFormRef" v-bind="nsModalFormConfig" /> <NsModalFrom ref="modalFormRef" v-bind="nsModalFormConfig" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { tableConfig } from './config';
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import NsModalFrom from '/@/components/ns-modal-form.vue'; import NsModalFrom from '/@/components/ns-modal-form.vue';
import { planToAddApi } from '/@/api/planToAdd'; import { planToAddApi } from '/@/api/planToAdd';
import { NsMessage } from '/nerv-lib/component'; import { NsMessage } from '/nerv-lib/component';
import { getEnum } from '/@/api';
import { http } from '/nerv-lib/util';
// //
const orgId = ref(''); const orgId = ref('');
const projectId = ref(''); const projectId = ref('');
const config = ref({});
const result = JSON.parse(sessionStorage.getItem('ORGID')!); const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result; orgId.value = result;
const results = JSON.parse(sessionStorage.getItem('/hx-ai-intelligent/')!); const results = JSON.parse(sessionStorage.getItem('/hx-ai-intelligent/')!);
@ -67,148 +65,15 @@
} }
}, },
}); });
const getList = async () => {
const enumData: any = await getEnum({ params: { enumType: 'CtrlDeviceType' } });
config.value = {
title: '计划库',
api: planToAddApi.getActivatedPlanListByTree,
params: { orgId, projectId, deviceType: enumData.data[0].value },
treeConfig: {
defaultExpandAll: true,
header: {
icon: 'name',
title: '执行计划',
},
params: { orgId, projectId, deviceType: enumData.data[0].value },
dynamicParams: {
id: 'id',
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
},
api: planToAddApi.getActivatedPlanTree,
fieldNames: {
title: 'name',
key: 'id',
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
children: 'childList',
},
formConfig: {
schemas: [
{
field: 'deviceType',
label: '告警优先级',
component: 'nsSelectApi',
autoSubmit: true,
componentProps: {
api: () => getEnum({ params: { enumType: 'CtrlDeviceType' } }),
immediate: true,
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
autoSelectFirst: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
},
},
],
},
},
rowSelection: null,
columns: [
{
title: '执行顺序',
dataIndex: 'address',
width: 100,
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '计划类型',
dataIndex: 'planGroupName',
},
{
title: '计划名称',
dataIndex: 'planName',
},
{
title: '执行时间',
dataIndex: 'executionTime',
},
],
columnActions: {
title: '操作',
actions: [
{
label: '编辑',
name: 'energyAlarmEdit',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
const obj = { ...data };
nsModalFormConfig.value.title = '编辑';
setTimeout(() => {
nsModalFormConfig.value.data = {
id: obj.id,
};
if (obj.startTime) {
nsModalFormConfig.value.data.createTime = obj.startTime
? [obj.startTime, obj.endTime]
: [];
}
}, 1);
modalFormRef.value?.toggle();
},
},
{
label: '删除',
name: 'energyAlarmDel',
dynamicParams: ['uuid', 'appealType'],
confirm: true,
handle: (data: any) => {
http.post(planToAddApi.updPlan, { id: data.id, isDeleted: 1 }).then((res) => {
if (res.msg === 'success') {
NsMessage.success('操作成功');
mainRef.value?.nsTableRef.reload();
} else {
NsMessage.error(res.msg);
}
});
mainRef.value?.nsTableRef.reload();
},
},
],
},
formConfig: {
schemas: [
{
field: 'planName',
label: '计划标题',
component: 'NsInput',
componentProps: {
allowClear: true,
placeholder: '请输入计划关键字',
},
},
],
params: {},
},
// pagination: { pageSizeOptions: false },
rowKey: 'uuid',
};
};
// //
onMounted(() => { onMounted(() => {});
getList(); const config = tableConfig(
}); orgId.value,
projectId.value,
mainRef,
nsModalFormConfig,
modalFormRef,
);
defineOptions({ defineOptions({
name: 'LedgerIndex', // name name: 'LedgerIndex', // name
}); });

Loading…
Cancel
Save