修复
This commit is contained in:
parent
2874160e45
commit
68ff5db53f
@ -100,7 +100,6 @@ const editRow: Record<string, any> = ref({});
|
|||||||
// 跟踪数据状态,用于控制按钮显示
|
// 跟踪数据状态,用于控制按钮显示
|
||||||
const hasData = ref(true);
|
const hasData = ref(true);
|
||||||
|
|
||||||
|
|
||||||
const [ThingModelModal, thingModelModalApi] = useVbenModal({
|
const [ThingModelModal, thingModelModalApi] = useVbenModal({
|
||||||
draggable: true,
|
draggable: true,
|
||||||
footer: true,
|
footer: true,
|
||||||
@ -278,7 +277,7 @@ const openCopyAnotherThingModelModal = async () => {
|
|||||||
console.log('打开复制模态框,当前props:', {
|
console.log('打开复制模态框,当前props:', {
|
||||||
productId: props.productId,
|
productId: props.productId,
|
||||||
productName: props.productName,
|
productName: props.productName,
|
||||||
ioTPlatform: props.ioTPlatform
|
ioTPlatform: props.ioTPlatform,
|
||||||
});
|
});
|
||||||
copyModalApi.open();
|
copyModalApi.open();
|
||||||
};
|
};
|
||||||
@ -289,14 +288,14 @@ async function submitCopy() {
|
|||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
|
|
||||||
const formValues = await copyFormApi.getValues();
|
const formValues = await copyFormApi.getValues();
|
||||||
|
|
||||||
console.log('复制提交参数:', {
|
console.log('复制提交参数:', {
|
||||||
formValues,
|
formValues,
|
||||||
props: {
|
props: {
|
||||||
productId: props.productId,
|
productId: props.productId,
|
||||||
productName: props.productName,
|
productName: props.productName,
|
||||||
ioTPlatform: props.ioTPlatform
|
ioTPlatform: props.ioTPlatform,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -365,7 +364,6 @@ function closeModal() {
|
|||||||
emit('update:visible', false);
|
emit('update:visible', false);
|
||||||
emit('close');
|
emit('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -437,7 +435,7 @@ function closeModal() {
|
|||||||
<ThingModelModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
<ThingModelModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
||||||
<component :is="editRow.id ? EditForm : AddForm" />
|
<component :is="editRow.id ? EditForm : AddForm" />
|
||||||
</ThingModelModal>
|
</ThingModelModal>
|
||||||
|
|
||||||
<!-- 复制已有模型模态框 -->
|
<!-- 复制已有模型模态框 -->
|
||||||
<CopyModal title="复制已有模型" class="w-[600px]">
|
<CopyModal title="复制已有模型" class="w-[600px]">
|
||||||
<CopyForm />
|
<CopyForm />
|
||||||
|
|||||||
@ -354,7 +354,7 @@ export const editThingModelFormSchema = computed(() => [
|
|||||||
return items.map((item: any) => ({
|
return items.map((item: any) => ({
|
||||||
...item,
|
...item,
|
||||||
// 使用secondValue的小写版本作为value,保持label为原始value
|
// 使用secondValue的小写版本作为value,保持label为原始value
|
||||||
value: item.secondValue || item.value?.toLowerCase(),
|
value: item.secondValue || item.value,
|
||||||
label: item.value, // 显示文本
|
label: item.value, // 显示文本
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user