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