From 247e351af354c4f76d05ca42700eacd67cb04aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=98=8A=E5=A4=A9?= <15984976+n2319_0@user.noreply.gitee.com> Date: Sat, 4 Jul 2026 09:42:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8A=A0=E8=BD=BD=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mill/MillProductionActualMapper.xml | 2 +- ruoyi-ui/src/views/login.vue | 6 ++++- ruoyi-ui/src/views/mill/plan.vue | 25 ++++++++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ruoyi-mill/src/main/resources/mapper/mill/MillProductionActualMapper.xml b/ruoyi-mill/src/main/resources/mapper/mill/MillProductionActualMapper.xml index 1174cb22..8ddf56f7 100644 --- a/ruoyi-mill/src/main/resources/mapper/mill/MillProductionActualMapper.xml +++ b/ruoyi-mill/src/main/resources/mapper/mill/MillProductionActualMapper.xml @@ -102,7 +102,7 @@ diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index a5b2d6e4..16502356 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -105,9 +105,13 @@ export default { } }, created() { - this.getCode(); this.getCookie(); }, + mounted() { + requestAnimationFrame(() => { + this.getCode(); + }); + }, methods: { getCode() { getCodeImg().then(res => { diff --git a/ruoyi-ui/src/views/mill/plan.vue b/ruoyi-ui/src/views/mill/plan.vue index 590adadd..d89a88a2 100644 --- a/ruoyi-ui/src/views/mill/plan.vue +++ b/ruoyi-ui/src/views/mill/plan.vue @@ -4,7 +4,7 @@
轧制队列
- { this.planList = res.data || [] }) + listPlan(params).then(res => { + const list = res.data || [] + this.planList = list + if (this.selectedPlan && this.selectedPlan.planId != null) { + const stillExists = list.some(p => p.planId === this.selectedPlan.planId) + if (!stillExists) { + this.selectedPlan = null + this.passList = [] + if (this.$refs.queueTable) this.$refs.queueTable.setCurrentRow() + } + } + }) }, resetQuery() { this.query = { inMatNo: '', dateRange: null, hideFinished: false } @@ -448,9 +460,16 @@ export default { // ── 队列行点击 ── handleQueueSelect(row) { + if (this.suppressQueueSelect) { + this.suppressQueueSelect = false + return + } if (this.passEditMode) { - // 正在编辑时禁止切换行 this.$message.warning('请先保存或取消当前编辑') + this.suppressQueueSelect = true + this.$nextTick(() => { + if (this.$refs.queueTable) this.$refs.queueTable.setCurrentRow(this.selectedPlan) + }) return } this.selectedPlan = row