diff --git a/src/api/erp/product/product/index.ts b/src/api/erp/product/product/index.ts index 6726d1d3..d77b8829 100644 --- a/src/api/erp/product/product/index.ts +++ b/src/api/erp/product/product/index.ts @@ -71,5 +71,15 @@ export const ProductApi = { // 导出产品 Excel exportProduct: async (params) => { return await request.download({ url: `/erp/product/export-excel`, params }) + }, + + // 下载产品导入模板 + importProductTemplate: async () => { + return await request.download({ url: `/erp/product/get-import-template` }) + }, + + // 导入产品 + importProduct: async (data: FormData) => { + return await request.upload({ url: `/erp/product/import`, data }) } } diff --git a/src/api/mes/criticalComponent/index.ts b/src/api/mes/criticalComponent/index.ts index 662913fd..1bd41587 100644 --- a/src/api/mes/criticalComponent/index.ts +++ b/src/api/mes/criticalComponent/index.ts @@ -32,6 +32,10 @@ export const CriticalComponentApi = { return await request.download({ url: `/mes/critical-component/export-excel`, params }) }, + importCriticalComponentTemplate: async () => { + return await request.download({ url: `/mes/critical-component/get-import-template` }) + }, + exportDeviceComponent: async (params: any) => { return await request.download({ url: `/mes/critical-component/export-device-component`, params }) } diff --git a/src/locales/en.ts b/src/locales/en.ts index abea4982..2273fca2 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -111,6 +111,7 @@ export default { price: 'Amount', totalPrice: 'Total Price', inType: 'Inbound Type', + file: 'Attachment', tabProduct: 'Product Inbound', tabMaterial: 'Material Inbound', tabPart: 'Part Inbound', @@ -218,6 +219,34 @@ export default { validatorWarehouseRequired: 'Warehouse name is required' } }, + Record: { + product: 'Product', + warehouse: 'Warehouse', + bizType: 'Type', + bizNo: 'Business No', + categoryProduct: 'Product', + categoryMaterial: 'Material', + categorySpare: 'Spare Part', + categoryTool: 'Tool', + categoryConsumable: 'Consumable', + categoryOther: 'Other', + productName: 'Product Name', + categoryName: 'Product Category', + unitName: 'Unit', + warehouseName: 'Warehouse Code', + count: 'In/Out Quantity', + totalCount: 'Stock Quantity', + recordTime: 'In/Out Date', + createTime: 'Create Date', + creatorName: 'Operator', + placeholderProduct: 'Please select product', + placeholderWarehouse: 'Please select warehouse', + placeholderBizType: 'Please select type', + placeholderBizNo: 'Please input business no', + placeholderCreateTimeStart: 'Start Date', + placeholderCreateTimeEnd: 'End Date', + exportName: 'ProductStockRecord.xls' + }, Move: { no: 'Transfer No', product: 'Product', @@ -502,6 +531,8 @@ export default { detail: 'Detail', export: 'Export', import: 'Import', + approve: 'Approve', + unapprove: 'Unapprove', generate: 'Generate', logout: 'Login Out', test: 'Test', @@ -2637,6 +2668,154 @@ export default { manualTableRemarkColumn: 'Remark' } }, + EnergyManagement: { + EnergyType: { + moduleName: 'Energy Type', + + searchCodeLabel: 'Energy Type Code', + searchCodePlaceholder: 'Please enter energy type code', + searchNameLabel: 'Energy Type Name', + searchNamePlaceholder: 'Please enter energy type name', + searchUnitLabel: 'Unit', + searchUnitPlaceholder: 'Please enter unit', + searchCreateTimeLabel: 'Create Time', + searchCreateTimeStartPlaceholder: 'Start Date', + searchCreateTimeEndPlaceholder: 'End Date', + + searchButtonText: 'Search', + resetButtonText: 'Reset', + addButtonText: 'Add', + exportButtonText: 'Export', + + tableCodeColumn: 'Energy Type Code', + tableNameColumn: 'Energy Type Name', + tableUnitColumn: 'Unit', + tableIsEnableColumn: 'Enabled', + tableRemarkColumn: 'Remark', + tableCreateTimeColumn: 'Create Time', + tableOperateColumn: 'Operation', + + dialogCodeLabel: 'Energy Type Code', + dialogCodePlaceholder: 'Please enter energy type code', + dialogNameLabel: 'Energy Type Name', + dialogNamePlaceholder: 'Please enter energy type name', + dialogUnitLabel: 'Unit', + dialogUnitPlaceholder: 'Please enter unit', + dialogIsEnableLabel: 'Enabled', + dialogRemarkLabel: 'Remark', + dialogRemarkPlaceholder: 'Please enter remark', + dialogOkButtonText: 'Confirm', + dialogCancelButtonText: 'Cancel', + + validatorCodeRequired: 'Energy type code can not be empty', + validatorNameRequired: 'Energy type name can not be empty', + validatorUnitRequired: 'Unit can not be empty', + validatorIsEnableRequired: 'Enabled can not be empty', + + exportFilename: 'EnergyType.xls', + }, + EnergyDeviceCheck: { + moduleName: 'Energy Report', + + searchNameLabel: 'Meter Name', + searchNamePlaceholder: 'Please enter meter name', + searchOrgLabel: 'Area', + searchOrgPlaceholder: 'Please select area', + searchTimeRangeLabel: 'Time Range', + searchTimeRangeStartPlaceholder: 'Please select start time', + searchTimeRangeEndPlaceholder: 'Please select end time', + + searchButtonText: 'Search', + resetButtonText: 'Reset', + exportButtonText: 'Export', + + tableExpandPointNameColumn: 'Parameter Name', + tableExpandEarliestValueColumn: 'Earliest Value', + tableExpandEarliestTimeColumn: 'Earliest Time', + tableExpandLatestValueColumn: 'Latest Value', + tableExpandLatestTimeColumn: 'Latest Time', + tableExpandDifferenceColumn: 'Energy Usage', + + tableNameColumn: 'Meter Name', + tableEnergyTypeColumn: 'Energy Type', + tableOrgColumn: 'Area', + tableEnergyConsumptionColumn: 'Energy Consumption', + tableStartTimeColumn: 'Start Time', + tableEndTimeColumn: 'End Time', + + exportFileName: 'EnergyReport.xls', + + dialogDeviceIdLabel: 'Energy Device ID', + dialogDeviceIdPlaceholder: 'Please enter energy device ID', + dialogLastCheckTimeLabel: 'Last Reading Time', + dialogLastCheckTimePlaceholder: 'Please select last reading time', + dialogLastCheckValueLabel: 'Last Reading', + dialogLastCheckValuePlaceholder: 'Please enter last reading', + dialogCheckTimeLabel: 'Reading Time', + dialogCheckTimePlaceholder: 'Please select reading time', + dialogCheckValueLabel: 'Reading', + dialogCheckValuePlaceholder: 'Please enter reading', + dialogDiffValueLabel: 'Difference', + dialogDiffValuePlaceholder: 'Please enter difference', + dialogUnitPriceLabel: 'Unit Price', + dialogUnitPricePlaceholder: 'Please enter unit price', + dialogRemarkLabel: 'Remark', + dialogRemarkPlaceholder: 'Please enter remark', + dialogOkButtonText: 'Confirm', + dialogCancelButtonText: 'Cancel', + + validatorDeviceIdRequired: 'Energy device ID cannot be empty', + validatorCheckValueRequired: 'Reading cannot be empty' + }, + EnergyDevice: { + moduleName: 'Energy Device', + + searchNameLabel: 'Device Name', + searchNamePlaceholder: 'Please enter device name', + searchEnergyTypeLabel: 'Energy Type', + searchEnergyTypePlaceholder: 'Please select energy type', + + searchButtonText: 'Search', + resetButtonText: 'Reset', + createButtonText: 'Add', + exportButtonText: 'Export', + + tableCodeColumn: 'Device Code', + tableNameColumn: 'Device Name', + tableEnergyTypeColumn: 'Energy Type', + tableOrgColumn: 'Area', + tableIsEnableColumn: 'Enabled', + tableUpdateTimeColumn: 'Update Time', + tableOperateColumn: 'Operation', + tableEditAction: 'Edit', + tableDeleteAction: 'Delete', + + exportFileName: 'EnergyDevice.xls', + + dialogCodeLabel: 'Device Code', + dialogCodePlaceholder: 'Please enter device code', + dialogNameLabel: 'Device Name', + dialogNamePlaceholder: 'Please enter device name', + dialogEnergyTypeLabel: 'Energy Type', + dialogEnergyTypePlaceholder: 'Please select energy type', + dialogOrgLabel: 'Area', + dialogOrgTreePlaceholder: 'Please select area', + dialogRulesLabel: 'Calculation Rule', + dialogRulesPointPlaceholder: 'Please select device point', + dialogOperatorPlaceholder: 'Please select operator', + dialogIsEnableLabel: 'Enabled', + dialogSubmitButtonText: 'Confirm', + dialogCancelButtonText: 'Cancel', + + validatorNameRequired: 'Device name cannot be empty', + validatorCodeRequired: 'Device code cannot be empty', + validatorOrgRequired: 'Area cannot be empty', + validatorIsEnableRequired: 'Enabled cannot be empty', + validatorRulesRequired: 'Calculation rule cannot be empty', + validatorRulesPointRequired: 'Device point cannot be empty', + validatorRulesOperatorRequired: 'Operator cannot be empty' + } + }, ProductionPlan: { Task: { moduleName: 'Production Task', @@ -3440,6 +3619,7 @@ export default { alarmPointName: 'Point Name', alarmPointValue: 'Point Value', alarmLevel: 'Alarm Level', + alarmTime: 'Alarm Time', emptyDescription: 'Click "Point" in the device list to view points and rules', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index b87ad8fa..b94d1cbf 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -57,7 +57,7 @@ export default { copy: '复制', copySuccess: '复制成功', copyError: '复制失败', - code:'编码保存后自动生成' + code: '编码保存后自动生成' }, ErpStock: { Warehouse: { @@ -111,6 +111,7 @@ export default { price: '金额', totalPrice: '合计金额', inType: '入库类型', + file: '附件', tabProduct: '产品入库', tabMaterial: '原料入库', tabPart: '备件入库', @@ -218,6 +219,34 @@ export default { validatorWarehouseRequired: '仓库名字不能为空' } }, + Record: { + product: '产品', + warehouse: '仓库', + bizType: '类型', + bizNo: '业务单号', + categoryProduct: '产品', + categoryMaterial: '原料', + categorySpare: '备件', + categoryTool: '工具', + categoryConsumable: '耗材', + categoryOther: '其他', + productName: '产品名称', + categoryName: '产品分类', + unitName: '产品单位', + warehouseName: '仓库编号', + count: '出入库数量', + totalCount: '库存量', + recordTime: '出入库日期', + createTime: '创建日期', + creatorName: '操作人', + placeholderProduct: '请选择产品', + placeholderWarehouse: '请选择仓库', + placeholderBizType: '请选择类型', + placeholderBizNo: '请输入业务单号', + placeholderCreateTimeStart: '开始日期', + placeholderCreateTimeEnd: '结束日期', + exportName: '产品库存明细.xls' + }, Move: { no: '调拨单号', product: '产品', @@ -504,6 +533,8 @@ export default { detail: '详情', export: '导出', import: '导入', + approve: '审批', + unapprove: '反审批', generate: '生成', logout: '强制退出', test: '测试', @@ -729,7 +760,8 @@ export default { emailInvalid: '请输入正确的邮箱地址', mobileInvalid: '请输入正确的手机号码', importFileRequired: '请上传文件', - importSuccessTip: '上传成功数量:{createCount};更新成功数量:{updateCount};更新失败数量:{failureCount};', + importSuccessTip: + '上传成功数量:{createCount};更新成功数量:{updateCount};更新失败数量:{failureCount};', importFailed: '上传失败,请您重新上传!', importFileLimit: '最多只能上传一个文件!', resetPasswordTitle: '请输入"{username}"的新密码', @@ -1019,7 +1051,7 @@ export default { placeholderInspectionMethod: '请选择检验方式', placeholderValueType: '请选择值类型', placeholderUpperVal: '请输入上限值', - placeholderLowerVal: '请输入下限值', + placeholderLowerVal: '请输入下限值' }, // 方案维护 @@ -3428,6 +3460,7 @@ export default { alarmPointName: '点位名称', alarmPointValue: '点位值', alarmLevel: '告警等级', + alarmTime: '告警时间', emptyDescription: '请点击设备列表的“点位”查看采集点和点位规则', @@ -3592,5 +3625,377 @@ export default { messageDeviceNoParams: '该设备下没有参数', messageFetchChartFailed: '获取图表数据失败' } + }, + EnergyManagement: { + EnergyType: { + moduleName: '能耗类型', + + searchCodeLabel: '能耗类型编码', + searchCodePlaceholder: '请输入能耗类型编码', + searchNameLabel: '能耗类型名称', + searchNamePlaceholder: '请输入能耗类型名称', + searchUnitLabel: '单位', + searchUnitPlaceholder: '请输入单位', + searchCreateTimeLabel: '创建时间', + searchCreateTimeStartPlaceholder: '开始日期', + searchCreateTimeEndPlaceholder: '结束日期', + + searchButtonText: '搜索', + resetButtonText: '重置', + addButtonText: '新增', + exportButtonText: '导出', + + tableCodeColumn: '能耗类型编码', + tableNameColumn: '能耗类型名称', + tableUnitColumn: '单位', + tableIsEnableColumn: '是否启用', + tableRemarkColumn: '备注', + tableCreateTimeColumn: '创建时间', + tableOperateColumn: '操作', + + dialogCodeLabel: '能耗类型编码', + dialogCodePlaceholder: '请输入能耗类型编码', + dialogNameLabel: '能耗类型名称', + dialogNamePlaceholder: '请输入能耗类型名称', + dialogUnitLabel: '单位', + dialogUnitPlaceholder: '请输入单位', + dialogIsEnableLabel: '是否启用', + dialogRemarkLabel: '备注', + dialogRemarkPlaceholder: '请输入备注', + dialogOkButtonText: '确 定', + dialogCancelButtonText: '取 消', + + validatorCodeRequired: '能耗类型编码不能为空', + validatorNameRequired: '能耗类型名称不能为空', + validatorUnitRequired: '单位不能为空', + validatorIsEnableRequired: '是否启用不能为空', + + exportFilename: '能耗类型.xls' + }, + EnergyDeviceCheck: { + moduleName: '能源报表', + + searchNameLabel: '表名称', + searchNamePlaceholder: '请输入表名称', + searchOrgLabel: '所属区域', + searchOrgPlaceholder: '请选择所属区域', + searchTimeRangeLabel: '时间范围', + searchTimeRangeStartPlaceholder: '请选择开始时间', + searchTimeRangeEndPlaceholder: '请选择结束时间', + + searchButtonText: '查询', + resetButtonText: '重置', + exportButtonText: '导出', + + tableExpandPointNameColumn: '参数名称', + tableExpandEarliestValueColumn: '最早采集值', + tableExpandEarliestTimeColumn: '最早采集时间', + tableExpandLatestValueColumn: '最新值', + tableExpandLatestTimeColumn: '最新采集时间', + tableExpandDifferenceColumn: '能耗用量', + + tableNameColumn: '表名称', + tableEnergyTypeColumn: '能源类型', + tableOrgColumn: '所属区域', + tableEnergyConsumptionColumn: '能源用量', + tableStartTimeColumn: '开始时间', + tableEndTimeColumn: '结束时间', + + exportFileName: '能源报表.xls', + + dialogDeviceIdLabel: '能源设备Id', + dialogDeviceIdPlaceholder: '请输入能源设备Id', + dialogLastCheckTimeLabel: '上次抄表时间', + dialogLastCheckTimePlaceholder: '选择上次抄表时间', + dialogLastCheckValueLabel: '上次抄表值', + dialogLastCheckValuePlaceholder: '请输入上次抄表值', + dialogCheckTimeLabel: '抄表时间', + dialogCheckTimePlaceholder: '选择抄表时间', + dialogCheckValueLabel: '抄表值', + dialogCheckValuePlaceholder: '请输入抄表值', + dialogDiffValueLabel: '差值', + dialogDiffValuePlaceholder: '请输入差值', + dialogUnitPriceLabel: '单价', + dialogUnitPricePlaceholder: '请输入单价', + dialogRemarkLabel: '备注', + dialogRemarkPlaceholder: '请输入备注', + dialogOkButtonText: '确 定', + dialogCancelButtonText: '取 消', + + validatorDeviceIdRequired: '能源设备Id不能为空', + validatorCheckValueRequired: '抄表值不能为空' + }, + EnergyDevice: { + moduleName: '能源设备', + + searchNameLabel: '设备名称', + searchNamePlaceholder: '请输入设备名称', + searchEnergyTypeLabel: '能耗类型', + searchEnergyTypePlaceholder: '请选择能耗类型', + + searchButtonText: '搜索', + resetButtonText: '重置', + createButtonText: '新增', + exportButtonText: '导出', + + tableCodeColumn: '设备编码', + tableNameColumn: '设备名称', + tableEnergyTypeColumn: '能耗类型', + tableOrgColumn: '所属区域', + tableIsEnableColumn: '是否启用', + tableUpdateTimeColumn: '更新时间', + tableOperateColumn: '操作', + tableEditAction: '编辑', + tableDeleteAction: '删除', + + exportFileName: '能源设备.xls', + + dialogCodeLabel: '设备编码', + dialogCodePlaceholder: '请输入设备编码', + dialogNameLabel: '设备名称', + dialogNamePlaceholder: '请输入设备名称', + dialogEnergyTypeLabel: '能耗类型', + dialogEnergyTypePlaceholder: '请选择能耗类型', + dialogOrgLabel: '所属区域', + dialogOrgTreePlaceholder: '请选择所属区域', + dialogRulesLabel: '计算规则', + dialogRulesPointPlaceholder: '请选择设备点位', + dialogOperatorPlaceholder: '请选择运算符', + dialogIsEnableLabel: '是否启用', + dialogSubmitButtonText: '确 定', + dialogCancelButtonText: '取 消', + + validatorNameRequired: '设备名称不能为空', + validatorCodeRequired: '设备编码不能为空', + validatorOrgRequired: '所属区域不能为空', + validatorIsEnableRequired: '是否启用不能为空', + validatorRulesRequired: '计算规则不能为空', + validatorRulesPointRequired: '设备点位不能为空', + validatorRulesOperatorRequired: '运算符不能为空' + }, + Device: { + Device: { + moduleName: '采集设备', + index: '序号', + + deviceCode: '设备编号', + deviceName: '设备名称', + operatingStatus: '运行状态', + protocol: '采集协议', + status: '连接状态', + sampleCycle: '采集周期(s)', + isEnable: '是否启用', + collectionTime: '采集时间', + operate: '操作', + + search: '搜索', + reset: '重置', + create: '新增', + batchDelete: '批量删除', + export: '导出', + + placeholderDeviceCode: '请输入设备编号', + placeholderDeviceName: '请输入设备名称', + placeholderModel: '请选择设备模型', + placeholderSampleCycle: '请输入采集周期', + placeholderUrl: '请输入端点URL', + placeholderUsername: '请输入用户名', + placeholderPassword: '请输入密码', + + model: '设备模型', + url: '端点URL', + username: '用户名', + password: '密码', + + settingDialogTitle: '设备设置', + + connect: '连接', + disconnect: '断开连接', + + attributeModuleName: '点位', + attributeCode: '点位编码', + attributeName: '点位名称', + attributeType: '点位类型', + dataType: '数据类型', + address: '寄存器地址', + dataUnit: '单位', + ratio: '倍率', + remark: '备注', + deviceAttributeTabLabel: '设备属性', + deviceRuleTabLabel: '点位规则', + + currentDeviceLabel: '当前设备:', + + alarmHistoryTitle: '设备告警历史数据', + alarmRuleName: '规则名称', + alarmPointName: '点位名称', + alarmPointValue: '点位值', + alarmLevel: '告警等级', + alarmTime: '告警时间', + + emptyDescription: '请点击设备列表的“点位”查看采集点和点位规则', + + exportFilename: '物联设备.xls', + attributeExportFilename: '采集设备-点位管理.xls', + + attributeLatestValue: '最新值', + attributeLatestCollectionTime: '最新采集时间', + attributeSort: '顺序', + attributePlaceholderSort: '请输入顺序', + + placeholderAttributeCode: '请输入点位编码', + placeholderAttributeName: '请输入点位名称', + placeholderAttributeType: '请选择点位类型', + placeholderDataType: '请选择数据类型', + placeholderAddress: '请输入寄存器地址', + placeholderDataUnit: '请输入单位', + placeholderRatio: '请输入倍率', + placeholderRemark: '请输入备注', + + validatorDeviceCodeRequired: '设备编号不能为空', + validatorDeviceNameRequired: '设备名称不能为空', + validatorSampleCycleRequired: '采集周期不能为空', + validatorIsEnableRequired: '是否启用不能为空', + validatorUrlRequired: '端点URL不能为空', + + attributeValidatorCodeRequired: '点位编码不能为空', + attributeValidatorNameRequired: '点位名称不能为空', + attributeValidatorCodeNoChinese: '点位编码不允许输入中文', + attributeValidatorSortNumber: '顺序只能输入数字', + attributeValidatorRemarkTooLong: '备注不能超过100字', + + messageSelectDeviceRequired: '请选择一个物联设备', + messageDeviceInfoMissingForRules: '设备信息缺失,无法加载点位规则' + }, + RunReport: { + moduleName: '设备运行报表', + + searchDeviceCodeLabel: '设备编码', + searchDeviceCodePlaceholder: '请输入设备编码', + searchDeviceNameLabel: '设备名称', + searchDeviceNamePlaceholder: '请输入设备名称', + searchTimeRangeLabel: '设备运行时间', + searchTimeRangeStartPlaceholder: '开始时间', + searchTimeRangeEndPlaceholder: '结束时间', + + searchButtonText: '搜索', + resetButtonText: '重置', + exportButtonText: '导出', + + tableDeviceCodeColumn: '设备编码', + tableDeviceNameColumn: '设备名称', + tableRunningTimeColumn: '运行时间(小时)', + tableStandbyTimeColumn: '待机时间(小时)', + tableFaultTimeColumn: '故障时间(小时)', + tableWarningTimeColumn: '警告时间(小时)', + tableUtilizationRateColumn: '稼动率', + tableStartTimeColumn: '设备运行开始时间', + tableEndTimeColumn: '设备运行结束时间', + + exportFilename: '设备运行报表.xls' + }, + RealTimeMonitoring: { + moduleName: '数据实时监控', + + searchLineCodeLabel: '产线编码', + searchLineCodePlaceholder: '请输入产线编码', + searchLineNameLabel: '产线名称', + searchLineNamePlaceholder: '请输入产线名称', + searchDeviceCodeLabel: '设备编码', + searchDeviceCodePlaceholder: '请输入设备编码', + searchDeviceNameLabel: '设备名称', + searchDeviceNamePlaceholder: '请输入设备名称', + + searchButtonText: '搜索', + resetButtonText: '重置', + exportButtonText: '导出', + + tableLineCodeColumn: '产线编码', + tableLineNameColumn: '产线名称', + tableDeviceCodeColumn: '设备编码', + tableDeviceNameColumn: '设备名称', + tableStatusColumn: '连接状态', + tableCollectionTimeColumn: '最新采集时间', + tableOperateColumn: '操作', + tableActionSingleMonitorLabel: '单设备监控', + + dialogTitle: '单设备监控', + dialogDeviceNameLabel: '设备名称:', + dialogCollectionTimeLabel: '采集时间:', + + emptyDescription: '暂无数据', + defaultGroupName: '默认', + defaultFieldLabelPrefix: '字段', + + messageDeviceInfoIncomplete: '设备信息不完整', + + exportFilename: '实时监控设备.xls' + }, + HistoryData: { + moduleName: '历史记录查询', + + searchLineCodeLabel: '产线编码', + searchLineCodePlaceholder: '请输入产线编码', + searchLineNameLabel: '产线名称', + searchLineNamePlaceholder: '请输入产线名称', + searchDeviceCodeLabel: '设备编码', + searchDeviceCodePlaceholder: '请输入设备编码', + searchDeviceNameLabel: '设备名称', + searchDeviceNamePlaceholder: '请输入设备名称', + + searchButtonText: '搜索', + resetButtonText: '重置', + exportButtonText: '导出', + + tableLineCodeColumn: '产线编码', + tableLineNameColumn: '产线名称', + tableDeviceCodeColumn: '设备编码', + tableDeviceNameColumn: '设备名称', + tableCollectionTimeColumn: '采集时间', + tableOperateColumn: '操作', + tableActionHistoryLabel: '历史记录', + + dialogTitlePrefix: '历史记录:', + dialogCollectionTimeLabel: '采集时间', + dialogCollectionTimeStartPlaceholder: '开始时间', + dialogCollectionTimeEndPlaceholder: '结束时间', + dialogSearchButtonText: '查询', + dialogResetButtonText: '重置', + dialogRecordCollectionTimePrefix: '采集时间:', + + emptyDescription: '暂无数据', + defaultFieldLabelPrefix: '字段', + + exportFilename: '历史数据设备.xls' + }, + DeviceParamAnalysis: { + moduleName: '设备运行参数分析', + + treeSearchPlaceholder: '搜索设备或参数', + + formTimeLabel: '时间', + formTimeStartPlaceholder: '开始日期', + formTimeEndPlaceholder: '结束日期', + + shortcutLast7Days: '最近 7 天', + shortcutLastWeek: '上周', + shortcutLastMonth: '上个月', + shortcutLast3Months: '三个月内', + + searchButtonText: '搜索', + resetButtonText: '重置', + + emptyDescription: '暂无数据', + emptySelectNodeDescription: '请选择左侧节点', + + selectedParamTitle: '节点:{label}{unit}', + defaultSeriesName: '参数', + + messageLoadTreeFailed: '获取树数据失败', + messageNodeNoParams: '该节点下暂无参数', + messageDeviceNoParams: '该设备下没有参数', + messageFetchChartFailed: '获取图表数据失败' + } + } } } diff --git a/src/views/erp/component/product/index.vue b/src/views/erp/component/product/index.vue index 0632343e..83f5218d 100644 --- a/src/views/erp/component/product/index.vue +++ b/src/views/erp/component/product/index.vue @@ -31,6 +31,14 @@ > {{ t('action.add') }} + + {{ t('action.import') }} + + + + + +
+ 将文件拖到此处,或点击上传 +
+ +
+ +
diff --git a/src/views/iot/devicemodel/components/ModelAttributeList.vue b/src/views/iot/devicemodel/components/ModelAttributeList.vue index 2b602bff..deac1c1a 100644 --- a/src/views/iot/devicemodel/components/ModelAttributeList.vue +++ b/src/views/iot/devicemodel/components/ModelAttributeList.vue @@ -111,7 +111,7 @@ link type="primary" @click="openForm('update', scope.row.id)" diff --git a/src/views/iot/historyData/HistorySingleDeviceDialog.vue b/src/views/iot/historyData/HistorySingleDeviceDialog.vue index 0faf03c8..8c50784e 100644 --- a/src/views/iot/historyData/HistorySingleDeviceDialog.vue +++ b/src/views/iot/historyData/HistorySingleDeviceDialog.vue @@ -54,6 +54,15 @@ v-for="col in section.columns" :key="col.prop" :prop="col.prop" :label="col.labe + @@ -106,7 +115,11 @@ const dialogTitle = computed(() => { return `${t('DataCollection.HistoryData.dialogTitlePrefix')}${name}` }) - +const queryParams = reactive({ + pageNo: 1, + pageSize: 10 +}) +const total = ref(0) const loading = ref(false) const recordGroups = ref([]) @@ -194,19 +207,36 @@ const buildSectionsFromGroups = (groups: Record): Section[] => { const fetchHistory = async () => { if (props.deviceId === undefined || props.deviceId === null || props.deviceId === '') { recordGroups.value = [] + total.value = 0 return } loading.value = true try { - const params: Parameters[0] = { deviceId: props.deviceId } + const params: any = { + deviceId: props.deviceId, + pageNo: queryParams.pageNo, + pageSize: queryParams.pageSize + } if (Array.isArray(collectionTimeRange.value) && collectionTimeRange.value.length === 2) { params.collectionStartTime = collectionTimeRange.value[0] params.collectionEndTime = collectionTimeRange.value[1] } const res: any = await DeviceApi.getHistoryRecord(params) - const list = res?.data?.data ?? res?.data ?? res - const records = Array.isArray(list) ? list : [] - recordGroups.value = records.map((item: any, index: number) => { + const responseData = res?.data?.data ?? res?.data ?? res + + let list: any[] = [] + if (responseData && Array.isArray(responseData.list)) { + list = responseData.list + total.value = responseData.total || 0 + } else if (Array.isArray(responseData)) { + list = responseData + total.value = 0 + } else { + list = [] + total.value = 0 + } + + recordGroups.value = list.map((item: any, index: number) => { const groups = toGroupMap(item) return { key: `${item?.collectTime ?? index}-${index}`, @@ -220,11 +250,14 @@ const fetchHistory = async () => { } const handleQuery = () => { + queryParams.pageNo = 1 fetchHistory() } const resetQuery = () => { collectionTimeRange.value = [] + queryParams.pageNo = 1 + queryParams.pageSize = 10 fetchHistory() } @@ -235,6 +268,8 @@ watch( return } collectionTimeRange.value = buildLastHoursRange(4) + queryParams.pageNo = 1 + queryParams.pageSize = 10 fetchHistory() } ) diff --git a/src/views/iot/runReport/index.vue b/src/views/iot/runReport/index.vue index b2c99d44..746af596 100644 --- a/src/views/iot/runReport/index.vue +++ b/src/views/iot/runReport/index.vue @@ -85,12 +85,12 @@ prop="totalFaultTime" min-width="140px" /> - + /> --> + + diff --git a/src/views/mes/energydevice/ResetForm.vue b/src/views/mes/energydevice/ResetForm.vue index 5e79c3c2..2060c194 100644 --- a/src/views/mes/energydevice/ResetForm.vue +++ b/src/views/mes/energydevice/ResetForm.vue @@ -4,32 +4,33 @@ ref="formRef" :model="formData" :rules="formRules" - label-width="100px" + label-width="auto" v-loading="formLoading" + class="energy-device-reset-dialog-form" > - - + + - - + + - + - - + + @@ -60,14 +61,14 @@ const formData = ref({ isEnable: undefined }) const formRules = reactive({ - isEnable: [{ required: true, message: '是否启用不能为空', trigger: 'blur' }] + isEnable: [{ required: true, message: t('EnergyManagement.EnergyDevice.validatorIsEnableRequired'), trigger: 'blur' }] }) const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { dialogVisible.value = true - dialogTitle.value = "重置最后抄表值" + dialogTitle.value = t('EnergyManagement.EnergyDeviceCheck.dialogLastCheckValueLabel') formType.value = type resetForm() // 修改时,设置数据 diff --git a/src/views/mes/energydevice/components/EnergyDeviceCheckRecordForm.vue b/src/views/mes/energydevice/components/EnergyDeviceCheckRecordForm.vue index 9c89a580..5c04840d 100644 --- a/src/views/mes/energydevice/components/EnergyDeviceCheckRecordForm.vue +++ b/src/views/mes/energydevice/components/EnergyDeviceCheckRecordForm.vue @@ -4,40 +4,41 @@ ref="formRef" :model="formData" :rules="formRules" - label-width="100px" + label-width="auto" v-loading="formLoading" + class="energy-device-dialog-form" > - + - + - + - + @@ -45,23 +46,23 @@ - + - + - - + + @@ -87,8 +88,8 @@ const formData = ref({ remark: undefined }) const formRules = reactive({ - deviceId: [{ required: true, message: '能源设备Id不能为空', trigger: 'blur' }], - checkValue: [{ required: true, message: '抄表值不能为空', trigger: 'blur' }] + deviceId: [{ required: true, message: t('EnergyManagement.EnergyDeviceCheck.validatorDeviceIdRequired'), trigger: 'blur' }], + checkValue: [{ required: true, message: t('EnergyManagement.EnergyDeviceCheck.validatorCheckValueRequired'), trigger: 'blur' }] }) const formRef = ref() // 表单 Ref diff --git a/src/views/mes/energydevice/components/EnergyDeviceCheckRecordList.vue b/src/views/mes/energydevice/components/EnergyDeviceCheckRecordList.vue index 00adc2ab..441b2752 100644 --- a/src/views/mes/energydevice/components/EnergyDeviceCheckRecordList.vue +++ b/src/views/mes/energydevice/components/EnergyDeviceCheckRecordList.vue @@ -12,7 +12,7 @@ - - - - - + + + + + - 删除 + {{ t('common.delMessage') }}
diff --git a/src/views/mes/energydevice/index.vue b/src/views/mes/energydevice/index.vue index 4fbd141d..45182d3e 100644 --- a/src/views/mes/energydevice/index.vue +++ b/src/views/mes/energydevice/index.vue @@ -1,31 +1,50 @@