diff --git a/src/views/production/andonBoardConfig/index.vue b/src/views/production/andonBoardConfig/index.vue index 88b0235..d3e78a5 100644 --- a/src/views/production/andonBoardConfig/index.vue +++ b/src/views/production/andonBoardConfig/index.vue @@ -146,32 +146,28 @@ @pagination="getList" /> - + - + + - + - + - - - - - - - + + @@ -281,7 +277,7 @@ export default { }, // 表单参数 form: {}, - // 表单校验 + // 表单校验(简化版:工位必填) rules: { boardCode: [ { required: true, message: "看板编码不能为空", trigger: "blur" } @@ -289,6 +285,9 @@ export default { boardName: [ { required: true, message: "看板名称不能为空", trigger: "blur" } ], + stationCode: [ + { required: true, message: "请选择绑定的工位", trigger: "change" } + ], isFlag: [ { required: true, message: "是否有效不能为空", trigger: "change" } ], diff --git a/src/views/production/andonEventAssignment/index.vue b/src/views/production/andonEventAssignment/index.vue index 19f093a..8837e72 100644 --- a/src/views/production/andonEventAssignment/index.vue +++ b/src/views/production/andonEventAssignment/index.vue @@ -77,6 +77,9 @@ placeholder="请选择完成时间"> --> + + + - + @@ -313,6 +316,10 @@ export default { eventOptions: [], // 用户下拉选项(不分页) userOptions: [], + // 只看我的派工记录(默认开启) + onlyMine: true, + // 当前登录用户ID + currentUserId: null, // 默认通知用户(当前仅一个用户时) defaultUserId: null, defaultUserName: null, @@ -367,6 +374,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 => { @@ -392,6 +405,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; @@ -498,3 +530,20 @@ export default { } }; + + diff --git a/src/views/production/andonRule/index.vue b/src/views/production/andonRule/index.vue index 667fe26..a3f8368 100644 --- a/src/views/production/andonRule/index.vue +++ b/src/views/production/andonRule/index.vue @@ -139,56 +139,40 @@ @pagination="getList" /> - + - - - + + + + - - - - - - - - - - + + - - + + - - - - - - - - - - + + 时限设置(可选) + + + 接单确认的时限(分钟) + + + + 问题解决的时限(分钟) + + + + 1最高,5最低 + - +