feat: 添加炉火参数设置功能并国际化界面
refactor: 重构工艺参数面板组件结构 style: 更新界面样式和布局 docs: 添加i18n多语言支持 chore: 新增API接口和工具组件 fix: 修复部分组件显示问题 perf: 优化数据加载和渲染性能 test: 更新测试用例 build: 添加依赖配置
This commit is contained in:
18
apps/l2/src/api/business/dashboard.js
Normal file
18
apps/l2/src/api/business/dashboard.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取当前生产中的计划信息
|
||||
export function getCurrentProducingPlan() {
|
||||
return request({
|
||||
url: '/api/business/dashboard/currentPlan',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前生产卷的关键工艺参数
|
||||
export function getCurrentProcessParams() {
|
||||
return request({
|
||||
url: '/api/business/dashboard/currentProcess',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
36
apps/l2/src/api/l2/sendJob.js
Normal file
36
apps/l2/src/api/l2/sendJob.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import request from '@/utils/L2Request'
|
||||
|
||||
// 创建发送任务
|
||||
export function createSendJob(data) {
|
||||
return request({
|
||||
url: '/business/sendJob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 执行发送任务
|
||||
export function executeSendJob(jobId) {
|
||||
return request({
|
||||
url: `/business/sendJob/${jobId}/execute`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询发送任务列表(分页)
|
||||
export function listSendJob(query) {
|
||||
// 若你后端是 GET /business/sendJob/list(现状),这里用 params
|
||||
return request({
|
||||
url: '/business/sendJob/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取发送任务详情
|
||||
export function getSendJob(jobId) {
|
||||
return request({
|
||||
url: `/business/sendJob/${jobId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
45
apps/l2/src/api/l2/sendTemplate.js
Normal file
45
apps/l2/src/api/l2/sendTemplate.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import request from '@/utils/L2Request'
|
||||
|
||||
// 获取发送模板(含明细)
|
||||
export function getSendTemplate(templateCode) {
|
||||
return request({
|
||||
url: `/business/sendTemplate/${templateCode}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取最近一次成功发送(用于推荐值 + 上次发送时间显示)
|
||||
export function getLastSuccess(groupType) {
|
||||
return request({
|
||||
url: '/business/sendJob/lastSuccess',
|
||||
method: 'get',
|
||||
params: { groupType }
|
||||
})
|
||||
}
|
||||
|
||||
// 更新模板主表(deviceName 等)
|
||||
export function updateSendTemplate(data) {
|
||||
return request({
|
||||
url: '/business/sendTemplate',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量更新模板明细(address/defaultValueRaw/enabled 等)
|
||||
export function updateSendTemplateItems(data) {
|
||||
return request({
|
||||
url: '/business/sendTemplate/items',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量保存模板明细(新增/更新/删除)- 仅提交变更,避免请求体过大
|
||||
export function batchSaveSendTemplateItems(data) {
|
||||
return request({
|
||||
url: '/business/sendTemplate/items/batchSave',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
20
apps/l2/src/api/l2/setupValue.js
Normal file
20
apps/l2/src/api/l2/setupValue.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import request from '@/utils/L2Request'
|
||||
|
||||
// 获取 DRIVE 设定值(最新成功发送)
|
||||
export function getDriveSetupValue() {
|
||||
return request({
|
||||
url: '/business/sendJob/lastSuccess',
|
||||
method: 'get',
|
||||
params: { groupType: 'DRIVE' }
|
||||
})
|
||||
}
|
||||
|
||||
// 获取 FURNACE 设定值(最新成功发送)
|
||||
export function getFurnaceSetupValue() {
|
||||
return request({
|
||||
url: '/business/sendJob/lastSuccess',
|
||||
method: 'get',
|
||||
params: { groupType: 'FURNACE' }
|
||||
})
|
||||
}
|
||||
|
||||
13
apps/l2/src/api/l2/template.js
Normal file
13
apps/l2/src/api/l2/template.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import request from '@/utils/l2-request'
|
||||
|
||||
/**
|
||||
* 按模板编码查询发送模板(含明细)
|
||||
* @param {string} templateCode 模板编码,如 FURNACE_DEFAULT
|
||||
*/
|
||||
export function getSendTemplate(templateCode) {
|
||||
return request({
|
||||
url: `/business/sendTemplate/${templateCode}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user