获取所有平台端物模型信息

This commit is contained in:
ChenYi 2026-01-28 17:29:07 +08:00
parent 45055cdfef
commit f7c939d9ed
5 changed files with 64 additions and 7 deletions

View File

@ -156,6 +156,24 @@ export const AggregateRouteConfigSchema = {
additionalProperties: false additionalProperties: false
} as const; } as const;
export const AllPlatformThingModelOutputSchema = {
type: 'object',
properties: {
standardFieldName: {
type: 'string',
description: '管理后台产品标准的物模型属性或者事件名称',
nullable: true
},
standardFieldDisplayName: {
type: 'string',
description: '标准物模型字段显示名称',
nullable: true
}
},
additionalProperties: false,
description: '平台端物模型输出'
} as const;
export const ApplicationApiDescriptionModelSchema = { export const ApplicationApiDescriptionModelSchema = {
type: 'object', type: 'object',
properties: { properties: {

File diff suppressed because one or more lines are too long

View File

@ -51,6 +51,20 @@ export type AggregateRouteConfig = {
jsonPath?: (string) | null; jsonPath?: (string) | null;
}; };
/**
*
*/
export type AllPlatformThingModelOutput = {
/**
*
*/
standardFieldName?: (string) | null;
/**
*
*/
standardFieldDisplayName?: (string) | null;
};
export type ApplicationApiDescriptionModel = { export type ApplicationApiDescriptionModel = {
modules?: { modules?: {
[key: string]: ModuleApiDescriptionModel; [key: string]: ModuleApiDescriptionModel;
@ -7321,6 +7335,10 @@ export type PostIoTplatformThingModelInfoPageAsyncResponse = (IoTPlatformThingMo
export type PostIoTplatformThingModelInfoPageAsyncError = unknown; export type PostIoTplatformThingModelInfoPageAsyncError = unknown;
export type PostIoTplatformThingModelInfoGetAllPlatformThingModelAsyncResponse = (Array<AllPlatformThingModelOutput>);
export type PostIoTplatformThingModelInfoGetAllPlatformThingModelAsyncError = unknown;
export type PostIoTplatformThingModelInfoStandardThingModelPageAsyncResponse = (Array<DataDictionaryDetailInfoDto>); export type PostIoTplatformThingModelInfoStandardThingModelPageAsyncResponse = (Array<DataDictionaryDetailInfoDto>);
export type PostIoTplatformThingModelInfoStandardThingModelPageAsyncError = unknown; export type PostIoTplatformThingModelInfoStandardThingModelPageAsyncError = unknown;

View File

@ -347,7 +347,11 @@ const commandTableColumns = computed(() => [
customRender: ({ record }: any) => { customRender: ({ record }: any) => {
// r // r
if (record.accessMode === 'r') { if (record.accessMode === 'r') {
return h('span', { style: { color: '#999' } }, '只读属性,无法设置指令'); return h(
'span',
{ style: { color: '#999' } },
'只读属性,无法设置指令',
);
} }
const dataType = record.ioTPlatformRawFieldDataType; const dataType = record.ioTPlatformRawFieldDataType;
@ -362,7 +366,7 @@ const commandTableColumns = computed(() => [
if (isNumeric && val !== '') { if (isNumeric && val !== '') {
// //
// //
const numericRegex = /^-?\d*\.?\d*$/; const numericRegex = /^-?\d*(?:\.\d*)?$/;
if (!numericRegex.test(val)) { if (!numericRegex.test(val)) {
return; // return; //
} }
@ -620,7 +624,9 @@ const submitBatchCommand = async () => {
); );
if (selectedProperties.length === 0) { if (selectedProperties.length === 0) {
Message.warning('请至少选择一个已填写指令内容的可写属性(只读属性无法发送指令)'); Message.warning(
'请至少选择一个已填写指令内容的可写属性(只读属性无法发送指令)',
);
return; return;
} }
@ -1662,9 +1668,7 @@ const submitBatchRead = async () => {
// w // w
const selectedProperties = thingModelProperties.value.filter( const selectedProperties = thingModelProperties.value.filter(
(prop) => (prop) =>
prop.selected && prop.selected && prop.ioTPlatformRawFieldName && prop.accessMode !== 'w', //
prop.ioTPlatformRawFieldName &&
prop.accessMode !== 'w', //
); );
if (selectedProperties.length === 0) { if (selectedProperties.length === 0) {
@ -2217,6 +2221,12 @@ const toolbarActions = computed(() => [
{{ row.ioTPlatformName }} {{ row.ioTPlatformName }}
</span> </span>
</template> </template>
<template #readingMode="{ row }">
<component :is="h(Tag, { color: row.readingMode === 1 ? 'green' : 'orange' }, () =>
row.readingMode === 1 ? '标准模式' : '特殊模式',
)
" />
</template>
<template #action="{ row }"> <template #action="{ row }">
<div style="display: flex; gap: 8px; align-items: center"> <div style="display: flex; gap: 8px; align-items: center">

View File

@ -184,6 +184,7 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
field: 'readingModeName', field: 'readingModeName',
title: $t('abp.deviceInfos.readingMode'), title: $t('abp.deviceInfos.readingMode'),
minWidth: '150', minWidth: '150',
slots: { default: 'readingMode' },
}, },
{ {
field: 'platformPassword', field: 'platformPassword',