获取所有平台端物模型信息
This commit is contained in:
parent
45055cdfef
commit
f7c939d9ed
@ -156,6 +156,24 @@ export const AggregateRouteConfigSchema = {
|
||||
additionalProperties: false
|
||||
} 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 = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -51,6 +51,20 @@ export type AggregateRouteConfig = {
|
||||
jsonPath?: (string) | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 平台端物模型输出
|
||||
*/
|
||||
export type AllPlatformThingModelOutput = {
|
||||
/**
|
||||
* 管理后台产品标准的物模型属性或者事件名称
|
||||
*/
|
||||
standardFieldName?: (string) | null;
|
||||
/**
|
||||
* 标准物模型字段显示名称
|
||||
*/
|
||||
standardFieldDisplayName?: (string) | null;
|
||||
};
|
||||
|
||||
export type ApplicationApiDescriptionModel = {
|
||||
modules?: {
|
||||
[key: string]: ModuleApiDescriptionModel;
|
||||
@ -7321,6 +7335,10 @@ export type PostIoTplatformThingModelInfoPageAsyncResponse = (IoTPlatformThingMo
|
||||
|
||||
export type PostIoTplatformThingModelInfoPageAsyncError = unknown;
|
||||
|
||||
export type PostIoTplatformThingModelInfoGetAllPlatformThingModelAsyncResponse = (Array<AllPlatformThingModelOutput>);
|
||||
|
||||
export type PostIoTplatformThingModelInfoGetAllPlatformThingModelAsyncError = unknown;
|
||||
|
||||
export type PostIoTplatformThingModelInfoStandardThingModelPageAsyncResponse = (Array<DataDictionaryDetailInfoDto>);
|
||||
|
||||
export type PostIoTplatformThingModelInfoStandardThingModelPageAsyncError = unknown;
|
||||
|
||||
@ -347,7 +347,11 @@ const commandTableColumns = computed(() => [
|
||||
customRender: ({ record }: any) => {
|
||||
// 只读模式(r)时隐藏指令内容输入框
|
||||
if (record.accessMode === 'r') {
|
||||
return h('span', { style: { color: '#999' } }, '只读属性,无法设置指令');
|
||||
return h(
|
||||
'span',
|
||||
{ style: { color: '#999' } },
|
||||
'只读属性,无法设置指令',
|
||||
);
|
||||
}
|
||||
|
||||
const dataType = record.ioTPlatformRawFieldDataType;
|
||||
@ -362,7 +366,7 @@ const commandTableColumns = computed(() => [
|
||||
if (isNumeric && val !== '') {
|
||||
// 允许数字、小数点、负号
|
||||
// 正则表达式:允许负号开头,然后是数字,可以有小数点和小数部分
|
||||
const numericRegex = /^-?\d*\.?\d*$/;
|
||||
const numericRegex = /^-?\d*(?:\.\d*)?$/;
|
||||
if (!numericRegex.test(val)) {
|
||||
return; // 不符合格式,不更新
|
||||
}
|
||||
@ -620,7 +624,9 @@ const submitBatchCommand = async () => {
|
||||
);
|
||||
|
||||
if (selectedProperties.length === 0) {
|
||||
Message.warning('请至少选择一个已填写指令内容的可写属性(只读属性无法发送指令)');
|
||||
Message.warning(
|
||||
'请至少选择一个已填写指令内容的可写属性(只读属性无法发送指令)',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1662,9 +1668,7 @@ const submitBatchRead = async () => {
|
||||
// 获取所有选中的行,排除只写模式(w)的属性
|
||||
const selectedProperties = thingModelProperties.value.filter(
|
||||
(prop) =>
|
||||
prop.selected &&
|
||||
prop.ioTPlatformRawFieldName &&
|
||||
prop.accessMode !== 'w', // 只写模式不能抄读
|
||||
prop.selected && prop.ioTPlatformRawFieldName && prop.accessMode !== 'w', // 只写模式不能抄读
|
||||
);
|
||||
|
||||
if (selectedProperties.length === 0) {
|
||||
@ -2217,6 +2221,12 @@ const toolbarActions = computed(() => [
|
||||
{{ row.ioTPlatformName }}
|
||||
</span>
|
||||
</template>
|
||||
<template #readingMode="{ row }">
|
||||
<component :is="h(Tag, { color: row.readingMode === 1 ? 'green' : 'orange' }, () =>
|
||||
row.readingMode === 1 ? '标准模式' : '特殊模式',
|
||||
)
|
||||
" />
|
||||
</template>
|
||||
|
||||
<template #action="{ row }">
|
||||
<div style="display: flex; gap: 8px; align-items: center">
|
||||
|
||||
@ -184,6 +184,7 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
|
||||
field: 'readingModeName',
|
||||
title: $t('abp.deviceInfos.readingMode'),
|
||||
minWidth: '150',
|
||||
slots: { default: 'readingMode' },
|
||||
},
|
||||
{
|
||||
field: 'platformPassword',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user