完善设备管理设计,展示对应的所属账号手机号
This commit is contained in:
parent
4185ad0d10
commit
a7c4a19eb5
@ -206,7 +206,13 @@
|
||||
"ioTPlatformProductName": "ProductName",
|
||||
"ioTPlatformAccountId": "AccountId",
|
||||
"ioTPlatformAccountName": "AccountName",
|
||||
"ioTPlatformResponse": "Response"
|
||||
"ioTPlatformResponse": "Response",
|
||||
"viewData": "Data",
|
||||
"onlineStatus": "OnlineStatus",
|
||||
"IsPlatformPushSuccess": "IsPlatformPushSuccess",
|
||||
"DeviceOnlineStatus": "DeviceOnlineStatus",
|
||||
"LastOnlineTime": "LastOnlineTime",
|
||||
"LastOfflineTime": "LastOfflineTime"
|
||||
},
|
||||
"IoTDBBase": {
|
||||
"IoTDataType": "IoTDataType",
|
||||
|
||||
@ -60,6 +60,7 @@
|
||||
"lastModificationTime": "LastModificationTime",
|
||||
"BelongingProductName": "Belonging ProductName",
|
||||
"BelongingAccountName": "BelongingAccountName",
|
||||
"BelongingIoTPlatform": "Belonging TPlatform",
|
||||
"AppId": "AppId",
|
||||
"AppKey": "AppKey",
|
||||
"AppSecret": "AppSecret"
|
||||
|
||||
@ -206,7 +206,13 @@
|
||||
"ioTPlatformProductName": "产品名称",
|
||||
"ioTPlatformAccountId": "所属账号Id",
|
||||
"ioTPlatformAccountName": "所属账号",
|
||||
"ioTPlatformResponse": "平台响应"
|
||||
"ioTPlatformResponse": "平台响应",
|
||||
"viewData": "数据",
|
||||
"onlineStatus": "在线状态",
|
||||
"IsPlatformPushSuccess": "是否推送成功",
|
||||
"DeviceOnlineStatus": "在线状态",
|
||||
"LastOnlineTime": "最后在线时间",
|
||||
"LastOfflineTime": "最后离线时间"
|
||||
},
|
||||
"IoTDBBase": {
|
||||
"IoTDataType": "数据类型",
|
||||
|
||||
@ -61,6 +61,7 @@
|
||||
"lastModificationTime": "最后更新时间",
|
||||
"BelongingProductName": "所属产品",
|
||||
"BelongingAccountName": "所属账号",
|
||||
"BelongingIoTPlatform": "所属平台",
|
||||
"AppId": "应用Id",
|
||||
"AppKey": "应用Key",
|
||||
"AppSecret": "应用Secret"
|
||||
|
||||
@ -14,7 +14,6 @@ import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import {
|
||||
postAggregationDeviceCreateAsync,
|
||||
postAggregationDeviceDeleteAsync,
|
||||
postDeviceInfoArchivesDown,
|
||||
postDeviceInfoPage,
|
||||
} from '#/api-client';
|
||||
import { TableAction } from '#/components/table-action';
|
||||
@ -233,26 +232,6 @@ const toStatusData = (row: Record<string, any>) => {
|
||||
},
|
||||
});
|
||||
};
|
||||
// 档案下发
|
||||
const archivesIssued = async (row: Record<string, any>) => {
|
||||
try {
|
||||
const result = await postDeviceInfoArchivesDown({
|
||||
body: {
|
||||
meterAddress: row.deviceAddress,
|
||||
meterType: row.ioTPlatform,
|
||||
focusAddress: row.ioTPlatformDeviceOpenInfo,
|
||||
},
|
||||
});
|
||||
if (result.data) {
|
||||
Message.success($t('common.operationSuccess'));
|
||||
} else {
|
||||
Message.error($t('common.operationFail'));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('档案下发失败:', error);
|
||||
Message.error($t('common.operationFail'));
|
||||
}
|
||||
};
|
||||
const openAddModal = async () => {
|
||||
editRow.value = {};
|
||||
userModalApi.open();
|
||||
@ -263,8 +242,7 @@ const openAddModal = async () => {
|
||||
<Page auto-content-height>
|
||||
<Grid>
|
||||
<template #toolbar-actions>
|
||||
<TableAction
|
||||
:actions="[
|
||||
<TableAction :actions="[
|
||||
{
|
||||
label: $t('common.add'),
|
||||
type: 'primary',
|
||||
@ -272,8 +250,7 @@ const openAddModal = async () => {
|
||||
onClick: openAddModal.bind(null),
|
||||
auth: ['AbpIdentity.Users.Create'],
|
||||
},
|
||||
]"
|
||||
/>
|
||||
]" />
|
||||
</template>
|
||||
|
||||
<template #isArchiveStatus="{ row }">
|
||||
@ -285,45 +262,43 @@ const openAddModal = async () => {
|
||||
{{ row.tripState ? $t('common.SwitchOff') : $t('common.Closing') }}
|
||||
</template>
|
||||
<template #isHaveValve="{ row }">
|
||||
<component
|
||||
:is="
|
||||
h(Tag, { color: row.haveValve ? 'green' : 'red' }, () =>
|
||||
<component :is="h(Tag, { color: row.haveValve ? 'green' : 'red' }, () =>
|
||||
row.haveValve ? $t('common.yes') : $t('common.no'),
|
||||
)
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</template>
|
||||
<template #isSelfDevelop="{ row }">
|
||||
<component
|
||||
:is="
|
||||
h(Tag, { color: row.selfDevelop ? 'green' : 'red' }, () =>
|
||||
<component :is="h(Tag, { color: row.selfDevelop ? 'green' : 'red' }, () =>
|
||||
row.selfDevelop ? $t('common.yes') : $t('common.no'),
|
||||
)
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</template>
|
||||
<template #isDynamicPassword="{ row }">
|
||||
<component
|
||||
:is="
|
||||
h(Tag, { color: row.dynamicPassword ? 'green' : 'red' }, () =>
|
||||
<component :is="h(Tag, { color: row.dynamicPassword ? 'green' : 'red' }, () =>
|
||||
row.dynamicPassword ? $t('common.yes') : $t('common.no'),
|
||||
)
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</template>
|
||||
<template #isEnable="{ row }">
|
||||
<component
|
||||
:is="
|
||||
h(Tag, { color: row.enabled ? 'green' : 'red' }, () =>
|
||||
<component :is="h(Tag, { color: row.enabled ? 'green' : 'red' }, () =>
|
||||
row.enabled ? $t('common.yes') : $t('common.no'),
|
||||
)
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</template>
|
||||
<template #ioTPlatformName="{ row }">
|
||||
<span :style="{
|
||||
color:
|
||||
row.ioTPlatform === 2 || row.ioTPlatform === '2'
|
||||
? '#0B34BE'
|
||||
: '#048CD1',
|
||||
fontWeight: 'bold',
|
||||
}">
|
||||
{{ row.ioTPlatformName }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #action="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
<TableAction :actions="[
|
||||
{
|
||||
label: $t('common.edit'),
|
||||
type: 'link',
|
||||
@ -331,8 +306,14 @@ const openAddModal = async () => {
|
||||
auth: ['AbpIdentity.Users.Update'],
|
||||
onClick: onEdit.bind(null, row),
|
||||
},
|
||||
]"
|
||||
:drop-down-actions="[
|
||||
{
|
||||
label: $t('abp.deviceInfos.viewData'),
|
||||
type: 'link',
|
||||
size: 'small',
|
||||
auth: ['AbpIdentity.Users.Update'],
|
||||
onClick: toStatusData.bind(null, row),
|
||||
},
|
||||
]" :drop-down-actions="[
|
||||
{
|
||||
label: $t('common.delete'),
|
||||
icon: 'ant-design:delete-outlined',
|
||||
@ -343,28 +324,10 @@ const openAddModal = async () => {
|
||||
confirm: onDel.bind(null, row),
|
||||
},
|
||||
},
|
||||
{
|
||||
label: $t('abp.DeviceInfo.pointData'),
|
||||
icon: 'ant-design:profile-outlined',
|
||||
type: 'primary',
|
||||
auth: ['AbpIdentity.Users.Delete'],
|
||||
onClick: toStatusData.bind(null, row),
|
||||
},
|
||||
{
|
||||
label: $t('abp.DeviceInfo.archivesIssued'),
|
||||
icon: 'ant-design:cloud-download-outlined',
|
||||
type: 'primary',
|
||||
auth: ['AbpIdentity.Users.Delete'],
|
||||
onClick: archivesIssued.bind(null, row),
|
||||
},
|
||||
]"
|
||||
/>
|
||||
]" />
|
||||
</template>
|
||||
</Grid>
|
||||
<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" />
|
||||
</UserModal>
|
||||
</Page>
|
||||
|
||||
@ -23,6 +23,22 @@ export const querySchema = computed(() => [
|
||||
|
||||
export const tableSchema: any = computed((): VxeGridProps['columns'] => [
|
||||
{ title: $t('common.seq'), type: 'seq', width: 50 },
|
||||
{
|
||||
field: 'ioTPlatformName',
|
||||
title: $t('common.BelongingIoTPlatform'),
|
||||
minWidth: '150',
|
||||
slots: { default: 'ioTPlatformName' },
|
||||
},
|
||||
{
|
||||
field: 'accountPhoneNumber',
|
||||
title: $t('common.BelongingAccountName'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'ioTPlatformProductName',
|
||||
title: $t('common.BelongingProductName'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'deviceName',
|
||||
title: $t('abp.deviceInfos.deviceName'),
|
||||
@ -33,36 +49,31 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
|
||||
title: $t('abp.deviceInfos.deviceAddress'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'ioTPlatform',
|
||||
title: $t('abp.deviceInfos.ioTPlatform'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'ioTPlatformName',
|
||||
title: $t('abp.deviceInfos.ioTPlatformName'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'ioTPlatformDeviceOpenInfo',
|
||||
title: $t('abp.deviceInfos.ioTPlatformDeviceOpenInfo'),
|
||||
minWidth: '100',
|
||||
minWidth: '180',
|
||||
},
|
||||
{
|
||||
field: 'deviceOnlineStatusName',
|
||||
title: $t('abp.deviceInfos.DeviceOnlineStatus'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'lastOnlineTime',
|
||||
title: $t('abp.deviceInfos.LastOnlineTime'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'lastOfflineTime',
|
||||
title: $t('abp.deviceInfos.LastOfflineTime'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'platformPassword',
|
||||
title: $t('abp.deviceInfos.platformPassword'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'ioTPlatformProductName',
|
||||
title: $t('abp.deviceInfos.ioTPlatformProductName'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'ioTPlatformAccountName',
|
||||
title: $t('abp.deviceInfos.ioTPlatformAccountName'),
|
||||
minWidth: '150',
|
||||
},
|
||||
{
|
||||
field: 'ioTPlatformResponse',
|
||||
title: $t('abp.deviceInfos.ioTPlatformResponse'),
|
||||
|
||||
@ -9,7 +9,7 @@ import { Page } from '@vben/common-ui';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { postDeviceInfoPage } from '#/api-client';
|
||||
import { postCTWingLogInfoPage } from '#/api-client';
|
||||
import { postTableModelCtWingLogInfo } from '#/api-client';
|
||||
|
||||
import DeviceSelect from '../deviceData/DeviceSelect.vue';
|
||||
import { querySchema, tableSchema } from './schema';
|
||||
@ -221,7 +221,7 @@ const gridOptions: VxeGridProps<any> = {
|
||||
|
||||
if (DeviceType) queryParams.DeviceType = DeviceType;
|
||||
if (DeviceId) queryParams.DeviceId = DeviceId;
|
||||
const { data } = await postCTWingLogInfoPage({
|
||||
const { data } = await postTableModelCtWingLogInfo({
|
||||
body: queryParams,
|
||||
});
|
||||
const result = {
|
||||
|
||||
@ -9,7 +9,7 @@ import { Page } from '@vben/common-ui';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { postDeviceInfoPage } from '#/api-client';
|
||||
import { postOneNETLogInfoPage } from '#/api-client';
|
||||
import { postTableModelOneNetLogInfo } from '#/api-client';
|
||||
|
||||
import DeviceSelect from '../deviceData/DeviceSelect.vue';
|
||||
import { querySchema, tableSchema } from './schema';
|
||||
@ -219,7 +219,7 @@ const gridOptions: VxeGridProps<any> = {
|
||||
|
||||
if (DeviceType) queryParams.DeviceType = DeviceType;
|
||||
if (DeviceId) queryParams.DeviceId = DeviceId;
|
||||
const { data } = await postOneNETLogInfoPage({
|
||||
const { data } = await postTableModelOneNetLogInfo({
|
||||
body: queryParams,
|
||||
});
|
||||
const result = {
|
||||
|
||||
@ -312,7 +312,7 @@ export const editProductFormSchemaEdit: any = computed(() => [
|
||||
{
|
||||
component: 'ApiSelect',
|
||||
fieldName: 'oneNETAccountId',
|
||||
label: $t('abp.OneNETManagement.BelongingAccountName'),
|
||||
label: $t('common.BelongingAccountName'),
|
||||
componentProps: {
|
||||
api: postOneNetAccountListAsync,
|
||||
params: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user