优化设备信息
This commit is contained in:
parent
f7c939d9ed
commit
caf28b0ad7
@ -36,9 +36,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://10.10.10.103:10500
|
VITE_APP_API_ADDRESS=http://10.10.10.104:10500
|
||||||
|
|
||||||
# websocket地址
|
# websocket地址
|
||||||
VITE_WEBSOCKET_URL=http://10.10.10.103:10500/signalr/notification
|
VITE_WEBSOCKET_URL=http://10.10.10.104:10500/signalr/notification
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -220,6 +220,7 @@
|
|||||||
"thingModelInfoManage": "ThingModelInfoManage",
|
"thingModelInfoManage": "ThingModelInfoManage",
|
||||||
"isNeedConfigDeviceModel": "IsNeedConfigDeviceModel",
|
"isNeedConfigDeviceModel": "IsNeedConfigDeviceModel",
|
||||||
"readingMode": "ReadingMode",
|
"readingMode": "ReadingMode",
|
||||||
|
"deviceType": "DeviceType",
|
||||||
"deviceThingModelName": "ThingModelInfoManage"
|
"deviceThingModelName": "ThingModelInfoManage"
|
||||||
},
|
},
|
||||||
"thingModelInfos": {
|
"thingModelInfos": {
|
||||||
|
|||||||
@ -212,6 +212,7 @@
|
|||||||
"deviceInfoManage": "设备管理",
|
"deviceInfoManage": "设备管理",
|
||||||
"thingModelInfoManage": "物模型管理",
|
"thingModelInfoManage": "物模型管理",
|
||||||
"isNeedConfigDeviceModel": "是否绑定设备模型",
|
"isNeedConfigDeviceModel": "是否绑定设备模型",
|
||||||
|
"deviceType": "设备类型",
|
||||||
"readingMode": "抄读模式",
|
"readingMode": "抄读模式",
|
||||||
"deviceThingModelName": "设备物模型名称"
|
"deviceThingModelName": "设备物模型名称"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2280,7 +2280,10 @@ const toolbarActions = computed(() => [
|
|||||||
<UserModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
<UserModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
||||||
<component :is="editRow.id ? EditForm : AddForm" />
|
<component :is="editRow.id ? EditForm : AddForm" />
|
||||||
</UserModal>
|
</UserModal>
|
||||||
<CommandModal title="设备操作" class="w-[1200px]">
|
<CommandModal
|
||||||
|
:title="`设备操作 - ${commandRow.deviceName || commandRow.deviceAddress || ''}`"
|
||||||
|
class="w-[1200px]"
|
||||||
|
>
|
||||||
<div v-if="thingModelLoading" style="padding: 40px; text-align: center">
|
<div v-if="thingModelLoading" style="padding: 40px; text-align: center">
|
||||||
<Loading :loading="true" tip="加载物模型属性中..." />
|
<Loading :loading="true" tip="加载物模型属性中..." />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -131,6 +131,11 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
|
|||||||
title: $t('common.BelongingProductName'),
|
title: $t('common.BelongingProductName'),
|
||||||
minWidth: '150',
|
minWidth: '150',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'deviceTypeName',
|
||||||
|
title: $t('abp.deviceInfos.deviceType'),
|
||||||
|
minWidth: '150',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'deviceName',
|
field: 'deviceName',
|
||||||
title: $t('abp.deviceInfos.deviceName'),
|
title: $t('abp.deviceInfos.deviceName'),
|
||||||
@ -219,6 +224,44 @@ export const addDeviceFormSchema: any = computed(() => [
|
|||||||
message: `${$t('common.pleaseInput')}${$t('abp.deviceInfos.deviceAddress')}`,
|
message: `${$t('common.pleaseInput')}${$t('abp.deviceInfos.deviceAddress')}`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
component: 'ApiSelect',
|
||||||
|
fieldName: 'deviceType',
|
||||||
|
label: $t('abp.deviceInfos.deviceType'),
|
||||||
|
componentProps: {
|
||||||
|
api: getCommonGetSelectList,
|
||||||
|
params: {
|
||||||
|
query: {
|
||||||
|
typeName: 'DeviceTypeEnum',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
labelField: 'value',
|
||||||
|
valueField: 'key',
|
||||||
|
optionsPropName: 'options',
|
||||||
|
immediate: true,
|
||||||
|
allowClear: true,
|
||||||
|
placeholder: $t('common.pleaseSelect') + $t('abp.deviceInfos.deviceType'),
|
||||||
|
afterFetch: (res: any) => {
|
||||||
|
// 确保返回的是数组格式
|
||||||
|
if (Array.isArray(res)) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
// 如果是包装在 items 中的,提取出来
|
||||||
|
if (res && Array.isArray(res.items)) {
|
||||||
|
return res.items;
|
||||||
|
}
|
||||||
|
// 如果是包装在 data 中的,提取出来
|
||||||
|
if (res && Array.isArray(res.data)) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
// 如果都不是,返回空数组
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: z.string().min(1, {
|
||||||
|
message: `${$t('common.pleaseSelect')}${$t('abp.deviceInfos.deviceType')}`,
|
||||||
|
}),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
fieldName: 'ioTPlatform',
|
fieldName: 'ioTPlatform',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user