fks-yangshouda 3 months ago
parent
commit
d8e8dc651c
  1. 6
      hx-ai-intelligent/src/api/liftSystem.ts
  2. 28
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue
  3. 28
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue
  4. 24
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/look.vue
  5. 130
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/index.vue
  6. 42
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue
  7. 101
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftPage.vue
  8. 20
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftPosition.ts
  9. 13
      hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue

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

@ -0,0 +1,6 @@
import { BASE_URL } from './index';
export enum liftSystemApi {
getDeviceState = `${BASE_URL}/elevatorCtrl/getDeviceState`, // 查询设备最新状态
getDeviceRecordList = `${BASE_URL}/elevatorCtrl/getDeviceRecordList`, // 查询设备日志列表
}

28
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue

@ -10,12 +10,13 @@
@close="handleClose"> @close="handleClose">
<div style="width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden"> <div style="width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden">
<!-- top --> <!-- top -->
<div class="box"> <div class="boxstyle">
<div class="card"></div> <div
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px"> class="ns-title-extra-box"
style="left: 5px; position: absolute; height: 35px; line-height: 30px">
告警编号{{ infoObject.alarmCode }} 告警编号{{ infoObject.alarmCode }}
</div> </div>
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px"> <div style="right: 20px; position: absolute; height: 35px; line-height: 30px">
{{ infoObject.updateTime }} {{ infoObject.updateTime }}
</div> </div>
</div> </div>
@ -284,23 +285,18 @@
}); });
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.box { .boxstyle {
width: 100%; width: 100%;
height: 35px; height: 35px;
display: flex; display: flex;
position: relative; position: relative;
font-size: @font-size-base; color: rgba(51, 51, 51, 1);
border-bottom: 1px solid @primary-color; font-size: 16px;
} font-weight: 700;
.card {
position: absolute;
left: 0px;
top: 0px;
width: 5px;
height: 35px;
background-color: @primary-color;
} }
:deep(.ant-descriptions-item-label) { :deep(.ant-descriptions-item-label) {
width: 25%; width: 134px;
text-align: center;
font-weight: 700;
} }
</style> </style>

28
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue

@ -10,12 +10,13 @@
@close="handleClose"> @close="handleClose">
<div style="width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden"> <div style="width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden">
<!-- top --> <!-- top -->
<div class="box"> <div class="boxstyle">
<div class="card"></div> <div
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px"> class="ns-title-extra-box"
style="left: 5px; position: absolute; height: 35px; line-height: 30px">
告警编号{{ infoObject.alarmCode }} 告警编号{{ infoObject.alarmCode }}
</div> </div>
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px"> <div style="right: 20px; position: absolute; height: 35px; line-height: 30px">
{{ infoObject.updateTime }} {{ infoObject.updateTime }}
</div> </div>
</div> </div>
@ -34,7 +35,7 @@
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="错误码">{{ infoObject.errorCode }}</a-descriptions-item> <a-descriptions-item label="错误码">{{ infoObject.errorCode }}</a-descriptions-item>
<a-descriptions-item label="告警描述"> <a-descriptions-item label="告警描述">
<div style="color: #2778ff">{{ infoObject.alarmTitle }}</div> <div style="color: rgba(255, 118, 54, 1)">{{ infoObject.alarmTitle }}</div>
{{ infoObject.abnormalDescription }}</a-descriptions-item {{ infoObject.abnormalDescription }}</a-descriptions-item
> >
<a-descriptions-item label="设备信息"> {{ infoObject.deviceInfo }} </a-descriptions-item> <a-descriptions-item label="设备信息"> {{ infoObject.deviceInfo }} </a-descriptions-item>
@ -291,15 +292,18 @@
font-size: @font-size-base; font-size: @font-size-base;
border-bottom: 1px solid @primary-color; border-bottom: 1px solid @primary-color;
} }
.card { .boxstyle {
position: absolute; width: 100%;
left: 0px;
top: 0px;
width: 5px;
height: 35px; height: 35px;
background-color: @primary-color; display: flex;
position: relative;
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 700;
} }
:deep(.ant-descriptions-item-label) { :deep(.ant-descriptions-item-label) {
width: 25%; width: 134px;
text-align: center;
font-weight: 700;
} }
</style> </style>

24
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/look.vue

@ -11,11 +11,12 @@
<div style="width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden"> <div style="width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden">
<!-- top --> <!-- top -->
<div class="boxstyle"> <div class="boxstyle">
<div class="card"></div> <div
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px"> class="ns-title-extra-box"
style="left: 25px; position: absolute; height: 35px; line-height: 30px">
告警编号{{ infoObject.alarmCode }} 告警编号{{ infoObject.alarmCode }}
</div> </div>
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px"> <div style="right: 30px; position: absolute; height: 35px; line-height: 30px">
{{ infoObject.updateTime }} {{ infoObject.updateTime }}
</div> </div>
</div> </div>
@ -276,18 +277,13 @@
height: 35px; height: 35px;
display: flex; display: flex;
position: relative; position: relative;
font-size: @font-size-base; color: rgba(51, 51, 51, 1);
border-bottom: 1px solid @primary-color; font-size: 16px;
} font-weight: 700;
.card {
position: absolute;
left: 0px;
top: 0px;
width: 5px;
height: 35px;
background-color: @primary-color;
} }
:deep(.ant-descriptions-item-label) { :deep(.ant-descriptions-item-label) {
width: 25%; width: 134px;
text-align: center;
font-weight: 700;
} }
</style> </style>

130
hx-ai-intelligent/src/view/equipmentControl/liftSystem/index.vue

@ -29,9 +29,17 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted, onUnmounted } from 'vue';
import liftInfo from './liftInfo.vue'; import liftInfo from './liftInfo.vue';
import liftPage from './liftPage.vue'; import liftPage from './liftPage.vue';
import { liftSystemApi } from '/@/api/liftSystem';
import { http } from '/nerv-lib/util';
//
import { items } from '/@/store/item';
//
const state = items();
//
import { liftPosition, longPosition } from './liftPosition';
// //
// //
@ -42,85 +50,53 @@
const selctLeft = ref({}); const selctLeft = ref({});
// table ref // table ref
const leftPage = ref(null); const leftPage = ref(null);
const liftBox = ref([]);
// ===========================================================
onMounted(() => {});
// tab ======================================================== // tab ========================================================
const liftBox = ref([ //
{ const getList = () => {
name: '1站台西侧扶梯', let leftIndex = 0;
workState: 1, let longIndex = 0;
faultState: 2, http
direction: 1, .get(liftSystemApi.getDeviceState, {
type: 2, projectId: state.projectId,
isLeft: true, siteId: state.siteId,
styleText: { left: '10%', bottom: '33%' }, floor: 1,
}, })
{ .then((res) => {
name: '2站台西侧扶梯', let data = [];
workState: 1, res.data.forEach((item: any) => {
faultState: 2, //
direction: 1, if (item.record.deviceId.includes('0301')) {
type: 2, data.push({
isLeft: true, ...item,
styleText: { left: '3%', bottom: '52%' }, type: 2, //
}, isLeft: true, //
{ styleText: liftPosition()[leftIndex++],
name: '2站台东侧扶梯', });
workState: 1, } else {
faultState: 2, data.push({
direction: 1, ...item,
type: 2,
isLeft: true,
styleText: { left: '48%', bottom: '69%' },
},
{
name: '1站台东侧扶梯',
workState: 1,
faultState: 2,
direction: 1,
type: 2,
isLeft: true,
styleText: { left: '65%', bottom: '62%' },
},
{
name: '办公东区扶梯',
workState: 1,
faultState: 2,
direction: 1,
type: 2,
isLeft: true,
styleText: { left: '78%', bottom: '42%' },
},
{
name: '办公西区扶梯',
workState: 1,
faultState: 2,
direction: 1,
type: 2,
isLeft: true,
styleText: { left: '15%', bottom: '15%' },
},
{
name: '1站台直梯',
workState: 0,
faultState: 3,
direction: 0,
type: 1,
isLeft: false,
styleText: { left: '35%', bottom: '50%' },
},
{
name: '2站台直梯',
workState: 0,
faultState: 3,
direction: 0,
type: 1, type: 1,
isLeft: false, isLeft: false,
styleText: { left: '52%', bottom: '52%' }, styleText: longPosition()[longIndex++],
}, });
]); }
});
console.log(data);
liftBox.value = data;
});
};
//
const intervalId = setInterval(getList, 60000);
// ===========================================================
onMounted(() => {
getList();
});
//
onUnmounted(() => {
//
clearInterval(intervalId);
});
// //
const clickLift = (item: any) => { const clickLift = (item: any) => {
visible.value = true; visible.value = true;

42
hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue

@ -7,7 +7,7 @@
<div class="info-box"> <div class="info-box">
<div class="box-title"> <div class="box-title">
<div class="dot"></div> <div class="dot"></div>
<span>{{ info.name }}</span> <span>{{ info.deviceInfoName }}</span>
</div> </div>
<div class="box-inner"> <div class="box-inner">
<!-- 是否开启 --> <!-- 是否开启 -->
@ -15,13 +15,16 @@
<div class="item-box"> <div class="item-box">
<div class="icon"> <div class="icon">
<div class="icon-item"> <div class="icon-item">
<img v-if="info.workState" src="../image/liftState/switch-on.svg" alt="" /> <img
v-if="info.record.switchStatus.value === 1"
src="../image/liftState/switch-on.svg"
alt="" />
<img v-else src="../image/liftState/switch-off.svg" alt="" /> <img v-else src="../image/liftState/switch-off.svg" alt="" />
</div> </div>
</div> </div>
</div> </div>
<div class="item-text"> <div class="item-text">
<span v-if="info.workState" style="color: var(--on)">开启</span> <span v-if="info.record.switchStatus.value === 1" style="color: var(--on)">开启</span>
<span v-else style="color: var(--off)">关闭</span> <span v-else style="color: var(--off)">关闭</span>
</div> </div>
</div> </div>
@ -33,7 +36,9 @@
<div class="icon-item"> <div class="icon-item">
<img <img
:src=" :src="
{ '0': stateNormal, '1': stateRepair, '2': stateFault, '3': stateAlarm }[3] { '0': stateNormal, '1': stateFault, '2': stateRepair, '3': stateAlarm }[
info.record.runStatus.value
]
" "
alt="" /> alt="" />
</div> </div>
@ -44,12 +49,12 @@
:style="{ :style="{
color: { color: {
'0': 'rgba(0, 255, 210, 1)', // '0': 'rgba(0, 255, 210, 1)', //
'1': 'rgba(255, 188, 70, 1)', // '1': 'rgba(255, 118, 54, 1)', //
'2': 'rgba(255, 118, 54, 1)', // '2': 'rgba(255, 188, 70, 1)', //
'3': 'rgba(243, 97, 99, 1)', // '3': 'rgba(243, 97, 99, 1)', //
}[3], }[info.record.runStatus.value],
}" }"
>{{ { '0': '正常', '1': '维修', '2': '故障', '3': '告警' }[3] }}</div >{{ info.record.runStatus.label }}</div
> >
</div> </div>
<!-- 如何运行 --> <!-- 如何运行 -->
@ -66,7 +71,7 @@
'2': liftPause, '2': liftPause,
'3': liftStop, '3': liftStop,
'4': liftUnknown, '4': liftUnknown,
}[2] }[info.record.runMode.value]
" "
alt="" /> alt="" />
</div> </div>
@ -81,17 +86,9 @@
'2': 'rgba(255, 188, 70, 1)', // '2': 'rgba(255, 188, 70, 1)', //
'3': 'rgba(243, 97, 99, 1)', // '3': 'rgba(243, 97, 99, 1)', //
'4': 'rgba(167, 66, 255, 1)', // '4': 'rgba(167, 66, 255, 1)', //
}[2], }[info.record.runMode.value],
}" }"
>{{ >{{ info.record.runMode.label }}</div
{
'0': '上行', //
'1': '下行', //
'2': '暂停', //
'3': '急停', //
'4': '未知', //
}[2]
}}</div
> >
</div> </div>
</div> </div>
@ -189,19 +186,20 @@
.box-title { .box-title {
font-size: 14px; font-size: 14px;
height: auto; height: auto;
margin-left: 12px;
color: var(--text); color: var(--text);
// //
.dot { .dot {
display: inline-block; display: inline-block;
width: 2px; width: 2px;
height: 12px; height: 10px;
vertical-align: middle; vertical-align: middle;
margin-top: -4px; margin-top: -2.5px;
background: var(--text); background: var(--text);
} }
// //
span { span {
padding-left: 8px; padding-left: 4px;
} }
} }
// //

101
hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftPage.vue

@ -12,7 +12,7 @@
src="../image/liftState/escalator.png" src="../image/liftState/escalator.png"
alt="" /> alt="" />
<div style="margin-left: 6px; font-size: 20px; line-height: 28px"> <div style="margin-left: 6px; font-size: 20px; line-height: 28px">
{{ selctLeft.name }} {{ selctLeft.deviceInfoName }}
</div> </div>
</div> </div>
<!-- 左侧抽屉的关闭按钮 --> <!-- 左侧抽屉的关闭按钮 -->
@ -23,6 +23,7 @@
<a-table <a-table
style="width: 100%" style="width: 100%"
:columns="column" :columns="column"
:loading="loading"
:data-source="dataSource" :data-source="dataSource"
:pagination="pagination"> :pagination="pagination">
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
@ -31,15 +32,15 @@
style="background-color: rgba(0, 0, 0, 0.5); width: 50px" style="background-color: rgba(0, 0, 0, 0.5); width: 50px"
:style="{ :style="{
border: { border: {
'0': '1px solid rgba(0, 255, 210, 1)', //2 '1': '1px solid rgba(0, 255, 210, 1)', //2
'1': '1px solid rgba(191, 205, 226, 1)', // '0': '1px solid rgba(191, 205, 226, 1)', //
}[record.switch], }[record.switchStatus.value],
color: { color: {
'0': 'rgba(0, 255, 210, 1)', // '1': 'rgba(0, 255, 210, 1)', //
'1': 'rgba(191, 205, 226, 1)', // '0': 'rgba(191, 205, 226, 1)', //
}[record.switch], }[record.switchStatus.value],
}" }"
>{{ { '0': '开启', '1': '关闭' }[record.switch] }}</a-tag >{{ { '1': '开启', '0': '关闭' }[record.switchStatus.value] }}</a-tag
> >
</template> </template>
<template v-if="column.dataIndex === 'state'"> <template v-if="column.dataIndex === 'state'">
@ -48,18 +49,18 @@
:style="{ :style="{
border: { border: {
'0': '1px solid rgba(0, 255, 210, 1)', // '0': '1px solid rgba(0, 255, 210, 1)', //
'1': '1px solid rgba(255, 188, 70, 1)', // '1': '1px solid rgba(255, 118, 54, 1)', //
'2': '1px solid rgba(255, 118, 54, 1)', // '2': '1px solid rgba(255, 188, 70, 1)', //
'3': '1px solid rgba(243, 97, 99, 1)', // '3': '1px solid rgba(243, 97, 99, 1)', //
}[record.state], }[record.runStatus.value],
color: { color: {
'0': 'rgba(0, 255, 210, 1)', // '0': 'rgba(0, 255, 210, 1)', //
'1': 'rgba(255, 188, 70, 1)', // '1': 'rgba(255, 118, 54, 1)', //
'2': 'rgba(255, 118, 54, 1)', // '2': 'rgba(255, 188, 70, 1)', //
'3': 'rgba(243, 97, 99, 1)', // '3': 'rgba(243, 97, 99, 1)', //
}[record.state], }[record.runStatus.value],
}" }"
>{{ { '0': '正常', '1': '维修', '2': '故障', '3': '告警' }[record.state] }}</a-tag >{{ record.runStatus.label }}</a-tag
> >
</template> </template>
<template v-if="column.dataIndex === 'lift'"> <template v-if="column.dataIndex === 'lift'">
@ -72,24 +73,16 @@
'2': '1px solid rgba(255, 188, 70, 1)', // '2': '1px solid rgba(255, 188, 70, 1)', //
'3': '1px solid rgba(243, 97, 99, 1)', // '3': '1px solid rgba(243, 97, 99, 1)', //
'4': '1px solid rgba(167, 66, 255, 1)', // '4': '1px solid rgba(167, 66, 255, 1)', //
}[record.lift], }[record.runMode.value],
color: { color: {
'0': 'rgba(0, 255, 210, 1)', // '0': 'rgba(0, 255, 210, 1)', //
'1': 'rgba(0, 255, 210, 1)', // '1': 'rgba(0, 255, 210, 1)', //
'2': 'rgba(255, 188, 70, 1)', // '2': 'rgba(255, 188, 70, 1)', //
'3': 'rgba(243, 97, 99, 1)', // '3': 'rgba(243, 97, 99, 1)', //
'4': 'rgba(167, 66, 255, 1)', // '4': 'rgba(167, 66, 255, 1)', //
}[record.lift], }[record.runMode.value],
}" }"
>{{ >{{ record.runMode.label }}</a-tag
{
'0': '上行', //
'1': '下行', //
'2': '暂停', //
'3': '急停', //
'4': '未知', //
}[record.lift]
}}</a-tag
> >
</template> </template>
</template> </template>
@ -99,38 +92,25 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { DoubleRightOutlined } from '@ant-design/icons-vue'; import { DoubleRightOutlined } from '@ant-design/icons-vue';
import { liftSystemApi } from '/@/api/liftSystem';
import { http } from '/nerv-lib/util';
//
import { items } from '/@/store/item';
//
const state = items();
import { ref } from 'vue'; import { ref } from 'vue';
const emit = defineEmits(['clickDrawer']); const emit = defineEmits(['clickDrawer']);
const selctLeft = ref({}); const selctLeft = ref({});
const loading = ref(false);
// //
const handleChangePage = (current: number, pageSize: number) => { const handleChangePage = (current: number, pageSize: number) => {
pagination.value.current = current; pagination.value.current = current;
pagination.value.pageSize = pageSize; pagination.value.pageSize = pageSize;
getList();
}; };
const dataSource = ref([ const dataSource = ref([]);
{ time: '2022-03-01 10:00:00', state: '0', switch: '0', lift: 1 },
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 2 },
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 0 },
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 3 },
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '0', switch: 0, lift: 4 },
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 0 },
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 3 },
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '0', switch: 0, lift: 4 },
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 },
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 2 },
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 },
]);
const pagination = ref({ const pagination = ref({
total: dataSource.value.length, total: dataSource.value.length,
size: 'small', size: 'small',
@ -169,9 +149,31 @@
width: 80, width: 80,
}, },
]; ];
const getList = () => {
loading.value = true;
http
.get(liftSystemApi.getDeviceRecordList, {
projectId: state.projectId,
siteId: state.siteId,
codeList: selctLeft.value.record.deviceInfoCode,
page: pagination.value.current,
size: pagination.value.pageSize,
})
.then((res) => {
if (res.msg === 'success') {
dataSource.value = res.data.data;
pagination.value.total = res.data.total;
}
})
.finally(() => {
loading.value = false;
});
};
const toggle = (data: any) => { const toggle = (data: any) => {
pagination.value.current = 1; pagination.value.current = 1;
selctLeft.value = data; selctLeft.value = data;
getList();
}; };
const clickDrawer = () => { const clickDrawer = () => {
emit('clickDrawer'); emit('clickDrawer');
@ -278,4 +280,7 @@
:deep(.anticon) { :deep(.anticon) {
color: #fff !important; color: #fff !important;
} }
:deep(.ant-empty-description) {
color: white !important;
}
</style> </style>

20
hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftPosition.ts

@ -1,3 +1,21 @@
// 此文件只定义lift(即电梯)的位置信息 // 此文件只定义lift(即电梯)的位置信息
// 与显示状态和分组信息无关 // 与显示状态和分组信息无关
export const liftPosition = [];
export const liftPosition = () => {
return [
{ left: '10%', bottom: '33%' },
{ left: '3%', bottom: '52%' },
{ left: '48%', bottom: '69%' },
{ left: '65%', bottom: '62%' },
{ left: '78%', bottom: '42%' },
{ left: '15%', bottom: '15%' },
];
};
export const longPosition = () => {
return [
{ left: '35%', bottom: '50%' },
{ left: '52%', bottom: '52%' },
{ left: '35%', bottom: '50%' },
{ left: '52%', bottom: '52%' },
];
};

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

@ -35,6 +35,13 @@
title: '编辑', title: '编辑',
schemas: [ schemas: [
{ field: 'id', component: 'NsInput', show: false }, { field: 'id', component: 'NsInput', show: false },
{ field: 'siteId', component: 'NsInput', show: false },
{ field: 'planCode', component: 'NsInput', show: false },
{ field: 'planGroupCode', component: 'NsInput', show: false },
{ field: 'planGroupName', component: 'NsInput', show: false },
{ field: 'planName', component: 'NsInput', show: false },
{ field: 'projectId', component: 'NsInput', show: false },
{ field: 'deviceType', component: 'NsInput', show: false },
{ field: 'orgId', component: 'NsInput', show: false }, { field: 'orgId', component: 'NsInput', show: false },
{ {
field: 'createTime', field: 'createTime',
@ -157,11 +164,14 @@
name: 'energyAlarmEdit', name: 'energyAlarmEdit',
dynamicParams: ['uuid', 'appealType'], dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => { handle: (data: any) => {
if (data?.executeStatus?.value === 2) {
NsMessage.warning('当前计划正在执行,无法进行编辑。如需编辑,请先停止计划.');
} else {
const obj = { ...data }; const obj = { ...data };
nsModalFormConfig.value.title = '编辑'; nsModalFormConfig.value.title = '编辑';
setTimeout(() => { setTimeout(() => {
nsModalFormConfig.value.data = { nsModalFormConfig.value.data = {
id: obj.id, ...obj,
}; };
if (obj.startTime) { if (obj.startTime) {
nsModalFormConfig.value.data.createTime = obj.startTime nsModalFormConfig.value.data.createTime = obj.startTime
@ -170,6 +180,7 @@
} }
}, 1); }, 1);
modalFormRef.value?.toggle(); modalFormRef.value?.toggle();
}
}, },
}, },
{ {

Loading…
Cancel
Save