fix: 修复设备功能-执行包含object类型时异常

This commit is contained in:
XieYongHong 2023-10-23 11:51:17 +08:00
parent 057de400fe
commit 70a1cf2197
1 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ const newFunctions = computed(() => {
required: tableItem.expands?.required required: tableItem.expands?.required
}); });
} }
result.push({ result.push({
...func, ...func,
table: array, table: array,
@ -197,7 +197,7 @@ const handleExecute = async (func: any) => {
.then(async () => { .then(async () => {
const obj = {}; const obj = {};
func.table.forEach((item: any) => { func.table.forEach((item: any) => {
if (item.type === 'object') { if (item.type === 'object' && item.value) {
obj[item.id] = JSON.parse(item.value); obj[item.id] = JSON.parse(item.value);
} else { } else {
obj[item.id] = item.value; obj[item.id] = item.value;