From a46d22933ab2f4ec958680bc69c6dda7df35aff5 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Tue, 28 Oct 2025 17:54:16 +0800 Subject: [PATCH] =?UTF-8?q?Bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/canteen/dish/menu/detail.vue | 2 +- src/views/canteen/dish/menu/edit.vue | 61 ++++++++++--------- src/views/canteen/dish/menu/index.vue | 2 +- src/views/index_v1.vue | 2 +- .../kitchen/foodSafety/sampleManage/index.vue | 2 +- 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/src/views/canteen/dish/menu/detail.vue b/src/views/canteen/dish/menu/detail.vue index c50c6ef0..1bf139d2 100644 --- a/src/views/canteen/dish/menu/detail.vue +++ b/src/views/canteen/dish/menu/detail.vue @@ -171,7 +171,7 @@
- + diff --git a/src/views/canteen/dish/menu/edit.vue b/src/views/canteen/dish/menu/edit.vue index 818cafd6..7d329cdd 100644 --- a/src/views/canteen/dish/menu/edit.vue +++ b/src/views/canteen/dish/menu/edit.vue @@ -171,7 +171,7 @@
- + @@ -1735,6 +1735,7 @@ export default { //确认复制 confirmCopyMenu(){ this.$modal.confirm('当前日期会被覆盖!确定复制?').then(() => { + // this.detailList=[] this.detailList = [ { mealtimeType:"1", @@ -1837,34 +1838,36 @@ export default { this.$modal.confirm('所选日期数据会被覆盖!确定复制?').then(() => { this.checkDateList.forEach(item=>{ let index = this.dateRangeList.findIndex(v=>v.applyDate.indexOf(item)>-1) - const arr = [ - { - mealtimeType:"1", - mealtimeName:"早餐", - dishesList:[...this.detailList[0].dishesList] - }, - { - mealtimeType:"2", - mealtimeName:"午餐", - dishesList:[...this.detailList[1].dishesList] - }, - { - mealtimeType:"3", - mealtimeName:"下午茶", - dishesList:[...this.detailList[2].dishesList] - }, - { - mealtimeType:"4", - mealtimeName:"晚餐", - dishesList:[...this.detailList[3].dishesList] - }, - { - mealtimeType:"5", - mealtimeName:"夜宵", - dishesList:[...this.detailList[4].dishesList] - } - ]; - this.dateRangeList[index].detailList = JSON.parse(JSON.stringify(arr)) + if(index>-1){ + const arr = [ + { + mealtimeType:"1", + mealtimeName:"早餐", + dishesList:[...this.detailList[0].dishesList] + }, + { + mealtimeType:"2", + mealtimeName:"午餐", + dishesList:[...this.detailList[1].dishesList] + }, + { + mealtimeType:"3", + mealtimeName:"下午茶", + dishesList:[...this.detailList[2].dishesList] + }, + { + mealtimeType:"4", + mealtimeName:"晚餐", + dishesList:[...this.detailList[3].dishesList] + }, + { + mealtimeType:"5", + mealtimeName:"夜宵", + dishesList:[...this.detailList[4].dishesList] + } + ]; + this.dateRangeList[index].detailList = JSON.parse(JSON.stringify(arr)) + } }); this.$modal.msgSuccess("复制成功"); this.openCopyDate = false diff --git a/src/views/canteen/dish/menu/index.vue b/src/views/canteen/dish/menu/index.vue index 5c1029ac..eae0d750 100644 --- a/src/views/canteen/dish/menu/index.vue +++ b/src/views/canteen/dish/menu/index.vue @@ -100,7 +100,7 @@ - + - +