修复产品添加时物模型文件添加失败的问题
This commit is contained in:
parent
283dd8b3f4
commit
58cb11fa2d
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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({
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -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 });
|
||||||
|
|||||||
@ -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 });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user