feat:设备台账-添加关联物联设备

main
黄伟杰 3 weeks ago
parent 5c66c52cd4
commit a3ca79dd4d

@ -6,6 +6,7 @@ export interface DeviceVO {
id: number // ID id: number // ID
deviceCode: string // 设备编号 deviceCode: string // 设备编号
deviceName: string // 设备名称 deviceName: string // 设备名称
boundLedgerName?: string // 已绑定的设备台账名称
deviceType: string // 设备类型 deviceType: string // 设备类型
status: string // 状态 status: string // 状态
isConnect?: string | number isConnect?: string | number
@ -19,15 +20,15 @@ export interface DeviceVO {
remark: string // 备注 remark: string // 备注
isEnable: boolean // 是否启用 isEnable: boolean // 是否启用
deviceModelId: number // 关联设备模型 deviceModelId: number // 关联设备模型
protocol: string // 通讯协议 protocol: string // 通讯协议
sampleCycle: number // 采集周期 sampleCycle: number // 采集周期
url: string // 端点url url: string // 端点url
username: string // 用户名 username: string // 用户名
password: string // 密码 password: string // 密码
certificate?: string // 证书 certificate?: string // 证书
secretKey?: string // 秘钥 secretKey?: string // 秘钥
collectionTime?: string | number collectionTime?: string | number
images: string,//图片 images: string //图片
} }
export interface DeviceConnectParams { export interface DeviceConnectParams {
@ -79,14 +80,13 @@ export interface DeviceContactModelVO {
dataUnit?: string dataUnit?: string
} }
// 物联设备 API // 物联设备 API
export const DeviceApi = { export const DeviceApi = {
// 查询物联设备分页 // 查询物联设备分页
getDevicePage: async (params: any) => { getDevicePage: async (params: any) => {
return await request.get({ url: `/iot/device/page`, params }) return await request.get({ url: `/iot/device/page`, params })
}, },
// 查询物联设备 // 查询物联设备
getDeviceList: async (params?: any) => { getDeviceList: async (params?: any) => {
return await request.get({ url: `/iot/device/deviceList`, params }) 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` }) return await request.get({ url: `/iot/device/available-list` })
}, },
getAvailableListPage: async (params: any) => { 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) => { 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 }) return await request.get({ url: `/iot/device/device-attribute/batchList`, params })
}, },
// 修改物联设备 // 修改物联设备
@ -163,7 +166,6 @@ export const DeviceApi = {
}) })
}, },
getHistoryAnalyse: async (params: HistoryRecordParams) => { getHistoryAnalyse: async (params: HistoryRecordParams) => {
return await request.get({ return await request.get({
url: `/iot/device/historyAnalyse`, url: `/iot/device/historyAnalyse`,
@ -181,7 +183,7 @@ export const DeviceApi = {
return await request.put({ url: `/iot/device/update-enabled`, data }) return await request.put({ url: `/iot/device/update-enabled`, data })
}, },
// ==================== 子表(设备属性) ==================== // ==================== 子表(设备属性) ====================
// 获得设备属性分页 // 获得设备属性分页
getDeviceAttributePage: async (params) => { getDeviceAttributePage: async (params) => {

@ -8,6 +8,8 @@ export interface DeviceLedgerVO {
deviceCode: string // 设备编号 deviceCode: string // 设备编号
isCode?: boolean isCode?: boolean
deviceName: string // 设备名称 deviceName: string // 设备名称
iotDeviceCode?: string // 物联设备编码
iotDeviceName?: string // 物联设备名称
deviceStatus: number // 设备状态 (0-正常, 1-停用, 2-维修, 3-报废) deviceStatus: number // 设备状态 (0-正常, 1-停用, 2-维修, 3-报废)
deviceBrand: string // 设备品牌 deviceBrand: string // 设备品牌
sn?: string // 序列号 sn?: string // 序列号
@ -86,7 +88,9 @@ export const DeviceLedgerApi = {
}, },
regenerateCode: async (id: number, code: string) => { 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 }) 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 }) return await request.download({ url: `/mes/device-ledger/export-mold`, params })
}, },
@ -118,5 +122,5 @@ export const DeviceLedgerApi = {
// 删除设备关键件明细 // 删除设备关键件明细
deleteDeviceCriticalComponent: async (id: string) => { deleteDeviceCriticalComponent: async (id: string) => {
return await request.delete({ url: `/mes/device-critical-component/delete?id=` + id }) return await request.delete({ url: `/mes/device-critical-component/delete?id=` + id })
}, }
} }

@ -705,7 +705,8 @@ export default {
validatorOutboundPurposeRequired: 'Outbound purpose is required', validatorOutboundPurposeRequired: 'Outbound purpose is required',
validatorOutModeRequired: 'Outbound mode is required', validatorOutModeRequired: 'Outbound mode is required',
validatorCountRequired: 'Quantity 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: { Check: {
no: 'Check No', no: 'Check No',
@ -1694,6 +1695,8 @@ export default {
deviceCode: 'Code', deviceCode: 'Code',
qrcode: 'QR Code/Barcode', qrcode: 'QR Code/Barcode',
deviceName: 'Name', deviceName: 'Name',
iotDeviceCode: 'IoT Device Code',
iotDeviceName: 'IoT Device Name',
deviceStatus: 'Status', deviceStatus: 'Status',
statusEnabled: 'Enabled', statusEnabled: 'Enabled',
statusDisabled: 'Disabled', statusDisabled: 'Disabled',
@ -1798,9 +1801,9 @@ export default {
invalidId: 'Invalid device ID' invalidId: 'Invalid device ID'
}, },
DeviceQRCode: 'Device QR Code', DeviceQRCode: 'Device QR Code',
codeTitle:'Scan to view device details', codeTitle: 'Scan to view device details',
featureDescription:'SupportsSpotCheck/repair/maintenance', featureDescription: 'SupportsSpotCheck/repair/maintenance',
BasicInformation:'Device Basic Information' BasicInformation: 'Device Basic Information'
}, },
// Capacity Report // Capacity Report
CapacityReport: { CapacityReport: {
@ -1811,10 +1814,12 @@ export default {
workshop: 'Workshop', workshop: 'Workshop',
ratedCapacity: 'Rated Capacity (Planned Capacity)', ratedCapacity: 'Rated Capacity (Planned Capacity)',
reportCapacity: 'Report 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', reportCapacityViewDetail: 'View Detail',
actualCapacity: 'Actual Capacity', 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', placeholderDeviceCode: 'Please input device code',
placeholderDeviceName: 'Please input device name', placeholderDeviceName: 'Please input device name',
placeholderDeviceType: 'Please input device type', placeholderDeviceType: 'Please input device type',
@ -3684,7 +3689,8 @@ export default {
moduleName: 'Printer Config', moduleName: 'Printer Config',
currentHostName: 'Current Host Name', currentHostName: 'Current Host Name',
unknownHostName: 'Not detected', 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', hostName: 'Host Name',
systemPrinterName: 'Printer Name', systemPrinterName: 'Printer Name',
defaultStatus: 'Is Default', defaultStatus: 'Is Default',
@ -3696,11 +3702,11 @@ export default {
placeholderHostName: 'Please input host name', placeholderHostName: 'Please input host name',
placeholderSystemPrinterName: 'Please input printer name', placeholderSystemPrinterName: 'Please input printer name',
placeholderRemark: 'Please input printer remark', placeholderRemark: 'Please input printer remark',
businessScenarioCode:'Biz Scenario Code', businessScenarioCode: 'Biz Scenario Code',
businessScenario:'Biz Scenario', businessScenario: 'Biz Scenario',
scenarioCount:'Scenario Count', scenarioCount: 'Scenario Count',
placeholderBusinessScenario:'Please select biz scenario', placeholderBusinessScenario: 'Please select biz scenario',
testPrint:'Test Print' testPrint: 'Test Print'
} }
}, },
QualityManagement: { QualityManagement: {

@ -1684,6 +1684,8 @@ export default {
deviceCode: '编码', deviceCode: '编码',
qrcode: '二维码/条形码', qrcode: '二维码/条形码',
deviceName: '名称', deviceName: '名称',
iotDeviceCode: '物联设备编码',
iotDeviceName: '物联设备名称',
deviceStatus: '状态', deviceStatus: '状态',
statusEnabled: '启用', statusEnabled: '启用',
statusDisabled: '不启用', statusDisabled: '不启用',
@ -1769,7 +1771,7 @@ export default {
moldRemark: '备注', moldRemark: '备注',
fileUrl: '资料', fileUrl: '资料',
serialNumber: '序号', serialNumber: '序号',
dvName: '关联采集设备', dvName: '关联物联设备',
dvId: '请选择设备', dvId: '请选择设备',
qrcodeLoadError: '二维码加载失败', qrcodeLoadError: '二维码加载失败',
qrcodeEmpty: '暂无二维码', qrcodeEmpty: '暂无二维码',
@ -1788,9 +1790,9 @@ export default {
invalidId: '无效的设备ID' invalidId: '无效的设备ID'
}, },
DeviceQRCode: '设备二维码', DeviceQRCode: '设备二维码',
codeTitle:'扫码查看设备详情', codeTitle: '扫码查看设备详情',
featureDescription:'支持点检 / 报修 / 维保', featureDescription: '支持点检 / 报修 / 维保',
BasicInformation:'设备基本信息' BasicInformation: '设备基本信息'
}, },
// 产能报表 // 产能报表
CapacityReport: { CapacityReport: {
@ -3186,11 +3188,11 @@ export default {
validatorTypeRequired: '模板类型不能为空', validatorTypeRequired: '模板类型不能为空',
design: '配置', design: '配置',
designTitle: '模板配置', designTitle: '模板配置',
businessScenarioCode:'业务场景编码', businessScenarioCode: '业务场景编码',
businessScenario:'业务场景', businessScenario: '业务场景',
scenarioCount:'场景数', scenarioCount: '场景数',
placeholderBusinessScenario:'请选择业务场景', placeholderBusinessScenario: '请选择业务场景',
testPrint:'测试打印' testPrint: '测试打印'
} }
}, },
QualityManagement: { QualityManagement: {
@ -4680,7 +4682,7 @@ export default {
tableNameColumn: '名称', tableNameColumn: '名称',
tableOrganizationColumn: '工位', tableOrganizationColumn: '工位',
tableMachineColumn: '关联采集设备', tableMachineColumn: '关联物联设备',
tableTeamColumn: '班组', tableTeamColumn: '班组',
tableStartTimeColumn: '开始时间', tableStartTimeColumn: '开始时间',
tableEndTimeColumn: '结束时间', tableEndTimeColumn: '结束时间',

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save