diff --git a/src/api/base/firstLastInspection.js b/src/api/base/firstLastInspection.js new file mode 100644 index 0000000..61a0eb9 --- /dev/null +++ b/src/api/base/firstLastInspection.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listFirstLastInspection(query) { + return request({ + url: '/base/firstLastInspection/list', + method: 'get', + params: query + }) +} + +export function getFirstLastInspection(objId) { + return request({ + url: '/base/firstLastInspection/' + objId, + method: 'get' + }) +} + +export function addFirstLastInspection(data) { + return request({ + url: '/base/firstLastInspection', + method: 'post', + data: data + }) +} + +export function updateFirstLastInspection(data) { + return request({ + url: '/base/firstLastInspection', + method: 'put', + data: data + }) +} + +export function delFirstLastInspection(objId) { + return request({ + url: '/base/firstLastInspection/' + objId, + method: 'delete' + }) +} + +export function getFirstLastInspectionList(query) { + return request({ + url: '/base/firstLastInspection/getList', + method: 'get', + params: query + }) +} diff --git a/src/api/base/inspectionReport.js b/src/api/base/inspectionReport.js new file mode 100644 index 0000000..819b212 --- /dev/null +++ b/src/api/base/inspectionReport.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listInspectionReport(query) { + return request({ + url: '/base/inspectionReport/list', + method: 'get', + params: query + }) +} + +export function getInspectionReport(objId) { + return request({ + url: '/base/inspectionReport/' + objId, + method: 'get' + }) +} + +export function addInspectionReport(data) { + return request({ + url: '/base/inspectionReport', + method: 'post', + data: data + }) +} + +export function updateInspectionReport(data) { + return request({ + url: '/base/inspectionReport', + method: 'put', + data: data + }) +} + +export function delInspectionReport(objId) { + return request({ + url: '/base/inspectionReport/' + objId, + method: 'delete' + }) +} + +export function getInspectionReportList(query) { + return request({ + url: '/base/inspectionReport/getList', + method: 'get', + params: query + }) +} diff --git a/src/api/base/inspectionStandard.js b/src/api/base/inspectionStandard.js new file mode 100644 index 0000000..e00ec99 --- /dev/null +++ b/src/api/base/inspectionStandard.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listInspectionStandard(query) { + return request({ + url: '/base/inspectionStandard/list', + method: 'get', + params: query + }) +} + +export function getInspectionStandard(objId) { + return request({ + url: '/base/inspectionStandard/' + objId, + method: 'get' + }) +} + +export function addInspectionStandard(data) { + return request({ + url: '/base/inspectionStandard', + method: 'post', + data: data + }) +} + +export function updateInspectionStandard(data) { + return request({ + url: '/base/inspectionStandard', + method: 'put', + data: data + }) +} + +export function delInspectionStandard(objId) { + return request({ + url: '/base/inspectionStandard/' + objId, + method: 'delete' + }) +} + +export function getInspectionStandardList(query) { + return request({ + url: '/base/inspectionStandard/getList', + method: 'get', + params: query + }) +} diff --git a/src/api/base/processAlert.js b/src/api/base/processAlert.js new file mode 100644 index 0000000..d51b754 --- /dev/null +++ b/src/api/base/processAlert.js @@ -0,0 +1,70 @@ +import request from '@/utils/request' + +// 查询工艺预警列表 +export function listProcessAlert(query) { + return request({ + url: '/base/processAlert/list', + method: 'get', + params: query + }) +} + +// 查询工艺预警详细 +export function getProcessAlert(alertId) { + return request({ + url: '/base/processAlert/' + alertId, + method: 'get' + }) +} + +// 新增工艺预警 +export function addProcessAlert(data) { + return request({ + url: '/base/processAlert', + method: 'post', + data: data + }) +} + +// 修改工艺预警 +export function updateProcessAlert(data) { + return request({ + url: '/base/processAlert', + method: 'put', + data: data + }) +} + +// 删除工艺预警 +export function delProcessAlert(alertId) { + return request({ + url: '/base/processAlert/' + alertId, + method: 'delete' + }) +} + +// 处理工艺预警 +export function handleProcessAlert(data) { + return request({ + url: '/base/processAlert/handle', + method: 'put', + data: data + }) +} + +// 检查阈值预警 +export function checkThresholdAlert() { + return request({ + url: '/base/processAlert/checkThreshold', + method: 'post' + }) +} + +// 批量标记预警为已处理 +export function batchMarkAsProcessed(data) { + return request({ + url: '/base/processAlert/batchMarkProcessed', + method: 'put', + data: data + }) +} diff --git a/src/api/base/processDocument.js b/src/api/base/processDocument.js new file mode 100644 index 0000000..db88af0 --- /dev/null +++ b/src/api/base/processDocument.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询工艺文档列表 +export function listProcessDocument(query) { + return request({ + url: '/base/processDocument/list', + method: 'get', + params: query + }) +} + +// 查询工艺文档详细 +export function getProcessDocument(docId) { + return request({ + url: '/base/processDocument/' + docId, + method: 'get' + }) +} + +// 新增工艺文档 +export function addProcessDocument(data) { + return request({ + url: '/base/processDocument', + method: 'post', + data: data + }) +} + +// 修改工艺文档 +export function updateProcessDocument(data) { + return request({ + url: '/base/processDocument', + method: 'put', + data: data + }) +} + +// 删除工艺文档 +export function delProcessDocument(docId) { + return request({ + url: '/base/processDocument/' + docId, + method: 'delete' + }) +} + +// 获取工艺文档列表(不分页) +export function getProcessDocumentList(query) { + return request({ + url: '/base/processDocument/getProcessDocumentList', + method: 'get', + params: query + }) +} diff --git a/src/api/base/qualityTrace.js b/src/api/base/qualityTrace.js new file mode 100644 index 0000000..6189862 --- /dev/null +++ b/src/api/base/qualityTrace.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listQualityTrace(query) { + return request({ + url: '/base/qualityTrace/list', + method: 'get', + params: query + }) +} + +export function getQualityTrace(objId) { + return request({ + url: '/base/qualityTrace/' + objId, + method: 'get' + }) +} + +export function addQualityTrace(data) { + return request({ + url: '/base/qualityTrace', + method: 'post', + data: data + }) +} + +export function updateQualityTrace(data) { + return request({ + url: '/base/qualityTrace', + method: 'put', + data: data + }) +} + +export function delQualityTrace(objId) { + return request({ + url: '/base/qualityTrace/' + objId, + method: 'delete' + }) +} + +export function getQualityTraceList(query) { + return request({ + url: '/base/qualityTrace/getList', + method: 'get', + params: query + }) +} diff --git a/src/api/base/samplingInspection.js b/src/api/base/samplingInspection.js new file mode 100644 index 0000000..b24d790 --- /dev/null +++ b/src/api/base/samplingInspection.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listSamplingInspection(query) { + return request({ + url: '/base/samplingInspection/list', + method: 'get', + params: query + }) +} + +export function getSamplingInspection(objId) { + return request({ + url: '/base/samplingInspection/' + objId, + method: 'get' + }) +} + +export function addSamplingInspection(data) { + return request({ + url: '/base/samplingInspection', + method: 'post', + data: data + }) +} + +export function updateSamplingInspection(data) { + return request({ + url: '/base/samplingInspection', + method: 'put', + data: data + }) +} + +export function delSamplingInspection(objId) { + return request({ + url: '/base/samplingInspection/' + objId, + method: 'delete' + }) +} + +export function getSamplingInspectionList(query) { + return request({ + url: '/base/samplingInspection/getList', + method: 'get', + params: query + }) +} diff --git a/src/api/base/samplingPlan.js b/src/api/base/samplingPlan.js new file mode 100644 index 0000000..64da889 --- /dev/null +++ b/src/api/base/samplingPlan.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listSamplingPlan(query) { + return request({ + url: '/base/samplingPlan/list', + method: 'get', + params: query + }) +} + +export function getSamplingPlan(objId) { + return request({ + url: '/base/samplingPlan/' + objId, + method: 'get' + }) +} + +export function addSamplingPlan(data) { + return request({ + url: '/base/samplingPlan', + method: 'post', + data: data + }) +} + +export function updateSamplingPlan(data) { + return request({ + url: '/base/samplingPlan', + method: 'put', + data: data + }) +} + +export function delSamplingPlan(objId) { + return request({ + url: '/base/samplingPlan/' + objId, + method: 'delete' + }) +} + +export function getSamplingPlanList(query) { + return request({ + url: '/base/samplingPlan/getList', + method: 'get', + params: query + }) +} diff --git a/src/api/base/standardDocument.js b/src/api/base/standardDocument.js new file mode 100644 index 0000000..4f96aba --- /dev/null +++ b/src/api/base/standardDocument.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listStandardDocument(query) { + return request({ + url: '/base/standardDocument/list', + method: 'get', + params: query + }) +} + +export function getStandardDocument(objId) { + return request({ + url: '/base/standardDocument/' + objId, + method: 'get' + }) +} + +export function addStandardDocument(data) { + return request({ + url: '/base/standardDocument', + method: 'post', + data: data + }) +} + +export function updateStandardDocument(data) { + return request({ + url: '/base/standardDocument', + method: 'put', + data: data + }) +} + +export function delStandardDocument(objId) { + return request({ + url: '/base/standardDocument/' + objId, + method: 'delete' + }) +} + +export function getStandardDocumentList(query) { + return request({ + url: '/base/standardDocument/getList', + method: 'get', + params: query + }) +} diff --git a/src/api/production/andonDashboard.js b/src/api/production/andonDashboard.js new file mode 100644 index 0000000..2ee613a --- /dev/null +++ b/src/api/production/andonDashboard.js @@ -0,0 +1,64 @@ +import request from '@/utils/request' + +// 获取完整的看板数据 +export function getDashboardData(productLineCode) { + return request({ + url: '/production/andon/dashboard/all', + method: 'get', + params: { productLineCode } + }) +} + +// 获取设备状态统计 +export function getDeviceStatusSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/device-status', + method: 'get', + params: { productLineCode } + }) +} + +// 获取任务完成情况 +export function getTaskCompletionSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/task-completion', + method: 'get', + params: { productLineCode } + }) +} + +// 获取OEE数据 +export function getOeeSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/oee', + method: 'get', + params: { productLineCode } + }) +} + +// 获取利用率统计 +export function getUtilizationSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/utilization', + method: 'get', + params: { productLineCode } + }) +} + +// 获取品质数据 +export function getQualitySummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/quality', + method: 'get', + params: { productLineCode } + }) +} + +// 获取安灯事件统计 +export function getAndonEventSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/andon-events', + method: 'get', + params: { productLineCode } + }) +} diff --git a/src/api/production/plan.js b/src/api/production/plan.js new file mode 100644 index 0000000..8695356 --- /dev/null +++ b/src/api/production/plan.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询周排产计划列表 +export function listPlan(query) { + return request({ + url: '/production/plan/list', + method: 'get', + params: query + }) +} + +// 查询周排产计划详细 +export function getPlan(id) { + return request({ + url: '/production/plan/' + id, + method: 'get' + }) +} + +// 新增周排产计划 +export function addPlan(data) { + return request({ + url: '/production/plan', + method: 'post', + data: data + }) +} + +// 修改周排产计划 +export function updatePlan(data) { + return request({ + url: '/production/plan', + method: 'put', + data: data + }) +} + +// 删除周排产计划 +export function delPlan(id) { + return request({ + url: '/production/plan/' + id, + method: 'delete' + }) +} + +// 批量更新周排产计划 +export function batchUpdatePlan(data) { + return request({ + url: '/production/plan/batchUpdate', + method: 'put', + data: data + }) +} diff --git a/src/api/production/req.js b/src/api/production/req.js new file mode 100644 index 0000000..5afa709 --- /dev/null +++ b/src/api/production/req.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询子件物料周需求列表 +export function listReq(query) { + return request({ + url: '/production/req/list', + method: 'get', + params: query + }) +} + +// 查询子件物料周需求详细 +export function getReq(id) { + return request({ + url: '/production/req/' + id, + method: 'get' + }) +} + +// 新增子件物料周需求 +export function addReq(data) { + return request({ + url: '/production/req', + method: 'post', + data: data + }) +} + +// 修改子件物料周需求 +export function updateReq(data) { + return request({ + url: '/production/req', + method: 'put', + data: data + }) +} + +// 删除子件物料周需求 +export function delReq(id) { + return request({ + url: '/production/req/' + id, + method: 'delete' + }) +} + +// 批量更新子件物料周需求 +export function batchUpdateReq(data) { + return request({ + url: '/production/req/batchUpdate', + method: 'put', + data: data + }) +} diff --git a/src/router/index.js b/src/router/index.js index b1c0d95..73f5812 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -507,6 +507,34 @@ export const dynamicRoutes = [ }, ], }, + { + path: "/dms/maintDetail", + component: Layout, + hidden: true, + permissions: ["dms:maint:query"], + children: [ + { + path: "index/:planMaintId/:planMaintCode", + component: () => import("@/views/dms/maintDetail/index"), + name: "MaintDetail", + meta: {title: "保养计划明细", activeMenu: "/dms/maint"}, + }, + ], + }, + { + path: "/base/processAlert", + component: Layout, + hidden: true, + permissions: ["base:processAlert:list"], + children: [ + { + path: "index", + component: () => import("@/views/base/processAlert/index"), + name: "ProcessAlert", + meta: {title: "工艺预警", activeMenu: "/base/processAlert"}, + }, + ], + }, ] // 防止连续点击多次路由报错 diff --git a/src/views/base/deviceParam/index.vue b/src/views/base/deviceParam/index.vue index dbe09f8..2c3bfb7 100644 --- a/src/views/base/deviceParam/index.vue +++ b/src/views/base/deviceParam/index.vue @@ -114,6 +114,21 @@ + + + + + 一般 + 重要 + 紧急 + - + + + + + {{ scope.row.alertEnabled === '1' ? '是' : '否' }} + + @@ -195,7 +210,23 @@ - + + + + + + + + + + + + + + + + + @@ -322,6 +353,10 @@ export default { { key: 11, label: `更新人`, visible: false }, { key: 12, label: `更新时间`, visible: false }, { key: 13, label: `产线`, visible: true }, + { key: 14, label: `上限阈值`, visible: true }, + { key: 15, label: `下限阈值`, visible: true }, + { key: 16, label: `预警级别`, visible: true }, + { key: 17, label: `启用预警`, visible: true }, ], // 设备下拉框 deviceLedgerList: [], diff --git a/src/views/base/firstLastInspection/index.vue b/src/views/base/firstLastInspection/index.vue new file mode 100644 index 0000000..b76590d --- /dev/null +++ b/src/views/base/firstLastInspection/index.vue @@ -0,0 +1,285 @@ + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/base/inspectionReport/index.vue b/src/views/base/inspectionReport/index.vue new file mode 100644 index 0000000..1d0d305 --- /dev/null +++ b/src/views/base/inspectionReport/index.vue @@ -0,0 +1,234 @@ + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/base/inspectionStandard/index.vue b/src/views/base/inspectionStandard/index.vue new file mode 100644 index 0000000..e2cf845 --- /dev/null +++ b/src/views/base/inspectionStandard/index.vue @@ -0,0 +1,236 @@ + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/base/processAlert/index.vue b/src/views/base/processAlert/index.vue new file mode 100644 index 0000000..715b3ca --- /dev/null +++ b/src/views/base/processAlert/index.vue @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 检查预警 + + + 批量标记已处理 + + + 导出 + + + + + + + + + + + + {{ scope.row.alertLevel === '3' ? '紧急' : scope.row.alertLevel === '2' ? '重要' : '一般' }} + + + + + + + + + + + + + + {{ scope.row.alertStatus === '2' ? '已处理' : scope.row.alertStatus === '1' ? '处理中' : '未处理' }} + + + + + + 处理 + 详情 + + + + + + + + + + + + + + + + + 处理中 + 已处理 + + + + + + + + + + + + {{ currentRow.alertCode }} + {{ currentRow.alertType }} + {{ currentRow.alertLevel === '3' ? '紧急' : currentRow.alertLevel === '2' ? '重要' : '一般' }} + {{ currentRow.alertStatus === '2' ? '已处理' : currentRow.alertStatus === '1' ? '处理中' : '未处理' }} + {{ currentRow.deviceCode }} + {{ currentRow.deviceName }} + {{ currentRow.paramCode }} + {{ currentRow.paramName }} + {{ currentRow.alertValue }} + {{ currentRow.thresholdValue }} + {{ currentRow.alertContent }} + {{ currentRow.alertTime }} + {{ currentRow.handleUser }} + {{ currentRow.handleTime }} + {{ currentRow.handleResult }} + + + + + + + + + diff --git a/src/views/base/processDocument/index.vue b/src/views/base/processDocument/index.vue new file mode 100644 index 0000000..6cf63c8 --- /dev/null +++ b/src/views/base/processDocument/index.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + {{ scope.row.docStatus === '1' ? '发布' : scope.row.docStatus === '2' ? '作废' : '草稿' }} + + + + + + + 查看 + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 选取文件 + 只能上传一个文件,大小不超过10MB + + + + + 草稿 + 发布 + 作废 + + + + + + + + + + + + diff --git a/src/views/base/qualityTrace/index.vue b/src/views/base/qualityTrace/index.vue new file mode 100644 index 0000000..e65e7d1 --- /dev/null +++ b/src/views/base/qualityTrace/index.vue @@ -0,0 +1,297 @@ + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/base/samplingInspection/index.vue b/src/views/base/samplingInspection/index.vue new file mode 100644 index 0000000..a7002ce --- /dev/null +++ b/src/views/base/samplingInspection/index.vue @@ -0,0 +1,267 @@ + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/base/samplingPlan/index.vue b/src/views/base/samplingPlan/index.vue new file mode 100644 index 0000000..afbc9cc --- /dev/null +++ b/src/views/base/samplingPlan/index.vue @@ -0,0 +1,219 @@ + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/base/standardDocument/index.vue b/src/views/base/standardDocument/index.vue new file mode 100644 index 0000000..5092707 --- /dev/null +++ b/src/views/base/standardDocument/index.vue @@ -0,0 +1,228 @@ + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/baseDeviceParamVal/val/index.vue b/src/views/baseDeviceParamVal/val/index.vue index 261762e..ad4a16b 100644 --- a/src/views/baseDeviceParamVal/val/index.vue +++ b/src/views/baseDeviceParamVal/val/index.vue @@ -1,10 +1,50 @@ + + + + + 设备: + {{ alert.deviceName }} ({{ alert.deviceCode }}) + + + 参数: + {{ alert.paramName }} + + + 当前值: + {{ alert.alertValue }} + + + 阈值: + {{ alert.thresholdValue }} + + + 查看详情 + 关闭 + + + + 设备工艺参数监控 {{ nowTimeStr }} + + + + + + + + + + 实时预警 ({{ unreadAlertCount }} 条未处理) + + + 全部标记已处理 + + + + + + + 暂无预警信息 + + + + {{ getAlertLevelText(alert) }} + {{ parseTime(alert.alertTime, '{h}:{i}:{s}') }} + + + + 设备: + {{ alert.deviceName }} ({{ alert.deviceCode }}) + + + 参数: + {{ alert.paramName }} + + + 内容: + {{ alert.alertContent }} + + + + 详情 + 标记已读 + + + + + @@ -112,6 +200,7 @@ + + diff --git a/src/views/production/andonEvent/index.vue b/src/views/production/andonEvent/index.vue index 4b483bd..78cdc94 100644 --- a/src/views/production/andonEvent/index.vue +++ b/src/views/production/andonEvent/index.vue @@ -642,21 +642,21 @@ export default { { key: 0, label: `主键ID`, visible: false }, { key: 1, label: `安灯呼叫单号`, visible: true }, { key: 2, label: `呼叫类型编码`, visible: true }, - { key: 3, label: `触发源类型`, visible: true }, + { key: 3, label: `触发源类型`, visible: false }, { key: 4, label: `触发源引用ID`, visible: false }, { key: 5, label: `产品线编码`, visible: true }, { key: 6, label: `工位/工序编码`, visible: true }, - { key: 7, label: `班组编码`, visible: true }, - { key: 8, label: `工单号`, visible: true }, - { key: 9, label: `物料编码`, visible: true }, + { key: 7, label: `班组编码`, visible: false }, + { key: 8, label: `工单号`, visible: false }, + { key: 9, label: `物料编码`, visible: false }, { key: 10, label: `设备ID`, visible: false }, - { key: 11, label: `设备编码`, visible: true }, + { key: 11, label: `设备编码`, visible: false }, { key: 12, label: `优先级`, visible: true }, - { key: 13, label: `事件状态`, visible: true }, - { key: 14, label: `呼叫描述`, visible: true }, + { key: 13, label: `事件状态`, visible: false }, + { key: 14, label: `呼叫描述`, visible: false }, { key: 15, label: `确认人`, visible: true }, { key: 16, label: `确认时间`, visible: true }, - { key: 17, label: `开始处理时间`, visible: true }, + { key: 17, label: `开始处理时间`, visible: false }, { key: 18, label: `处理完成/解决时间`, visible: true }, { key: 19, label: `处理/解决措施`, visible: true }, { key: 20, label: `取消原因`, visible: false }, @@ -664,7 +664,7 @@ export default { { key: 22, label: `升级时间`, visible: false }, { key: 23, label: `确认截止时间`, visible: false }, { key: 24, label: `解决截止时间`, visible: false }, - { key: 25, label: `是否有效`, visible: true }, + { key: 25, label: `是否有效`, visible: false }, { key: 26, label: `备注`, visible: true }, { key: 27, label: `创建人`, visible: false }, { key: 28, label: `创建时间`, visible: false }, diff --git a/src/views/production/andonEventAssignment/index.vue b/src/views/production/andonEventAssignment/index.vue index 19f093a..1eb3f57 100644 --- a/src/views/production/andonEventAssignment/index.vue +++ b/src/views/production/andonEventAssignment/index.vue @@ -77,6 +77,9 @@ placeholder="请选择完成时间"> --> + + + - + @@ -211,54 +214,26 @@ @pagination="getList" /> - + - - - - - + + {{ getCallCodeByEventId(form.eventId) }} - - - - + + {{ getStationNameByCode(form.stationCode) }} - - - - - - - - + + {{ form.assigneeUserName || '-' }} - - + {{ form.assignedTime ? parseTime(form.assignedTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }} - - - {{ form.acceptTime ? parseTime(form.acceptTime, '{y}-{m}-{d} {h}:{i}:{s}') : '后端自动维护' }} + + {{ form.acceptTime ? parseTime(form.acceptTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }} - - - {{ form.finishTime ? parseTime(form.finishTime, '{y}-{m}-{d} {h}:{i}:{s}') : '后端自动维护' }} + + {{ form.finishTime ? parseTime(form.finishTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }} @@ -270,9 +245,6 @@ > - - - @@ -289,6 +261,7 @@ import { listAndonEventAssignment, getAndonEventAssignment, delAndonEventAssignment, addAndonEventAssignment, updateAndonEventAssignment } from "@/api/production/andonEventAssignment"; import { getAndonEventList } from "@/api/production/andonEvent"; import { selectUserList } from "@/api/system/user"; +import { findProductLineList } from "@/api/base/productLine"; export default { name: "AndonEventAssignment", @@ -311,8 +284,14 @@ export default { andonEventAssignmentList: [], // 事件下拉选项(不分页) eventOptions: [], + // 工位下拉选项(不分页) + stationOptions: [], // 用户下拉选项(不分页) userOptions: [], + // 只看我的派工记录(默认开启) + onlyMine: true, + // 当前登录用户ID + currentUserId: null, // 默认通知用户(当前仅一个用户时) defaultUserId: null, defaultUserName: null, @@ -350,14 +329,14 @@ export default { { key: 0, label: `主键ID`, visible: false }, { key: 1, label: `事件ID`, visible: false }, { key: 2, label: `被分配用户ID`, visible: false }, - { key: 3, label: `被分配用户姓名`, visible: true }, - { key: 4, label: `被分配角色编码`, visible: true }, - { key: 5, label: `被分配班组编码`, visible: true }, + { key: 3, label: `被分配用户姓名`, visible: false }, + { key: 4, label: `被分配角色编码`, visible: false }, + { key: 5, label: `被分配班组编码`, visible: false }, { key: 6, label: `分配时间`, visible: true }, { key: 7, label: `接单时间`, visible: true }, { key: 8, label: `完成时间`, visible: true }, { key: 9, label: `派工状态`, visible: true }, - { key: 10, label: `是否有效`, visible: true }, + { key: 10, label: `是否有效`, visible: false }, { key: 11, label: `备注`, visible: true }, { key: 12, label: `创建人`, visible: false }, { key: 13, label: `创建时间`, visible: false }, @@ -367,6 +346,12 @@ export default { }; }, created() { + // 获取当前登录用户ID + this.currentUserId = this.$store.getters.userId; + // 默认只查询当前用户的派工记录 + if (this.onlyMine && this.currentUserId) { + this.queryParams.assigneeUserId = this.currentUserId; + } this.getList(); // 初始化事件下拉选项(不分页) getAndonEventList({ isFlag: '1' }).then(res => { @@ -381,6 +366,10 @@ export default { this.defaultUserName = u.nickName || u.userName || String(u.userId); } }); + // 初始化工位下拉选项(不分页) + findProductLineList({ productLineType: 2 }).then(res => { + this.stationOptions = res.rows || res.data || []; + }); }, methods: { /** 查询安灯派工记录(派工即通知/待办)列表 */ @@ -392,6 +381,25 @@ export default { this.loading = false; }); }, + /** 切换“只看我的”开关 */ + handleOnlyMineChange(val) { + if (val && this.currentUserId) { + this.queryParams.assigneeUserId = this.currentUserId; + } else { + this.queryParams.assigneeUserId = null; + } + this.handleQuery(); + }, + /** 表格行样式:未完成的记录高亮显示 */ + tableRowClassName({ row }) { + // status: 0=待接单, 1=处理中, 2=已完成, 3=已取消 + if (row.status === '0' || row.status === 0) { + return 'warning-row'; // 待接单 - 高亮警告 + } else if (row.status === '1' || row.status === 1) { + return 'info-row'; // 处理中 + } + return ''; + }, // 取消按钮 cancel() { this.open = false; @@ -494,7 +502,36 @@ export default { this.download('production/andonEventAssignment/export', { ...this.queryParams }, `andonEventAssignment_${new Date().getTime()}.xlsx`) + }, + /** 根据事件ID获取呼叫单号 */ + getCallCodeByEventId(eventId) { + if (!eventId) return '-'; + const event = this.eventOptions.find(e => e.eventId === eventId); + return event ? event.callCode || '-' : '-'; + }, + /** 根据工位编码获取工位名称 */ + getStationNameByCode(stationCode) { + if (!stationCode) return '-'; + const station = this.stationOptions ? this.stationOptions.find(s => s.stationCode === stationCode) : null; + return station ? station.stationName : stationCode; } } }; + + diff --git a/src/views/production/andonRule/index.vue b/src/views/production/andonRule/index.vue index 667fe26..5f2b297 100644 --- a/src/views/production/andonRule/index.vue +++ b/src/views/production/andonRule/index.vue @@ -139,56 +139,40 @@ @pagination="getList" /> - + - - - + + + + - - - - - - - - - - + + - - + + - - - - - - - - - - + + 时限设置(可选) + + + 接单确认的时限(分钟) + + + + 问题解决的时限(分钟) + + + + 1最高,5最低 + - +