fix: 对接电动门接口 电梯接口

This commit is contained in:
zhaohy
2024-08-19 16:15:37 +08:00
parent 45d914b16e
commit 580d82639d
9 changed files with 215 additions and 205 deletions

View File

@@ -35,6 +35,13 @@
title: '编辑',
schemas: [
{ 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: 'createTime',
@@ -157,19 +164,23 @@
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();
if (data?.executeStatus?.value === 2) {
NsMessage.warning('当前计划正在执行,无法进行编辑。如需编辑,请先停止计划.');
} else {
const obj = { ...data };
nsModalFormConfig.value.title = '编辑';
setTimeout(() => {
nsModalFormConfig.value.data = {
...obj,
};
if (obj.startTime) {
nsModalFormConfig.value.data.createTime = obj.startTime
? [obj.startTime, obj.endTime]
: [];
}
}, 1);
modalFormRef.value?.toggle();
}
},
},
{