fix:修改计划添加页面 根据ui修改页面
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export enum planToAddApi {
|
||||
getActivatedPlanTree = '/carbon-smart/api/api/deviceCtrlPlan/getActivatedPlanTree', //计划树
|
||||
getActivatedPlanListByTree = '/carbon-smart/api/deviceCtrlPlan/getActivatedPlanListByTree', //计划列表
|
||||
updPlan = '/carbon-smart/api/deviceCtrlPlan/updateActivatedPlan', //修改计划
|
||||
getActivatedPlanTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanTree', //计划树
|
||||
getActivatedPlanListByTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanListByTree', //计划列表
|
||||
updPlan = '/carbon-smart/deviceCtrlPlan/updateActivatedPlan', //修改计划
|
||||
}
|
||||
|
6
hx-ai-intelligent/src/icon/del.svg
Normal file
6
hx-ai-intelligent/src/icon/del.svg
Normal file
@@ -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>
|
@@ -167,6 +167,7 @@
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '规则id',
|
||||
@@ -179,6 +180,7 @@
|
||||
{
|
||||
title: '对比类型',
|
||||
dataIndex: 'comparisonType',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '告警点位',
|
||||
@@ -196,11 +198,16 @@
|
||||
{
|
||||
title: '启用状态',
|
||||
dataIndex: 'enableRules',
|
||||
width: 120,
|
||||
},
|
||||
],
|
||||
// rowSelection: null, 选择按钮
|
||||
scroll: { x: 2500 },
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 200,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
@@ -318,24 +325,25 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.ant-switch-checked {
|
||||
background-color: rgba(57, 215, 187, 1) !important;
|
||||
}
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/energyAlarm
|
||||
|
@@ -2,12 +2,28 @@
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'"
|
||||
:title="' '"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
@close="handleClose"
|
||||
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">
|
||||
<a-form ref="formRef" :model="infoObject" :rules="rules">
|
||||
<a-form-item ref="site" label="站点" name="site">
|
||||
@@ -104,9 +120,7 @@
|
||||
<div
|
||||
style="width: 70px; align-items: center; cursor: pointer"
|
||||
@click="deleteAlarmList(index - 1)">
|
||||
<img
|
||||
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" />
|
||||
<img style="width: 14px; margin: 0 12px" src="../../../../../src/icon/del.svg" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -484,24 +498,26 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.ant-switch-checked {
|
||||
background-color: rgba(57, 215, 187, 1) !important;
|
||||
}
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
@@ -509,4 +525,3 @@
|
||||
width: 23%;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/energyAlarm
|
||||
|
@@ -8,6 +8,22 @@
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
@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-item name="alarmTitle" label="告警标题">
|
||||
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
|
||||
@@ -260,24 +276,26 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.ant-switch-checked {
|
||||
background-color: rgba(57, 215, 187, 1) !important;
|
||||
}
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
@@ -285,4 +303,3 @@
|
||||
width: 23%;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/energyAlarm
|
||||
|
@@ -145,6 +145,7 @@
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '规则id',
|
||||
@@ -157,6 +158,7 @@
|
||||
{
|
||||
title: '告警点位',
|
||||
dataIndex: 'devicePointName',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '判断条件',
|
||||
@@ -165,6 +167,7 @@
|
||||
{
|
||||
title: '取值类型',
|
||||
dataIndex: 'valueType',
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
title: '异常描述',
|
||||
@@ -173,11 +176,16 @@
|
||||
{
|
||||
title: '启用状态',
|
||||
dataIndex: 'enableRules',
|
||||
width: 120,
|
||||
},
|
||||
],
|
||||
// rowSelection: null, 选择按钮
|
||||
scroll: { x: 2500 },
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 200,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
@@ -304,24 +312,25 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.ant-switch-checked {
|
||||
background-color: rgba(57, 215, 187, 1) !important;
|
||||
}
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/deviceAlarms
|
||||
|
@@ -2,13 +2,29 @@
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'"
|
||||
:title="' '"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
@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-item ref="site" label="站点" name="site">
|
||||
<a-tree-select
|
||||
@@ -123,9 +139,7 @@
|
||||
<div
|
||||
style="width: 70px; align-items: center; cursor: pointer"
|
||||
@click="deleteAlarmList(index - 1)">
|
||||
<img
|
||||
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" />
|
||||
<img style="width: 14px; margin: 0 12px" src="../../../../../src/icon/del.svg" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -508,29 +522,32 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.ant-switch-checked {
|
||||
background-color: rgba(57, 215, 187, 1) !important;
|
||||
}
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
text-align: right;
|
||||
width: 23%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/deviceAlarms
|
||||
|
@@ -2,12 +2,28 @@
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
:title="infoObject?.id ? '编辑告警' : '新增告警'"
|
||||
:title="' '"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
@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-item name="alarmTitle" label="告警标题">
|
||||
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
|
||||
@@ -320,24 +336,27 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.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) {
|
||||
z-index: 20;
|
||||
|
@@ -326,23 +326,25 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.ant-switch-checked {
|
||||
background-color: rgba(57, 215, 187, 1) !important;
|
||||
}
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
</style>
|
||||
|
@@ -2,13 +2,29 @@
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="600"
|
||||
:title="'设置通知联系人'"
|
||||
:title="' '"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
@close="handleClose">
|
||||
<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-item ref="notificationMethod" label="通知方式" name="notificationMethod">
|
||||
<a-select
|
||||
@@ -34,16 +50,28 @@
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div style="width: 100%; height: 765px; overflow-y: auto">
|
||||
<div style="margin-bottom: 8px">
|
||||
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box">
|
||||
<span style="margin-left: 12px; color: #333333">联系人名单</span>
|
||||
<div style="margin-bottom: 8px; width: 100%; display: flex">
|
||||
<div
|
||||
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 style="margin-bottom: 16px; margin-left: 12px">
|
||||
<a-button
|
||||
style="color: rgba(67, 136, 251, 1); border: 1px solid rgba(67, 136, 251, 1)"
|
||||
@click="chengUser"
|
||||
>选择联系人
|
||||
</a-button>
|
||||
</div>
|
||||
<img
|
||||
style="width: 100%; margin-top: -10px"
|
||||
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
|
||||
</div>
|
||||
<div style="margin-bottom: 16px">
|
||||
<a-button type="primary" @click="chengUser">选择联系人 </a-button>
|
||||
</div>
|
||||
<a-table
|
||||
:dataSource="dataSource"
|
||||
@@ -136,8 +164,7 @@
|
||||
showQuickJumper: true,
|
||||
showLessItems: true,
|
||||
// showSizeChanger: true, //分页改变大小
|
||||
showTotal: (total: number, range: any) =>
|
||||
total && range ? `显示第${range[0]}到${range[1]}条记录,共 ${total} 条记录` : '',
|
||||
showTotal: (total: number, range: any) => (total && range ? '' : ''),
|
||||
onChange: handleChangePage,
|
||||
});
|
||||
//点击联系人
|
||||
@@ -287,28 +314,38 @@
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
rgba(57, 215, 187, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.ant-switch-checked {
|
||||
background-color: rgba(57, 215, 187, 1) !important;
|
||||
}
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
background-color: rgba(238, 238, 238, 1) !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
text-align: left;
|
||||
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>
|
||||
|
@@ -14,10 +14,12 @@ const tableKeyMap = [
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'priority',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '告警标题',
|
||||
@@ -26,26 +28,32 @@ const tableKeyMap = [
|
||||
{
|
||||
title: '错误码',
|
||||
dataIndex: 'errorCode',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '告警频率',
|
||||
dataIndex: 'alarmFrequency',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '重复次数',
|
||||
dataIndex: 'repetitions',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '频率间隔',
|
||||
dataIndex: 'interval',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '监测时长',
|
||||
dataIndex: 'monitorFrequency',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
dataIndex: 'enableRules',
|
||||
width: 140,
|
||||
},
|
||||
];
|
||||
const doWnload = (url: any) => {
|
||||
@@ -103,9 +111,13 @@ export const energyAlarmConfigs = (
|
||||
},
|
||||
],
|
||||
columns: tableKeyMap,
|
||||
scroll: { x: 1800 },
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 250,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
|
@@ -14,6 +14,7 @@ const tableKeyMap = [
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
@@ -105,8 +106,12 @@ export const equipmentAlarmTableConfig = (
|
||||
],
|
||||
columns: tableKeyMap,
|
||||
// rowSelection: null, 选择按钮
|
||||
scroll: { x: 1800 },
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 250,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
|
@@ -12,14 +12,17 @@ const tableKeyMap = [
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'prioritys',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '告警类型',
|
||||
dataIndex: 'alarmTypeName',
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
title: '告警标题',
|
||||
@@ -28,20 +31,24 @@ const tableKeyMap = [
|
||||
{
|
||||
title: '错误码',
|
||||
dataIndex: 'errorCode',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '通知名单',
|
||||
dataIndex: 'notificationList',
|
||||
width: 150,
|
||||
width: 220,
|
||||
textEllipsis: true,
|
||||
textWidth: 150,
|
||||
},
|
||||
{
|
||||
title: '通知方式',
|
||||
dataIndex: 'notificationMethod',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '启用通知',
|
||||
dataIndex: 'enableNotifications',
|
||||
width: 140,
|
||||
},
|
||||
];
|
||||
export const notificationtableConfig = (notificationManagements: any) => {
|
||||
@@ -50,8 +57,12 @@ export const notificationtableConfig = (notificationManagements: any) => {
|
||||
api: notificationManagementApi.getTableList,
|
||||
headerActions: [],
|
||||
columns: tableKeyMap,
|
||||
scroll: { x: 1800 },
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 140,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '联系方式',
|
||||
|
@@ -97,6 +97,7 @@
|
||||
infoObject.value = {};
|
||||
visible.value = false;
|
||||
config.value.dataSource = [];
|
||||
formRef.value.resetFields();
|
||||
};
|
||||
const btnClick = () => {
|
||||
formRef.value.validate().then(() => {
|
||||
|
@@ -57,11 +57,14 @@ export const notificationtableConfig = (look: any, status: any) => {
|
||||
title: '告警记录',
|
||||
api: energyAlarmApi.getTableList,
|
||||
headerActions: [{}],
|
||||
scroll: { x: 2000 },
|
||||
scroll: { x: 1800 },
|
||||
columns: tableKeyMap,
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '详情',
|
||||
|
@@ -98,6 +98,7 @@
|
||||
visible.value = false;
|
||||
config.value.dataSource = [];
|
||||
logList.value = [];
|
||||
formRef.value.resetFields();
|
||||
};
|
||||
const btnClick = () => {
|
||||
formRef.value.validate().then(() => {
|
||||
|
@@ -59,11 +59,14 @@ export const notificationtableConfig = (look: any, status: any) => {
|
||||
title: '告警记录',
|
||||
api: equipmentAlarmApi.getTableList,
|
||||
headerActions: [{}],
|
||||
scroll: { x: 2000 },
|
||||
scroll: { x: 1800 },
|
||||
columns: tableKeyMap,
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '详情',
|
||||
|
@@ -12,6 +12,7 @@ const tableKeyMap = [
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '告警编号',
|
||||
@@ -24,10 +25,12 @@ const tableKeyMap = [
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'priority',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'alarmLogState',
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
title: '错误码',
|
||||
@@ -53,8 +56,12 @@ export const notificationtableConfig = (look: any, status: any) => {
|
||||
headerActions: [{}],
|
||||
columns: tableKeyMap,
|
||||
// rowSelection: null, 选择按钮
|
||||
scroll: { x: 1800 },
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
dataIndex: 'tableAction',
|
||||
actions: [
|
||||
{
|
||||
label: '详情',
|
||||
|
@@ -117,10 +117,10 @@
|
||||
clearInterval(intervalId);
|
||||
});
|
||||
const tables = ref(null);
|
||||
const customRow = (record) => {
|
||||
const customRow = (record: any) => {
|
||||
return {
|
||||
//点击 行 进行查看详情
|
||||
onClick: (event) => {
|
||||
onClick: () => {
|
||||
detailed.value = !detailed.value;
|
||||
infoObject.value = record;
|
||||
tables.value.toggle(record);
|
||||
|
152
hx-ai-intelligent/src/view/equipmentControl/planToAdd/config.ts
Normal file
152
hx-ai-intelligent/src/view/equipmentControl/planToAdd/config.ts
Normal file
@@ -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',
|
||||
});
|
||||
};
|
@@ -9,17 +9,15 @@
|
||||
<NsModalFrom ref="modalFormRef" v-bind="nsModalFormConfig" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { tableConfig } from './config';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import NsModalFrom from '/@/components/ns-modal-form.vue';
|
||||
import { planToAddApi } from '/@/api/planToAdd';
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { getEnum } from '/@/api';
|
||||
import { http } from '/nerv-lib/util';
|
||||
|
||||
//页面 创建
|
||||
const orgId = ref('');
|
||||
const projectId = ref('');
|
||||
const config = ref({});
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
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(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
onMounted(() => {});
|
||||
const config = tableConfig(
|
||||
orgId.value,
|
||||
projectId.value,
|
||||
mainRef,
|
||||
nsModalFormConfig,
|
||||
modalFormRef,
|
||||
);
|
||||
defineOptions({
|
||||
name: 'LedgerIndex', // 与页面路由name一致缓存才可生效
|
||||
});
|
||||
|
Reference in New Issue
Block a user