From c1baecb812c5b663da8a58c6364a32dfb8272382 Mon Sep 17 00:00:00 2001 From: z_yu <1534695664@qq.com> Date: Wed, 6 Jul 2022 10:42:56 +0800 Subject: [PATCH] =?UTF-8?q?bug27=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/category/fieldManage/index.vue | 2 +- src/views/components/field/index.vue | 2 +- src/views/storeManage/deviceManage/index.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/category/fieldManage/index.vue b/src/views/category/fieldManage/index.vue index 806e6da..8d67e43 100644 --- a/src/views/category/fieldManage/index.vue +++ b/src/views/category/fieldManage/index.vue @@ -160,7 +160,7 @@ export default { [CRUD.HOOK.beforeSubmit]() { this.crud.form.isType = this.isType if (!this.crud.form.isSequence) { - this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return Math.max(prev.isSequence, cur.isSequence) }) + this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }) + 1 } }, [CRUD.HOOK.beforeToCU]() { diff --git a/src/views/components/field/index.vue b/src/views/components/field/index.vue index c11ee1b..e5d1bb8 100644 --- a/src/views/components/field/index.vue +++ b/src/views/components/field/index.vue @@ -130,7 +130,7 @@ export default { [CRUD.HOOK.beforeSubmit]() { this.crud.form.isType = this.isType if (!this.crud.form.isSequence) { - this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return Math.max(prev.isSequence, cur.isSequence) }) + this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }) + 1 } }, handleConfirm() { diff --git a/src/views/storeManage/deviceManage/index.vue b/src/views/storeManage/deviceManage/index.vue index 391fbfd..2eec295 100644 --- a/src/views/storeManage/deviceManage/index.vue +++ b/src/views/storeManage/deviceManage/index.vue @@ -143,7 +143,7 @@ export default { [CRUD.HOOK.beforeSubmit]() { this.crud.form.pid = this.defaultExpandedKeys[0] if (!this.crud.form.sort) { - this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return Math.max(prev.sort, cur.sort) }) + this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return { sort: Math.max(prev.sort, cur.sort) } }).sort + 1 } }, toDelete(data) { @@ -165,7 +165,7 @@ export default {