修复产品添加时物模型文件添加失败的问题

This commit is contained in:
ChenYi 2025-08-22 15:02:58 +08:00
parent 283dd8b3f4
commit 58cb11fa2d
6 changed files with 25 additions and 16 deletions

View File

@ -30,9 +30,9 @@ VITE_REFRESH_ROLE = true
# 后端接口地址 # 后端接口地址
#VITE_APP_API_ADDRESS=http://47.110.53.196:28080 #VITE_APP_API_ADDRESS=http://47.110.53.196:28080
VITE_APP_API_ADDRESS=http://localhost:10500 VITE_APP_API_ADDRESS=http://10.10.70.11:10500
# websocket地址 # websocket地址
VITE_WEBSOCKET_URL=http://localhost:10500/signalr/notification VITE_WEBSOCKET_URL=http://10.10.70.11:10500/signalr/notification

View File

@ -1,3 +1,9 @@
/*
* @Description:
* @Author:
* @Date: 2025-06-19 15:33:54
* @LastEditors:
*/
import { defineConfig } from '@hey-api/openapi-ts'; import { defineConfig } from '@hey-api/openapi-ts';
export default defineConfig({ export default defineConfig({

View File

@ -5169,9 +5169,14 @@ export const OneNetProductInfoInsertInputSchema = {
description: 'TLS通讯服务地址', description: 'TLS通讯服务地址',
nullable: true nullable: true
}, },
deviceThingModelUrl: { deviceThingModelFileId: {
type: 'string', type: 'string',
description: '物模型文件链接', description: '设备物模型文件Id',
nullable: true
},
deviceThingModelFileName: {
type: 'string',
description: '设备物模型文件名称',
nullable: true nullable: true
} }
}, },
@ -5295,10 +5300,6 @@ export const OpenApiRequestSchema = {
type: 'string', type: 'string',
description: '消息内容JSON字符串,具体的设备相关信息', description: '消息内容JSON字符串,具体的设备相关信息',
nullable: true nullable: true
},
encrypted: {
type: 'boolean',
description: '是否加密'
} }
}, },
additionalProperties: false, additionalProperties: false,

View File

@ -2499,9 +2499,13 @@ export type OneNetProductInfoInsertInput = {
*/ */
communicationAddressTLS?: (string) | null; communicationAddressTLS?: (string) | null;
/** /**
* * Id
*/ */
deviceThingModelUrl?: (string) | null; deviceThingModelFileId?: (string) | null;
/**
*
*/
deviceThingModelFileName?: (string) | null;
}; };
export type OneNetProductInfoListInput = { export type OneNetProductInfoListInput = {
@ -2596,10 +2600,6 @@ export type OpenApiRequest = {
* JSON字符串, * JSON字符串,
*/ */
msg?: (string) | null; msg?: (string) | null;
/**
*
*/
encrypted?: boolean;
}; };
/** /**

View File

@ -172,7 +172,8 @@ async function submit() {
const fileInfo = result.data?.[0]; const fileInfo = result.data?.[0];
if (fileInfo && fileInfo.id) { if (fileInfo && fileInfo.id) {
formValues.deviceThingModelFileId = fileInfo.id; formValues.deviceThingModelFileId = fileInfo.id;
// //
formValues.deviceThingModelFileName = fileInfo.fileName || selectedFile.name;
} else { } else {
Message.error('文件上传成功但未获取到文件ID'); Message.error('文件上传成功但未获取到文件ID');
userModalApi.setState({ loading: false, confirmLoading: false }); userModalApi.setState({ loading: false, confirmLoading: false });

View File

@ -172,7 +172,8 @@ async function submit() {
const fileInfo = result.data?.[0]; const fileInfo = result.data?.[0];
if (fileInfo && fileInfo.id) { if (fileInfo && fileInfo.id) {
formValues.deviceThingModelFileId = fileInfo.id; formValues.deviceThingModelFileId = fileInfo.id;
// //
formValues.deviceThingModelFileName = fileInfo.fileName || selectedFile.name;
} else { } else {
Message.error('文件上传成功但未获取到文件ID'); Message.error('文件上传成功但未获取到文件ID');
userModalApi.setState({ loading: false, confirmLoading: false }); userModalApi.setState({ loading: false, confirmLoading: false });