diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts
index d021b322..79785144 100644
--- a/src/api/iot/device/index.ts
+++ b/src/api/iot/device/index.ts
@@ -6,6 +6,7 @@ export interface DeviceVO {
id: number // ID
deviceCode: string // 设备编号
deviceName: string // 设备名称
+ boundLedgerName?: string // 已绑定的设备台账名称
deviceType: string // 设备类型
status: string // 状态
isConnect?: string | number
@@ -19,15 +20,15 @@ export interface DeviceVO {
remark: string // 备注
isEnable: boolean // 是否启用
deviceModelId: number // 关联设备模型
- protocol: string // 通讯协议
- sampleCycle: number // 采集周期
- url: string // 端点url
- username: string // 用户名
+ protocol: string // 通讯协议
+ sampleCycle: number // 采集周期
+ url: string // 端点url
+ username: string // 用户名
password: string // 密码
certificate?: string // 证书
secretKey?: string // 秘钥
collectionTime?: string | number
- images: string,//图片
+ images: string //图片
}
export interface DeviceConnectParams {
@@ -79,14 +80,13 @@ export interface DeviceContactModelVO {
dataUnit?: string
}
-
// 物联设备 API
export const DeviceApi = {
// 查询物联设备分页
getDevicePage: async (params: any) => {
return await request.get({ url: `/iot/device/page`, params })
},
-// 查询物联设备
+ // 查询物联设备
getDeviceList: async (params?: any) => {
return await request.get({ url: `/iot/device/deviceList`, params })
},
@@ -104,7 +104,7 @@ export const DeviceApi = {
return await request.get({ url: `/iot/device/available-list` })
},
getAvailableListPage: async (params: any) => {
- return await request.get({ url: `/iot/device/available-page` , params})
+ return await request.get({ url: `/iot/device/available-page`, params })
},
// 新增物联设备
createDevice: async (data: DeviceVO) => {
@@ -112,7 +112,10 @@ export const DeviceApi = {
},
// 批量获取设备属性列表
- getDeviceAttributeBatchList: async (params: { goviewId: number | string; orgId?: number | string }) => {
+ getDeviceAttributeBatchList: async (params: {
+ goviewId: number | string
+ orgId?: number | string
+ }) => {
return await request.get({ url: `/iot/device/device-attribute/batchList`, params })
},
// 修改物联设备
@@ -163,7 +166,6 @@ export const DeviceApi = {
})
},
-
getHistoryAnalyse: async (params: HistoryRecordParams) => {
return await request.get({
url: `/iot/device/historyAnalyse`,
@@ -181,7 +183,7 @@ export const DeviceApi = {
return await request.put({ url: `/iot/device/update-enabled`, data })
},
-// ==================== 子表(设备属性) ====================
+ // ==================== 子表(设备属性) ====================
// 获得设备属性分页
getDeviceAttributePage: async (params) => {
diff --git a/src/api/mes/deviceledger/index.ts b/src/api/mes/deviceledger/index.ts
index 2db4634f..7b59e90f 100644
--- a/src/api/mes/deviceledger/index.ts
+++ b/src/api/mes/deviceledger/index.ts
@@ -8,6 +8,8 @@ export interface DeviceLedgerVO {
deviceCode: string // 设备编号
isCode?: boolean
deviceName: string // 设备名称
+ iotDeviceCode?: string // 物联设备编码
+ iotDeviceName?: string // 物联设备名称
deviceStatus: number // 设备状态 (0-正常, 1-停用, 2-维修, 3-报废)
deviceBrand: string // 设备品牌
sn?: string // 序列号
@@ -86,7 +88,9 @@ export const DeviceLedgerApi = {
},
regenerateCode: async (id: number, code: string) => {
- return await request.post({ url: `/mes/device-ledger/regenerate-code?id=${id}&code=${encodeURIComponent(code)}` })
+ return await request.post({
+ url: `/mes/device-ledger/regenerate-code?id=${id}&code=${encodeURIComponent(code)}`
+ })
},
// 删除设备类型
@@ -102,7 +106,7 @@ export const DeviceLedgerApi = {
return await request.download({ url: `/mes/device-ledger/export-spare-based`, params })
},
- exportMold: async (params) => {
+ exportMold: async (params) => {
return await request.download({ url: `/mes/device-ledger/export-mold`, params })
},
@@ -118,5 +122,5 @@ export const DeviceLedgerApi = {
// 删除设备关键件明细
deleteDeviceCriticalComponent: async (id: string) => {
return await request.delete({ url: `/mes/device-critical-component/delete?id=` + id })
- },
+ }
}
diff --git a/src/locales/en.ts b/src/locales/en.ts
index 2091b279..fbd19150 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -705,7 +705,8 @@ export default {
validatorOutboundPurposeRequired: 'Outbound purpose is required',
validatorOutModeRequired: 'Outbound mode is required',
validatorCountRequired: 'Quantity is required',
- stockCountExceededWarning: 'Quantity cannot exceed stock. It has been adjusted to stock quantity.'
+ stockCountExceededWarning:
+ 'Quantity cannot exceed stock. It has been adjusted to stock quantity.'
},
Check: {
no: 'Check No',
@@ -1694,6 +1695,8 @@ export default {
deviceCode: 'Code',
qrcode: 'QR Code/Barcode',
deviceName: 'Name',
+ iotDeviceCode: 'IoT Device Code',
+ iotDeviceName: 'IoT Device Name',
deviceStatus: 'Status',
statusEnabled: 'Enabled',
statusDisabled: 'Disabled',
@@ -1798,9 +1801,9 @@ export default {
invalidId: 'Invalid device ID'
},
DeviceQRCode: 'Device QR Code',
- codeTitle:'Scan to view device details',
- featureDescription:'SupportsSpotCheck/repair/maintenance',
- BasicInformation:'Device Basic Information'
+ codeTitle: 'Scan to view device details',
+ featureDescription: 'SupportsSpotCheck/repair/maintenance',
+ BasicInformation: 'Device Basic Information'
},
// Capacity Report
CapacityReport: {
@@ -1811,10 +1814,12 @@ export default {
workshop: 'Workshop',
ratedCapacity: 'Rated Capacity (Planned Capacity)',
reportCapacity: 'Report Capacity',
- reportCapacityTooltip: 'Default query for average of data from the last half year (excluding today)',
+ reportCapacityTooltip:
+ 'Default query for average of data from the last half year (excluding today)',
reportCapacityViewDetail: 'View Detail',
actualCapacity: 'Actual Capacity',
- actualCapacityTooltip: 'Default query for average of data from the last half year (excluding today)',
+ actualCapacityTooltip:
+ 'Default query for average of data from the last half year (excluding today)',
placeholderDeviceCode: 'Please input device code',
placeholderDeviceName: 'Please input device name',
placeholderDeviceType: 'Please input device type',
@@ -3684,7 +3689,8 @@ export default {
moduleName: 'Printer Config',
currentHostName: 'Current Host Name',
unknownHostName: 'Not detected',
- currentHostTip: 'This page only displays and manages printer configurations for the current host.',
+ currentHostTip:
+ 'This page only displays and manages printer configurations for the current host.',
hostName: 'Host Name',
systemPrinterName: 'Printer Name',
defaultStatus: 'Is Default',
@@ -3696,11 +3702,11 @@ export default {
placeholderHostName: 'Please input host name',
placeholderSystemPrinterName: 'Please input printer name',
placeholderRemark: 'Please input printer remark',
- businessScenarioCode:'Biz Scenario Code',
- businessScenario:'Biz Scenario',
- scenarioCount:'Scenario Count',
- placeholderBusinessScenario:'Please select biz scenario',
- testPrint:'Test Print'
+ businessScenarioCode: 'Biz Scenario Code',
+ businessScenario: 'Biz Scenario',
+ scenarioCount: 'Scenario Count',
+ placeholderBusinessScenario: 'Please select biz scenario',
+ testPrint: 'Test Print'
}
},
QualityManagement: {
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 283444c4..1463d25e 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -1684,6 +1684,8 @@ export default {
deviceCode: '编码',
qrcode: '二维码/条形码',
deviceName: '名称',
+ iotDeviceCode: '物联设备编码',
+ iotDeviceName: '物联设备名称',
deviceStatus: '状态',
statusEnabled: '启用',
statusDisabled: '不启用',
@@ -1769,7 +1771,7 @@ export default {
moldRemark: '备注',
fileUrl: '资料',
serialNumber: '序号',
- dvName: '关联采集设备',
+ dvName: '关联物联设备',
dvId: '请选择设备',
qrcodeLoadError: '二维码加载失败',
qrcodeEmpty: '暂无二维码',
@@ -1788,9 +1790,9 @@ export default {
invalidId: '无效的设备ID'
},
DeviceQRCode: '设备二维码',
- codeTitle:'扫码查看设备详情',
- featureDescription:'支持点检 / 报修 / 维保',
- BasicInformation:'设备基本信息'
+ codeTitle: '扫码查看设备详情',
+ featureDescription: '支持点检 / 报修 / 维保',
+ BasicInformation: '设备基本信息'
},
// 产能报表
CapacityReport: {
@@ -3186,11 +3188,11 @@ export default {
validatorTypeRequired: '模板类型不能为空',
design: '配置',
designTitle: '模板配置',
- businessScenarioCode:'业务场景编码',
- businessScenario:'业务场景',
- scenarioCount:'场景数',
- placeholderBusinessScenario:'请选择业务场景',
- testPrint:'测试打印'
+ businessScenarioCode: '业务场景编码',
+ businessScenario: '业务场景',
+ scenarioCount: '场景数',
+ placeholderBusinessScenario: '请选择业务场景',
+ testPrint: '测试打印'
}
},
QualityManagement: {
@@ -4680,7 +4682,7 @@ export default {
tableNameColumn: '名称',
tableOrganizationColumn: '工位',
- tableMachineColumn: '关联采集设备',
+ tableMachineColumn: '关联物联设备',
tableTeamColumn: '班组',
tableStartTimeColumn: '开始时间',
tableEndTimeColumn: '结束时间',
diff --git a/src/views/mes/deviceledger/DeviceLedgerForm.vue b/src/views/mes/deviceledger/DeviceLedgerForm.vue
index f94726be..cf434a6e 100644
--- a/src/views/mes/deviceledger/DeviceLedgerForm.vue
+++ b/src/views/mes/deviceledger/DeviceLedgerForm.vue
@@ -6,108 +6,145 @@